diff --git a/charts/meep-dai/templates/deployment.yaml b/charts/meep-dai/templates/deployment.yaml index 2b23fc5a41b71efb70b2487967630f03b4a43201..d4a3ffe4c419bfa443e1dd07e389f67ae8c3ffb9 100644 --- a/charts/meep-dai/templates/deployment.yaml +++ b/charts/meep-dai/templates/deployment.yaml @@ -23,10 +23,12 @@ spec: spec: serviceAccountName: {{ .Values.serviceAccount }} volumes: + {{- if .Values.onboardedapp.enabled}} - name: onboardedapp-storage persistentVolumeClaim: claimName: meep-dai-onboardedapp-pvc - {{- if .Values.codecov.enabled}} + {{- end}} + {{- if .Values.codecov.enabled}} - name: codecov-storage persistentVolumeClaim: claimName: meep-dai-codecov-pvc @@ -34,10 +36,6 @@ spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - {{- if .Values.codecov.enabled}} - command: [ "/meep-dai" ] - args: [ "-test.coverprofile=/codecov/codecov-meep-dai.out", "__DEVEL--code-cov" ] - {{- end}} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - containerPort: {{ .Values.deployment.port }} @@ -58,8 +56,10 @@ spec: value: {{ $value | quote }} {{- end }} volumeMounts: + {{- if .Values.onboardedapp.enabled}} - name: onboardedapp-storage mountPath: /onboardedapp-vol + {{- end}} {{- if .Values.codecov.enabled}} - name: codecov-storage mountPath: /codecov diff --git a/charts/meep-dai/templates/ingress.yaml b/charts/meep-dai/templates/ingress.yaml index 36a9d1c3fc3275046fc7d3c055dcbdee95c19352..a3e246669c83315b0aea23cde6b75040191fb19d 100755 --- a/charts/meep-dai/templates/ingress.yaml +++ b/charts/meep-dai/templates/ingress.yaml @@ -1,6 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $serviceName := .Values.service.name -}} -apiVersion: extensions/v1beta1 +{{- $servicePort := .Values.service.port -}} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $serviceName }} @@ -23,9 +24,12 @@ spec: paths: {{- range $path := .paths }} - path: {{ $path.path }} + pathType: ImplementationSpecific backend: - serviceName: {{ $serviceName }} - servicePort: {{ $path.port }} + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} {{- end -}} {{- if .name }} host: {{ .name }} diff --git a/charts/meep-dai/values-template.yaml b/charts/meep-dai/values-template.yaml index d81d93bdb862628377520a4a84b496c1ed3aaf69..9d6922d4f2b018412ce94d89f738b0e2eb8b3aa3 100644 --- a/charts/meep-dai/values-template.yaml +++ b/charts/meep-dai/values-template.yaml @@ -117,7 +117,7 @@ codecov: location: "/codecov/meep-dai" onboardedapp: - enabled: true + enabled: false location: "/onboardedapp" meepOrigin: core diff --git a/examples/demo4-ue/build-demo4-ue.sh b/examples/demo4-ue/build-demo4-ue.sh index 19809505e240eba8ebace37cf46f391ec5057b0b..f33250e67da8e220e435953cd97d9f880931475d 100755 --- a/examples/demo4-ue/build-demo4-ue.sh +++ b/examples/demo4-ue/build-demo4-ue.sh @@ -37,6 +37,7 @@ if [ -d $MEEPDAI_ONBOARDEDAPP_PATH ]; then fi mkdir -p $MEEPDAI_ONBOARDEDAPP_PATH cp -Rp $DEMOBIN $MEEPDAI_ONBOARDEDAPP_PATH +cp $BASEDIR/src/onboarded-demo/onboarded-demo4.json $MEEPDAI_ONBOARDEDAPP_PATH if [ "$REBUILD_DAI" != "" ]; then echo ">>> Building DAI micro-service" diff --git a/examples/demo4-ue/src/onboarded-demo/go.sum b/examples/demo4-ue/src/onboarded-demo/go.sum index 03a94bfa533d1fdf8559b7cab70c3aa578219bf7..5ac1bc8cfd5db924f4d8fc4b80db9f9a2c536b0b 100644 --- a/examples/demo4-ue/src/onboarded-demo/go.sum +++ b/examples/demo4-ue/src/onboarded-demo/go.sum @@ -16,6 +16,14 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/hashicorp/go-immutable-radix v1.3.0 h1:8exGP7ego3OmkfksihtSouGMZ+hQrhxx+FVELeXpVPE= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= +github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= diff --git a/examples/demo4-ue/src/onboarded-demo/onboarded-demo4.json b/examples/demo4-ue/src/onboarded-demo/onboarded-demo4.json index 6df154b957d7d8e447a2c588a0c9d4b0fcfa2b07..49b5fc59350ab30f4b08f99e76b7d99a4bdd5d0f 100644 --- a/examples/demo4-ue/src/onboarded-demo/onboarded-demo4.json +++ b/examples/demo4-ue/src/onboarded-demo/onboarded-demo4.json @@ -2,61 +2,53 @@ "appList": [ { - "appInfoList": + "appDId": "onboarded-demo4", + "appName": "onboarded-demo4", + "appProvider": "ETSI", + "appSoftVersion": "v0.1.0", + "appDVersion": "v0.1.0", + "appDescription": "Basic HTTP Ping Pong", + "appLocation": [ { - "appDId": "onboarded-demo4", - "appName": "onboarded-demo4", - "appProvider": "ETSI", - "appSoftVersion": "v0.1.0", - "appDVersion": "v0.1.0", - "appDescription": "Basic HTTP Ping Pong", - "appLocation": - [ - { - "area": - { - "coordinates": - [ - [ - [7.420433,43.729942],[7.420659,43.73036],[7.420621,43.731045],[7.420922,43.73129] - ], - [ - [7.43166,43.736156],[7.431723,43.736115],[7.431162,43.735607],[7.430685,43.73518] - ] - ] - }, - "civicAddressElement": + "area": + { + "coordinates": + [ [ - { - "caType": 1, - "caValue": "A1" - }, - { - "caType": 2, - "caValue": "A2" - } + [7.420433,43.729942],[7.420659,43.73036],[7.420621,43.731045],[7.420922,43.73129] ], - "countryCode": "492" - } - ], - "appCharcs": + [ + [7.43166,43.736156],[7.431723,43.736115],[7.431162,43.735607],[7.430685,43.73518] + ] + ] + }, + "civicAddressElement": [ { - "memory": 1024, - "storage": 1024, - "latency": 1024, - "bandwidth": 1024, - "serviceCont": 0 + "caType": 1, + "caValue": "A1" + }, + { + "caType": 2, + "caValue": "A2" } ], - "cmd": "/onboardedapp/onboarded-demo/onboarded-demo4", - "args":null + "countryCode": "492" } ], - "vendorSpecificExt": { - "vendorId": "ETSI" + "appCharcs": + { + "memory": 1024, + "storage": 1024, + "latency": 1024, + "bandwidth": 1024, + "serviceCont": 0 } } - ] + ], + "vendorSpecificExt": + { + "vendorId": "ETSI" + } } diff --git a/go-apps/meep-dai/Dockerfile b/go-apps/meep-dai/Dockerfile index 13bd09f244dcb25126483f765b0a04ce167ca5ee..5aeebd31c26dfb8f08edf51a4abc5aa0aca1e7e4 100644 --- a/go-apps/meep-dai/Dockerfile +++ b/go-apps/meep-dai/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The AdvantEDGE Authors +# Copyright (c) 2024 The AdvantEDGE Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,15 +19,18 @@ COPY ./meep-dai /meep-dai COPY ./api /api COPY ./user-api /user-api COPY ./data / -#COPY ./onboardedapp/ /onboardedapp +COPY ./onboardedapp/ /onboardedapp VOLUME /onboardedapp-vol RUN chmod +x /entrypoint.sh -RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends procps +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends procps lftp nfs-common \ + && mkdir -p /mnt/nfs/mec_sandbox +# \ +# && sudo chmod -R 777 /mnt/nfs/ \ +# && mount -t nfs $HOSTNAME:/mnt/nfs/mec_sandbox /mnt/nfs/mec_sandbox EXPOSE 31120-31129/tcp diff --git a/go-apps/meep-dai/api/swagger.yaml b/go-apps/meep-dai/api/swagger.yaml index 1acaae43851dfc4170bdd0366548cc0e6c23e7f6..a120492a4ba335912ac6e8f12f34d72c95c6c2e3 100644 --- a/go-apps/meep-dai/api/swagger.yaml +++ b/go-apps/meep-dai/api/swagger.yaml @@ -7,10 +7,10 @@ info: license: name: BSD-3-Clause url: https://forge.etsi.org/legal-matters - version: 2.2.1 + version: 3.1.1 externalDocs: - description: ETSI GS MEC016 V2.2.1 Device application interface - url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/02.02.01_60/gs_MEC016v020201p.pdf + description: ETSI GS MEC016 V3.1.1 Device application interface + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf servers: - url: https://localhost/sandboxname/dev_app/v1 tags: @@ -122,7 +122,7 @@ paths: summary: Creation of a new application context. description: "Used to create a new application context. Upon success, the response\ \ contains entity body describing the created application context." - operationId: devAppContextsPOST + operationId: devAppContextsGET parameters: [] requestBody: description: Entity body in the request contains the Application Context as @@ -353,88 +353,6 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - /subscriptions/{subscriptionId}: - post: - tags: - - app_term - summary: MEC011 Application Termination notification for self termination - description: Terminates itself. - operationId: mec011AppTerminationPOST - parameters: - - name: subscriptionId - in: path - description: "Refers to created subscription, where the VIS API allocates\ - \ a unique resource name for this subscription" - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Termination notification details - content: - application/json: - schema: - $ref: '#/components/schemas/AppTerminationNotification' - example: - notificationType: AppTerminationNotification - operationAction: TERMINATING - maxGracefulTimeout: 10 - _links: - subscription: - href: http://mec011Server.example.com/mec_app_support/v1/applications/appId1234/subscriptions/sub123 - confirmTermination: - href: http://mec011Server.example.com/mec_app_support/v1/confirm_termination - required: true - responses: - "204": - description: No Content - x-swagger-router-controller: notifications - delete: - tags: - - unsupported - summary: Used to cancel the existing subscription. - description: Used to cancel the existing subscription. - operationId: individualSubscriptionDELETE - parameters: - - name: subscriptionId - in: path - description: "Refers to created subscription, where the VIS API allocates\ - \ a unique resource name for this subscription" - required: true - style: simple - explode: false - schema: - type: string - responses: - "204": - description: No Content - "401": - description: "Unauthorized : used when the client did not submit credentials." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "403": - description: "Forbidden : operation is not allowed given the current status\ - \ of the resource." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "404": - description: "Not Found : used when a client provided a URI that cannot\ - \ be mapped to a valid resource URI." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "429": - description: "Too Many Requests : used when a rate limiter has triggered." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' components: schemas: AddressChangeNotification: @@ -943,70 +861,6 @@ components: format: uri x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: URI - Links: - required: - - self - type: object - properties: - self: - $ref: '#/components/schemas/LinkType' - description: Hyperlink related to the resource. This shall be only included - in the HTTP responses and in HTTP PUT requests. - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: Structure (inlined) - LinkType: - required: - - href - type: object - properties: - href: - type: string - description: URI referring to a resource - format: uri - x-etsi-mec-cardinality: "1" - x-etsi-mec-origin-type: Uri - example: - href: http://example.com/aeiou - x-etsi-ref: 6.5.13 - AppTerminationNotification: - required: - - _links - - maxGracefulTimeout - - notificationType - - operationAction - type: object - properties: - notificationType: - type: string - description: Shall be set to AppTerminationNotification. - operationAction: - $ref: '#/components/schemas/OperationActionType' - maxGracefulTimeout: - type: integer - description: Maximum timeout value in seconds for graceful termination or - graceful stop of an application instance. - format: uint32 - _links: - $ref: '#/components/schemas/AppTerminationNotification__links' - description: This type represents the information that the MEC platform notifies - the subscribed application instance about the corresponding application instance - termination/stop. - OperationActionType: - type: string - description: Operation that is being performed on the MEC application instance. - enum: - - STOPPING - - TERMINATING - AppTerminationNotification__links: - required: - - subscription - type: object - properties: - subscription: - $ref: '#/components/schemas/LinkType' - confirmTermination: - $ref: '#/components/schemas/LinkType' - description: Object containing hyperlinks related to the resource. AppContext_appInfo_userAppInstanceInfo: type: object properties: diff --git a/go-apps/meep-dai/entrypoint.sh b/go-apps/meep-dai/entrypoint.sh index f003b9551eab1f7ad1ba4e4c01389f75bbd5187a..efe55d3302c58425a7e48db094703d675ddbb05a 100755 --- a/go-apps/meep-dai/entrypoint.sh +++ b/go-apps/meep-dai/entrypoint.sh @@ -5,6 +5,9 @@ echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" echo "MEEP_CODECOV: ${MEEP_CODECOV}" +echo "MEEP_ONBOARDEDAPP: ${MEEP_ONBOARDEDAPP}" +echo "MEEP_ONBOARDEDAPP_LOCATION: ${MEEP_ONBOARDEDAPP_LOCATION}" +echo "HOSTNAME: ${HOSTNAME}" if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" diff --git a/go-apps/meep-dai/go.sum b/go-apps/meep-dai/go.sum index 74489b6158c18802a49332a3435c4ca90cba7b8b..a289e5ddcff04cbcb95308fbdbbeeffb61242813 100644 --- a/go-apps/meep-dai/go.sum +++ b/go-apps/meep-dai/go.sum @@ -140,6 +140,10 @@ github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyN github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0 h1:8exGP7ego3OmkfksihtSouGMZ+hQrhxx+FVELeXpVPE= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= +github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= @@ -151,6 +155,8 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= diff --git a/go-apps/meep-dai/main.go b/go-apps/meep-dai/main.go index de1e66840bfee87300b09ec3db8f5778b4b40cb0..d2abfbcc206f1302dbe32bea35aa2c1daf3b2fe0 100644 --- a/go-apps/meep-dai/main.go +++ b/go-apps/meep-dai/main.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-apps/meep-dai/main_test.go b/go-apps/meep-dai/main_test.go index 6e642d668d4b0d895f9c367d8ed240128dfd5689..5e054c3f011cf7b40f026148c216fe1a0f08a525 100644 --- a/go-apps/meep-dai/main_test.go +++ b/go-apps/meep-dai/main_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-apps/meep-dai/sbi/dai-sbi.go b/go-apps/meep-dai/sbi/dai-sbi.go index 5031eeccba83dfaf5e8abf2f8ca144a5d55932cb..e5de24d7ab4fd73b7461a0460d202cc6440f9d97 100644 --- a/go-apps/meep-dai/sbi/dai-sbi.go +++ b/go-apps/meep-dai/sbi/dai-sbi.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com @@ -46,9 +46,6 @@ var metricStore *met.MetricStore var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379" var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086" -const postgresUser = "postgres" -const postgresPwd = "pwd" - var notifyAppContextDeletion func(string, string) type SbiCfg struct { @@ -63,7 +60,7 @@ type SbiCfg struct { OnboardedMecApplicationsFolder string Locality []string ScenarioNameCb func(string) - AppInfoList func(tm.AppInfoList) + AppInfoList func(tm.AppInfo) NotifyAppContextDeletion func(string, string) CleanUpCb func() } @@ -83,7 +80,7 @@ type DaiSbi struct { gisCache *gc.GisCache daiMgr *tm.DaiMgr //refreshTicker *time.Ticker - updateAppInfoCB func(tm.AppInfoList) + updateAppInfoCB func(tm.AppInfo) updateScenarioNameCB func(string) cleanUpCB func() mutex sync.Mutex @@ -162,12 +159,6 @@ func Init(cfg SbiCfg) (err error) { // Connect to DAI Manager cfgDai := tm.DaiCfg{ - Name: sbi.moduleName, - Namespace: sbi.sandboxName, - User: postgresUser, - Pwd: postgresPwd, - Host: cfg.PostgisHost, - Port: cfg.PostgisPort, NotifyAppContextDeletion: notifyAppContextDeletionSbi, } sbi.daiMgr, err = tm.NewDaiMgr(cfgDai) @@ -177,17 +168,6 @@ func Init(cfg SbiCfg) (err error) { } log.Info("Connected to DAI Manager") - // Delete any old tables - _ = sbi.daiMgr.DeleteTables() - - // Create new tables - err = sbi.daiMgr.CreateTables() - if err != nil { - log.Error("Failed to create tables: ", err) - return err - } - log.Info("Created new DAI DB tables") - err = sbi.daiMgr.LoadOnboardedMecApplications(cfg.OnboardedMecApplicationsFolder) if err != nil { log.Error("Failed to load simulating data: ", err) @@ -255,9 +235,6 @@ func Stop() (err error) { } } - // Flush all DAI tables - _ = sbi.daiMgr.DeleteTables() - // Delete DAI instance if sbi.daiMgr != nil { err = sbi.daiMgr.DeleteDaiMgr() @@ -323,7 +300,7 @@ func processActiveScenarioUpdate() { } // ETSI GS MEC 016 V2.2.1 (2020-04) Clause 7.3.3.1 GET -func GetApplicationListAppList(appNames []string, appProviders []string, appSoftVersions []string, vendorIds []string, serviceConts []string) (appListSbi *map[string]*tm.AppInfoList, err error) { +func GetApplicationListAppList(appNames []string, appProviders []string, appSoftVersions []string, vendorIds []string, serviceConts []string) (appListSbi *map[string]*tm.AppInfo, err error) { log.Debug("GetApplicationListAppList: ", appNames) appListSbi, err = GetAllListAppList() @@ -384,8 +361,8 @@ func GetApplicationListAppList(appNames []string, appProviders []string, appSoft return appListSbi, nil } -func filterAppNames(appNames []string, appListSbi *map[string]*tm.AppInfoList) map[string]*tm.AppInfoList { - filteredAppListSbi := make(map[string]*tm.AppInfoList) +func filterAppNames(appNames []string, appListSbi *map[string]*tm.AppInfo) map[string]*tm.AppInfo { + filteredAppListSbi := make(map[string]*tm.AppInfo) for _, appName := range appNames { log.Debug("filterAppNames: Processing appName: ", appName) // Remove quotes @@ -404,8 +381,8 @@ func filterAppNames(appNames []string, appListSbi *map[string]*tm.AppInfoList) m return filteredAppListSbi } -func filterAppProviders(appProviders []string, appListSbi *map[string]*tm.AppInfoList) map[string]*tm.AppInfoList { - filteredAppListSbi := make(map[string]*tm.AppInfoList) +func filterAppProviders(appProviders []string, appListSbi *map[string]*tm.AppInfo) map[string]*tm.AppInfo { + filteredAppListSbi := make(map[string]*tm.AppInfo) for _, appProvider := range appProviders { log.Debug("filterAppProviders: Processing appProvider: ", appProvider) // Remove quotes @@ -424,8 +401,8 @@ func filterAppProviders(appProviders []string, appListSbi *map[string]*tm.AppInf return filteredAppListSbi } -func filterAppSoftVersions(appSoftVersions []string, appListSbi *map[string]*tm.AppInfoList) map[string]*tm.AppInfoList { - filteredAppListSbi := make(map[string]*tm.AppInfoList) +func filterAppSoftVersions(appSoftVersions []string, appListSbi *map[string]*tm.AppInfo) map[string]*tm.AppInfo { + filteredAppListSbi := make(map[string]*tm.AppInfo) for _, appSoftVersion := range appSoftVersions { log.Debug("filterAppSoftVersions: Processing appSoftVersion: ", appSoftVersion) // Remove quotes @@ -444,8 +421,8 @@ func filterAppSoftVersions(appSoftVersions []string, appListSbi *map[string]*tm. return filteredAppListSbi } -func filterServiceConts(serviceConts []string, appListSbi *map[string]*tm.AppInfoList) map[string]*tm.AppInfoList { - filteredAppListSbi := make(map[string]*tm.AppInfoList) +func filterServiceConts(serviceConts []string, appListSbi *map[string]*tm.AppInfo) map[string]*tm.AppInfo { + filteredAppListSbi := make(map[string]*tm.AppInfo) for _, serviceCount := range serviceConts { log.Debug("filterServiceConts: Processing serviceCount: ", serviceCount) // Remove quotes @@ -457,13 +434,11 @@ func filterServiceConts(serviceConts []string, appListSbi *map[string]*tm.AppInf svcCount32 := uint32(svcCount) // Search for the entry for _, item := range *appListSbi { - if len(item.AppCharcs) != 0 { - for _, sc := range item.AppCharcs { - if sc.ServiceCont != nil && *sc.ServiceCont == svcCount32 { - filteredAppListSbi[item.AppName] = item - break - } - } // End of 'for' statement + if item.AppCharcs != nil { + if item.AppCharcs.ServiceCont != nil && *item.AppCharcs.ServiceCont == svcCount32 { + filteredAppListSbi[item.AppName] = item + break + } } } // End of 'for' statement } // End of 'for' statement @@ -471,7 +446,7 @@ func filterServiceConts(serviceConts []string, appListSbi *map[string]*tm.AppInf return filteredAppListSbi } -func filterExcludeAppProviders(appProviders []string, filteredAppListSbi *map[string]*tm.AppInfoList) { +func filterExcludeAppProviders(appProviders []string, filteredAppListSbi *map[string]*tm.AppInfo) { for _, appProvider := range appProviders { log.Debug("filterExcludeAppProviders: Processing appProvider: ", appProvider) // Remove quotes @@ -489,7 +464,7 @@ func filterExcludeAppProviders(appProviders []string, filteredAppListSbi *map[st } // End of 'for' statement } -func filterExcludeAppSoftVersion(appSoftVersions []string, filteredAppListSbi *map[string]*tm.AppInfoList) { +func filterExcludeAppSoftVersion(appSoftVersions []string, filteredAppListSbi *map[string]*tm.AppInfo) { for _, appSoftVersion := range appSoftVersions { log.Debug("GetApplicationListAppList: Processing appProvider: ", appSoftVersion) // Remove quotes @@ -507,7 +482,7 @@ func filterExcludeAppSoftVersion(appSoftVersions []string, filteredAppListSbi *m } // End of 'for' statement } -func filterExcludeServiceConts(serviceConts []string, filteredAppListSbi *map[string]*tm.AppInfoList) { +func filterExcludeServiceConts(serviceConts []string, filteredAppListSbi *map[string]*tm.AppInfo) { for _, serviceCount := range serviceConts { log.Debug("filterExcludeServiceConts: Processing serviceCount: ", serviceCount) // Remove quotes @@ -519,23 +494,21 @@ func filterExcludeServiceConts(serviceConts []string, filteredAppListSbi *map[st svcCount32 := uint32(svcCount) // Search for the entry for _, item := range *filteredAppListSbi { - if len(item.AppCharcs) != 0 { - for _, sc := range item.AppCharcs { - if sc.ServiceCont != nil && *sc.ServiceCont != svcCount32 { - log.Debug("filterExcludeServiceConts: Removing entry: ", item.AppName) - delete(*filteredAppListSbi, item.AppName) - break - } - } // End of 'for' statement + if item.AppCharcs != nil { + if item.AppCharcs.ServiceCont != nil && *item.AppCharcs.ServiceCont != svcCount32 { + log.Debug("filterExcludeServiceConts: Removing entry: ", item.AppName) + delete(*filteredAppListSbi, item.AppName) + break + } } } // End of 'for' statement } // End of 'for' statement } -func GetAllListAppList() (appListSbi *map[string]*tm.AppInfoList, err error) { +func GetAllListAppList() (appListSbi *map[string]*tm.AppInfo, err error) { // Get list of application - appInfoList, err := sbi.daiMgr.GetAllAppInfoListEntry() + appInfoList, err := sbi.daiMgr.GetAllAppInfoRecord() if err != nil { log.Error(err.Error()) return nil, err @@ -604,14 +577,21 @@ func PosApplicationLocationAvailability(applicationLocationAvailabilitySbi *tm.A applicationLocationAvailability_ = applicationLocationAvailabilitySbi for _, item := range *appListSbi { + log.Debug("notifyAppContextDeletionSbi: Processing item: ", item) if item.AppName != applicationLocationAvailabilitySbi.AppInfo.AppName { err = errors.New("Wrong application found for " + applicationLocationAvailabilitySbi.AppInfo.AppName + "- " + item.AppName) log.Error(err.Error()) return nil, err } - applicationLocationAvailability_.AppInfo.AvailableLocations = make(tm.AvailableLocations, 1) - applicationLocationAvailability_.AppInfo.AvailableLocations[0].AppLocation = new(tm.LocationConstraints) - *applicationLocationAvailability_.AppInfo.AvailableLocations[0].AppLocation = item.AppLocation + applicationLocationAvailability_.AppInfo.AvailableLocations = new([]tm.AvailableLocationsItem) + *applicationLocationAvailability_.AppInfo.AvailableLocations = make([]tm.AvailableLocationsItem, 1) + t := *applicationLocationAvailability_.AppInfo.AvailableLocations + t[0].AppLocation = new(tm.LocationConstraintsItem) + // FIXME FSCOM To be reviewed + //t[0].AppLocation = item.AvailableLocations[0].AppLocation + //*(applicationLocationAvailability_.AppInfo.AvailableLocations[0]).AppLocation = new(tm.LocationConstraintsItem) + //t.area = item.AppLocation + log.Debug("notifyAppContextDeletionSbi: applicationLocationAvailability_.AppInfo: ", applicationLocationAvailability_.AppInfo) break } // End of 'for' statement diff --git a/go-apps/meep-dai/server/README.md b/go-apps/meep-dai/server/README.md index a93411a43b99ffb1cfa84dcfea1e96da6f27cdf8..8d04bbd007988ce58b05e62da0bf87c82e874ff7 100644 --- a/go-apps/meep-dai/server/README.md +++ b/go-apps/meep-dai/server/README.md @@ -13,7 +13,7 @@ To see how to make this your own, look here: [README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) - API version: 2.2.1 -- Build date: 2022-11-18T08:39:01.863Z[Etc/UTC] +- Build date: 2024-07-11T08:03:22.240Z[Etc/UTC] For more information, please visit [https://forge.etsi.org/rep/mec/gs016-dev-app-api](https://forge.etsi.org/rep/mec/gs016-dev-app-api) diff --git a/go-apps/meep-dai/server/api_dai.go b/go-apps/meep-dai/server/api_dai.go index c6f170fde63ace825a2ce21efd4fca15f3120c83..8bff32e8efb0ff63dc4274bb6bbcfd24ba64e16e 100644 --- a/go-apps/meep-dai/server/api_dai.go +++ b/go-apps/meep-dai/server/api_dai.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com @@ -39,8 +39,8 @@ func DevAppContextPUT(w http.ResponseWriter, r *http.Request) { devAppContextPUT(w, r) } -func DevAppContextsPOST(w http.ResponseWriter, r *http.Request) { - devAppContextsPOST(w, r) +func DevAppContextsGET(w http.ResponseWriter, r *http.Request) { + devAppContextsGET(w, r) } diff --git a/go-apps/meep-dai/server/api_unsupported.go b/go-apps/meep-dai/server/api_unsupported.go index 66c9716add5a90b253fd3e117124cc5770a2a210..22fd6945567ae46c86e59da4204fd764bc08b126 100644 --- a/go-apps/meep-dai/server/api_unsupported.go +++ b/go-apps/meep-dai/server/api_unsupported.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/convert.go b/go-apps/meep-dai/server/convert.go index d97858153f565253a01d2ec10e3dad9a074721ea..2eb35192271db0802c72db220c6b0c7ea84db355 100644 --- a/go-apps/meep-dai/server/convert.go +++ b/go-apps/meep-dai/server/convert.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/dai.go b/go-apps/meep-dai/server/dai.go index eb4c5a6a061f843d13e9282abab0af01e2cc39d1..76606b8b4f21c93dcac7c93e8ea16d89d0b66e96 100644 --- a/go-apps/meep-dai/server/dai.go +++ b/go-apps/meep-dai/server/dai.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com @@ -110,12 +110,12 @@ var gisAppClientUrl string = "http://meep-gis-engine" var postgresHost string = "" var postgresPort string = "" -var onboardedMecApplicationsFolder string = "/onboardedapp-vol/" +//var onboardedMecApplicationsFolder string = "/onboardedapp-vol/" +var onboardedMecApplicationsFolder string = "/onboardedapp/" // Notifications const ( applicationContextDeleteNotification = "ApplicationContextDeleteNotification" - //applicationContextUpdateNotification = "ApplicationContextUpdateNotification" ) // No Subscriptions @@ -588,7 +588,7 @@ func updateStoreName(storeName string) { } } -func updateAppInfoList(obj meepdaimgr.AppInfoList) { +func updateAppInfoList(obj meepdaimgr.AppInfo) { log.Debug(">>> updateAppInfoList: ", obj) // TODO Add logic @@ -639,45 +639,47 @@ func meAppListGET(w http.ResponseWriter, r *http.Request) { appList.AppList[i].AppInfo.AppDescription = item.AppDescription //log.Debug("meAppListGET: appList.AppList[i].AppInfo: ", appList.AppList[i].AppInfo) - appList.AppList[i].AppInfo.AppLocation = make([]LocationConstraints, len(item.AppLocation)) - for j, item1 := range item.AppLocation { - if item1.Area != nil { - appList.AppList[i].AppInfo.AppLocation[j].Area = new(Polygon) - appList.AppList[i].AppInfo.AppLocation[j].Area.Coordinates = item1.Area.Coordinates - } else { - appList.AppList[i].AppInfo.AppLocation[j].Area = nil - } + if appList.AppList[i].AppInfo != nil { + appList.AppList[i].AppInfo.AppLocation = make([]LocationConstraints, len(*item.AppLocation)) + for j, item1 := range *item.AppLocation { + if item1.Area != nil { + appList.AppList[i].AppInfo.AppLocation[j].Area = new(Polygon) + appList.AppList[i].AppInfo.AppLocation[j].Area.Coordinates = item1.Area.Coordinates + } else { + appList.AppList[i].AppInfo.AppLocation[j].Area = nil + } - if item1.CivicAddressElement != nil { - appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement = make([]LocationConstraintsCivicAddressElement, len(*item1.CivicAddressElement)) - for k, cv := range *item1.CivicAddressElement { - appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement[k].CaType = cv.CaType - appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement[k].CaValue = cv.CaValue - } // End of 'for' statement - } else { - appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement = make([]LocationConstraintsCivicAddressElement, 0) - } - if item1.CountryCode != nil { - appList.AppList[i].AppInfo.AppLocation[j].CountryCode = *item1.CountryCode - } - } // End of 'for' statement + if item1.CivicAddressElement != nil { + appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement = make([]LocationConstraintsCivicAddressElement, len(*item1.CivicAddressElement)) + for k, cv := range *item1.CivicAddressElement { + appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement[k].CaType = cv.CaType + appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement[k].CaValue = cv.CaValue + } // End of 'for' statement + } else { + appList.AppList[i].AppInfo.AppLocation[j].CivicAddressElement = make([]LocationConstraintsCivicAddressElement, 0) + } + if item1.CountryCode != nil { + appList.AppList[i].AppInfo.AppLocation[j].CountryCode = *item1.CountryCode + } + } // End of 'for' statement + } - if len(item.AppCharcs) == 1 { + if item.AppCharcs != nil { appList.AppList[i].AppInfo.AppCharcs = new(ApplicationListAppInfoAppCharcs) - if item.AppCharcs[0].Memory != nil { - appList.AppList[i].AppInfo.AppCharcs.Memory = int32(*item.AppCharcs[0].Memory) + if item.AppCharcs.Memory != nil { + appList.AppList[i].AppInfo.AppCharcs.Memory = int32(*item.AppCharcs.Memory) } - if item.AppCharcs[0].Storage != nil { - appList.AppList[i].AppInfo.AppCharcs.Storage = int32(*item.AppCharcs[0].Storage) + if item.AppCharcs.Storage != nil { + appList.AppList[i].AppInfo.AppCharcs.Storage = int32(*item.AppCharcs.Storage) } - if item.AppCharcs[0].Latency != nil { - appList.AppList[i].AppInfo.AppCharcs.Latency = int32(*item.AppCharcs[0].Latency) + if item.AppCharcs.Latency != nil { + appList.AppList[i].AppInfo.AppCharcs.Latency = int32(*item.AppCharcs.Latency) } - if item.AppCharcs[0].Bandwidth != nil { - appList.AppList[i].AppInfo.AppCharcs.Bandwidth = int32(*item.AppCharcs[0].Bandwidth) + if item.AppCharcs.Bandwidth != nil { + appList.AppList[i].AppInfo.AppCharcs.Bandwidth = int32(*item.AppCharcs.Bandwidth) } - if item.AppCharcs[0].ServiceCont != nil { - appList.AppList[i].AppInfo.AppCharcs.ServiceCont = int32(*item.AppCharcs[0].ServiceCont) + if item.AppCharcs.ServiceCont != nil { + appList.AppList[i].AppInfo.AppCharcs.ServiceCont = int32(*item.AppCharcs.ServiceCont) } } else { appList.AppList[i].AppInfo.AppCharcs = nil @@ -696,7 +698,7 @@ func meAppListGET(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, string(jsonResponse)) } -func devAppContextsPOST(w http.ResponseWriter, r *http.Request) { +func devAppContextsGET(w http.ResponseWriter, r *http.Request) { // Retrieve the AppContext message body var appContext AppContext bodyBytes, _ := ioutil.ReadAll(r.Body) @@ -706,7 +708,7 @@ func devAppContextsPOST(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - log.Info("devAppContextsPOST: ", appContext) + log.Info("devAppContextsGET: ", appContext) // Create the AppContext var appContextSbi meepdaimgr.AppContext @@ -717,10 +719,10 @@ func devAppContextsPOST(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - appContextSbi.AppInfo.AppDId = new(string) - *appContextSbi.AppInfo.AppDId = appContext.AppInfo.AppDId + appContextSbi.AppInfo.AppDId = appContext.AppInfo.AppDId appContextSbi.AppInfo.AppDVersion = appContext.AppInfo.AppDVersion - appContextSbi.AppInfo.AppDescription = appContext.AppInfo.AppDescription + appContextSbi.AppInfo.AppDescription = new(string) + *appContextSbi.AppInfo.AppDescription = appContext.AppInfo.AppDescription appContextSbi.AppInfo.AppName = appContext.AppInfo.AppName appContextSbi.AppInfo.AppProvider = appContext.AppInfo.AppProvider appContextSbi.AppInfo.AppSoftVersion = new(string) @@ -728,10 +730,10 @@ func devAppContextsPOST(w http.ResponseWriter, r *http.Request) { appContextSbi.AppInfo.UserAppInstanceInfo = make(meepdaimgr.UserAppInstanceInfo, len(appContext.AppInfo.UserAppInstanceInfo)) for i, item := range appContext.AppInfo.UserAppInstanceInfo { if item.AppLocation != nil { - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation = make(meepdaimgr.LocationConstraints, 1) + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation = new(meepdaimgr.LocationConstraintsItem) if item.AppLocation.Area != nil { area := meepdaimgr.Polygon(*item.AppLocation.Area) - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].Area = &area + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.Area = &area } if len(item.AppLocation.CivicAddressElement) != 0 { c := make(meepdaimgr.CivicAddressElement, len(item.AppLocation.CivicAddressElement)) @@ -739,40 +741,37 @@ func devAppContextsPOST(w http.ResponseWriter, r *http.Request) { c[j].CaType = item1.CaType c[j].CaValue = item1.CaValue } // End of 'for' statement - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CivicAddressElement = &c + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement = &c } - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CountryCode = new(string) - *appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CountryCode = item.AppLocation.CountryCode + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode = new(string) + *appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode = item.AppLocation.CountryCode } } // End of 'for' statement appContextSbi.AppLocationUpdates = appContext.AppLocationUpdates appContextSbi.AssociateDevAppId = appContext.AssociateDevAppId - appContextSbi.CallbackReference = meepdaimgr.Uri(appContext.CallbackReference) - appContextSbi.ContextId = nil - log.Debug("devAppContextsPOST: Before appContextSbi: ", appContextSbi) + appContextSbi.CallbackReference = new(meepdaimgr.Uri) + *appContextSbi.CallbackReference = meepdaimgr.Uri(appContext.CallbackReference) + appContextSbi.ContextId = "" + log.Debug("devAppContextsGET: Before appContextSbi: ", appContextSbi) appContextSbi_, err := sbi.CreateAppContext(&appContextSbi) if err != nil { log.Error(err.Error()) errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) return } - log.Debug("devAppContextsPOST: After appContextSbi_: ", appContextSbi_) - log.Debug("devAppContextsPOST: *appContextSbi_.ContextId: ", *appContextSbi_.ContextId) - log.Debug("devAppContextsPOST: appContextSbi_.AppInfo: ", appContextSbi_.AppInfo) - log.Debug("devAppContextsPOST: appContextSbi_.AppInfo.UserAppInstanceInfo: ", appContextSbi_.AppInfo.UserAppInstanceInfo) + log.Debug("devAppContextsGET: After appContextSbi_: ", appContextSbi_) + log.Debug("devAppContextsGET: *appContextSbi_.ContextId: ", appContextSbi_.ContextId) + log.Debug("devAppContextsGET: appContextSbi_.AppInfo: ", appContextSbi_.AppInfo) + log.Debug("devAppContextsGET: appContextSbi_.AppInfo.UserAppInstanceInfo: ", appContextSbi_.AppInfo.UserAppInstanceInfo) // Update AppContext - appContext.ContextId = *appContextSbi_.ContextId + appContext.ContextId = appContextSbi_.ContextId for i, item := range appContextSbi_.AppInfo.UserAppInstanceInfo { - if item.AppInstanceId != nil { - appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId = *item.AppInstanceId - } - if item.ReferenceURI != nil { - appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI = string(*item.ReferenceURI) - } + appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId = string(item.AppInstanceId) + appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI = string(item.ReferenceURI) } // End of 'for' statement - log.Debug("devAppContextsPOST: appContext: ", appContext) + log.Debug("devAppContextsGET: appContext: ", appContext) // Build the response var jsonResponse string = convertAppContextToJson(&appContext) @@ -831,25 +830,23 @@ func devAppContextPUT(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - appContextSbi.AppInfo.AppDId = new(string) - *appContextSbi.AppInfo.AppDId = appContext.AppInfo.AppDId + appContextSbi.AppInfo.AppDId = appContext.AppInfo.AppDId appContextSbi.AppInfo.AppDVersion = appContext.AppInfo.AppDVersion - appContextSbi.AppInfo.AppDescription = appContext.AppInfo.AppDescription + appContextSbi.AppInfo.AppDescription = new(string) + *appContextSbi.AppInfo.AppDescription = appContext.AppInfo.AppDescription appContextSbi.AppInfo.AppName = appContext.AppInfo.AppName appContextSbi.AppInfo.AppProvider = appContext.AppInfo.AppProvider appContextSbi.AppInfo.AppSoftVersion = new(string) *appContextSbi.AppInfo.AppSoftVersion = appContext.AppInfo.AppSoftVersion appContextSbi.AppInfo.UserAppInstanceInfo = make(meepdaimgr.UserAppInstanceInfo, len(appContext.AppInfo.UserAppInstanceInfo)) for i, item := range appContext.AppInfo.UserAppInstanceInfo { - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppInstanceId = new(string) - *appContextSbi.AppInfo.UserAppInstanceInfo[i].AppInstanceId = item.AppInstanceId - appContextSbi.AppInfo.UserAppInstanceInfo[i].ReferenceURI = new(meepdaimgr.Uri) - *appContextSbi.AppInfo.UserAppInstanceInfo[i].ReferenceURI = meepdaimgr.Uri(item.ReferenceURI) + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppInstanceId = item.AppInstanceId + appContextSbi.AppInfo.UserAppInstanceInfo[i].ReferenceURI = meepdaimgr.Uri(item.ReferenceURI) if item.AppLocation != nil { - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation = make(meepdaimgr.LocationConstraints, 1) + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation = new(meepdaimgr.LocationConstraintsItem) if item.AppLocation.Area != nil { area := meepdaimgr.Polygon(*item.AppLocation.Area) - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].Area = &area + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.Area = &area } if len(item.AppLocation.CivicAddressElement) != 0 { c := make(meepdaimgr.CivicAddressElement, len(item.AppLocation.CivicAddressElement)) @@ -857,17 +854,17 @@ func devAppContextPUT(w http.ResponseWriter, r *http.Request) { c[j].CaType = item1.CaType c[j].CaValue = item1.CaValue } // End of 'for' statement - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CivicAddressElement = &c + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement = &c } - appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CountryCode = new(string) - *appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation[0].CountryCode = item.AppLocation.CountryCode + appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode = new(string) + *appContextSbi.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode = item.AppLocation.CountryCode } } // End of 'for' statement appContextSbi.AppLocationUpdates = appContext.AppLocationUpdates appContextSbi.AssociateDevAppId = appContext.AssociateDevAppId - appContextSbi.CallbackReference = meepdaimgr.Uri(appContext.CallbackReference) - appContextSbi.ContextId = new(string) - *appContextSbi.ContextId = appContext.ContextId + appContextSbi.CallbackReference = new(meepdaimgr.Uri) + *appContextSbi.CallbackReference = meepdaimgr.Uri(appContext.CallbackReference) + appContextSbi.ContextId = appContext.ContextId log.Debug("devAppContextPUT: appContextSbi: ", appContextSbi) err = sbi.PutAppContext(appContextSbi) if err != nil { @@ -907,7 +904,6 @@ func appLocationAvailabilityPOST(w http.ResponseWriter, r *http.Request) { } var applicationLocationAvailabilitySbi meepdaimgr.ApplicationLocationAvailability - applicationLocationAvailabilitySbi.AppInfo = new(meepdaimgr.ApplicationLocationAvailabilityAppInfo) applicationLocationAvailabilitySbi.AppInfo.AppName = applicationLocationAvailability.AppInfo.AppName applicationLocationAvailabilitySbi.AppInfo.AppProvider = applicationLocationAvailability.AppInfo.AppProvider applicationLocationAvailabilitySbi.AppInfo.AppSoftVersion = new(string) @@ -926,34 +922,34 @@ func appLocationAvailabilityPOST(w http.ResponseWriter, r *http.Request) { } // Build response: only update AvailableLocations field - log.Debug("devAppContextsPOST: applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations: ", applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations) - log.Debug("devAppContextsPOST: len(applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations): ", len(applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations)) - applicationLocationAvailability.AppInfo.AvailableLocations = make([]ApplicationLocationAvailabilityAppInfoAvailableLocations, len(applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations)) + log.Debug("devAppContextsGET: applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations: ", applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations) + log.Debug("devAppContextsGET: len(applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations): ", len(*applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations)) + applicationLocationAvailability.AppInfo.AvailableLocations = make([]ApplicationLocationAvailabilityAppInfoAvailableLocations, len(*applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations)) if len(applicationLocationAvailability.AppInfo.AvailableLocations) != 0 { - for i, item := range applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations { + for i, item := range *applicationLocationAvailabilitySbi_.AppInfo.AvailableLocations { applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation = new(LocationConstraints) - if (*item.AppLocation)[0].Area != nil { + if (*item.AppLocation).Area != nil { applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.Area = new(Polygon) - applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.Area.Coordinates = (*item.AppLocation)[0].Area.Coordinates + applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.Area.Coordinates = (*item.AppLocation).Area.Coordinates } - if (*item.AppLocation)[0].CivicAddressElement != nil { - applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CivicAddressElement = make([]LocationConstraintsCivicAddressElement, len(*(*item.AppLocation)[0].CivicAddressElement)) - for j, cv := range *(*item.AppLocation)[0].CivicAddressElement { + if (*item.AppLocation).CivicAddressElement != nil { + applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CivicAddressElement = make([]LocationConstraintsCivicAddressElement, len(*(*item.AppLocation).CivicAddressElement)) + for j, cv := range *(*item.AppLocation).CivicAddressElement { applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CivicAddressElement[j].CaType = cv.CaType applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CivicAddressElement[j].CaValue = cv.CaValue } // End of 'for' statement } - if (*item.AppLocation)[0].CountryCode != nil { - log.Debug("devAppContextsPOST: *(*item.AppLocation)[0].CountryCode: ", *(*item.AppLocation)[0].CountryCode) - applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CountryCode = *(*item.AppLocation)[0].CountryCode + if (*item.AppLocation).CountryCode != nil { + log.Debug("devAppContextsGET: *(*item.AppLocation).CountryCode: ", *(*item.AppLocation).CountryCode) + applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation.CountryCode = *(*item.AppLocation).CountryCode } - log.Debug("devAppContextsPOST: applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation: ", applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation) + log.Debug("devAppContextsGET: applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation: ", applicationLocationAvailability.AppInfo.AvailableLocations[i].AppLocation) } // End of 'for' statement } - log.Debug("devAppContextsPOST: applicationLocationAvailability.AppInfo.AvailableLocations: ", applicationLocationAvailability.AppInfo.AvailableLocations) + log.Debug("devAppContextsGET: applicationLocationAvailability.AppInfo.AvailableLocations: ", applicationLocationAvailability.AppInfo.AvailableLocations) // Build the response var jsonResponse string = convertApplicationLocationAvailabilityToJson(&applicationLocationAvailability) diff --git a/go-apps/meep-dai/server/dai_test.go b/go-apps/meep-dai/server/dai_test.go index 482849c1107384b8f8658aa3bbdbc3b5b3f72550..b341289a58f672b67793f50bdc57ea8525cfca5e 100644 --- a/go-apps/meep-dai/server/dai_test.go +++ b/go-apps/meep-dai/server/dai_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com @@ -1051,7 +1051,7 @@ func testDevAppContextsPOST(t *testing.T) *AppContext { /****************************** * request execution section ******************************/ - rr, err := sendRequest(http.MethodPost, "/app_contexts", bytes.NewBuffer(body), nil, nil, http.StatusCreated, DevAppContextsPOST) + rr, err := sendRequest(http.MethodPost, "/app_contexts", bytes.NewBuffer(body), nil, nil, http.StatusCreated, DevAppContextsGET) if err != nil { t.Fatalf(err.Error()) } diff --git a/go-apps/meep-dai/server/logger.go b/go-apps/meep-dai/server/logger.go index 8c7a6c60104bf8916206d5556b7bed0e2484875b..a5b0cc83399fcf3faaed2d77d973f4c0eb986d09 100644 --- a/go-apps/meep-dai/server/logger.go +++ b/go-apps/meep-dai/server/logger.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_address_change_notification.go b/go-apps/meep-dai/server/model_address_change_notification.go index 892ff8e9c6693d00c16898ea3439dd10d7663788..c36a7df5a99a7a011356f2845dc218f3256b3bf8 100644 --- a/go-apps/meep-dai/server/model_address_change_notification.go +++ b/go-apps/meep-dai/server/model_address_change_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type AddressChangeNotification struct { diff --git a/go-apps/meep-dai/server/model_app_context.go b/go-apps/meep-dai/server/model_app_context.go index d26824104fd81c8244b55cea71efd970670aaf27..f97072ac6648cfd734076b53ba9b7ee970df8141 100644 --- a/go-apps/meep-dai/server/model_app_context.go +++ b/go-apps/meep-dai/server/model_app_context.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type AppContext struct { diff --git a/go-apps/meep-dai/server/model_app_context_app_info.go b/go-apps/meep-dai/server/model_app_context_app_info.go index d85e5050f8629134286738e3202e6446b6f10488..054e0624777cea2f00517fefcedfbaff31aa25c2 100644 --- a/go-apps/meep-dai/server/model_app_context_app_info.go +++ b/go-apps/meep-dai/server/model_app_context_app_info.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type AppContextAppInfo struct { diff --git a/go-apps/meep-dai/server/model_app_context_app_info_user_app_instance_info.go b/go-apps/meep-dai/server/model_app_context_app_info_user_app_instance_info.go index d856e1900e7e7fcc0ae21f08af87c0903504839d..c3575c0b4bbc392b897f8470b879c53a581a38b0 100644 --- a/go-apps/meep-dai/server/model_app_context_app_info_user_app_instance_info.go +++ b/go-apps/meep-dai/server/model_app_context_app_info_user_app_instance_info.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type AppContextAppInfoUserAppInstanceInfo struct { diff --git a/go-apps/meep-dai/server/model_app_termination_notification.go b/go-apps/meep-dai/server/model_app_termination_notification.go index 9fac0a194ec5f01ebdd6b3cc7f13b437e67ac70d..36b3e8198d458025190335ccda06204377cc6e44 100644 --- a/go-apps/meep-dai/server/model_app_termination_notification.go +++ b/go-apps/meep-dai/server/model_app_termination_notification.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_app_termination_notification__links.go b/go-apps/meep-dai/server/model_app_termination_notification__links.go index afc1116b0bcefd26210fa7b43897e5789d33610f..4d3ed9d58cea981ac9df6db670840112a8d35fc3 100644 --- a/go-apps/meep-dai/server/model_app_termination_notification__links.go +++ b/go-apps/meep-dai/server/model_app_termination_notification__links.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_application_context_delete_notification.go b/go-apps/meep-dai/server/model_application_context_delete_notification.go index 9d44ceb182007a0d285fb0ae982fa33396d42e89..c50f0b431e37beb94979a11b03d21f8567a7711b 100644 --- a/go-apps/meep-dai/server/model_application_context_delete_notification.go +++ b/go-apps/meep-dai/server/model_application_context_delete_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationContextDeleteNotification struct { diff --git a/go-apps/meep-dai/server/model_application_context_update_notification.go b/go-apps/meep-dai/server/model_application_context_update_notification.go index a33c3da2816d2a537e1911b3a1cd9a1bffaffefd..1fae023945107f17de35391921e7621c30a80710 100644 --- a/go-apps/meep-dai/server/model_application_context_update_notification.go +++ b/go-apps/meep-dai/server/model_application_context_update_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationContextUpdateNotification struct { diff --git a/go-apps/meep-dai/server/model_application_context_update_notification_user_app_instance_info.go b/go-apps/meep-dai/server/model_application_context_update_notification_user_app_instance_info.go index 95346e4fc4565d283d65b6629baaa2b7b82a2b8b..c8358d03571aef772fb840bbc47d10d84ebfef07 100644 --- a/go-apps/meep-dai/server/model_application_context_update_notification_user_app_instance_info.go +++ b/go-apps/meep-dai/server/model_application_context_update_notification_user_app_instance_info.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationContextUpdateNotificationUserAppInstanceInfo struct { diff --git a/go-apps/meep-dai/server/model_application_list.go b/go-apps/meep-dai/server/model_application_list.go index 840315f2e5078a0bacc7713014af89ac9f361ebd..32115ce187546d47be5596212c6c157aaacfde5b 100644 --- a/go-apps/meep-dai/server/model_application_list.go +++ b/go-apps/meep-dai/server/model_application_list.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationList struct { diff --git a/go-apps/meep-dai/server/model_application_list_app_info.go b/go-apps/meep-dai/server/model_application_list_app_info.go index 181b54726bb30c4b2a7303c80009a83eb86d062a..85199f7152e2c87805fcb2bfe91e5f254f24d926 100644 --- a/go-apps/meep-dai/server/model_application_list_app_info.go +++ b/go-apps/meep-dai/server/model_application_list_app_info.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationListAppInfo struct { diff --git a/go-apps/meep-dai/server/model_application_list_app_info_app_charcs.go b/go-apps/meep-dai/server/model_application_list_app_info_app_charcs.go index cc3e6f6d8ce432218c788a8562258600875efe4d..b67cb6534b39c55c28bf04b241f685afcbde4a82 100644 --- a/go-apps/meep-dai/server/model_application_list_app_info_app_charcs.go +++ b/go-apps/meep-dai/server/model_application_list_app_info_app_charcs.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server // Characteristics of the application. As defined below. The application characteristics relate to the system resources consumed by the application. A device application can use this information e.g. for estimating the cost of use of the application or for the expected user experience. diff --git a/go-apps/meep-dai/server/model_application_list_app_list.go b/go-apps/meep-dai/server/model_application_list_app_list.go index 41e046977cede03ba0fcb81878ed6816c841cad9..178cbac882721018597da1791570808478f656b9 100644 --- a/go-apps/meep-dai/server/model_application_list_app_list.go +++ b/go-apps/meep-dai/server/model_application_list_app_list.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationListAppList struct { diff --git a/go-apps/meep-dai/server/model_application_list_vendor_specific_ext.go b/go-apps/meep-dai/server/model_application_list_vendor_specific_ext.go index e36f9ba18c6888b5e25e592c63139497ab61666a..309df6410b66346434dee2cb7ff82bbac0edd21e 100644 --- a/go-apps/meep-dai/server/model_application_list_vendor_specific_ext.go +++ b/go-apps/meep-dai/server/model_application_list_vendor_specific_ext.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server // Extension for vendor specific information (see note 1). diff --git a/go-apps/meep-dai/server/model_application_location_availability.go b/go-apps/meep-dai/server/model_application_location_availability.go index 7609b1db8157cbfe47daf464c7e69e0c1fd6a574..420f6001d3dca60365447d61e4dbef9cb01d4ca6 100644 --- a/go-apps/meep-dai/server/model_application_location_availability.go +++ b/go-apps/meep-dai/server/model_application_location_availability.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationLocationAvailability struct { diff --git a/go-apps/meep-dai/server/model_application_location_availability_app_info.go b/go-apps/meep-dai/server/model_application_location_availability_app_info.go index 6d1e4335031528acfd7a97d5caa221f486ac1bd1..95732fadae157454fa31bf292154753aeadbb243 100644 --- a/go-apps/meep-dai/server/model_application_location_availability_app_info.go +++ b/go-apps/meep-dai/server/model_application_location_availability_app_info.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationLocationAvailabilityAppInfo struct { diff --git a/go-apps/meep-dai/server/model_application_location_availability_app_info_available_locations.go b/go-apps/meep-dai/server/model_application_location_availability_app_info_available_locations.go index c944c339902ad529bb7cfe60fa9af7b6e57bc71e..637ee2e0c5ff593cd51a7297a4546c06fade798e 100644 --- a/go-apps/meep-dai/server/model_application_location_availability_app_info_available_locations.go +++ b/go-apps/meep-dai/server/model_application_location_availability_app_info_available_locations.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationLocationAvailabilityAppInfoAvailableLocations struct { diff --git a/go-apps/meep-dai/server/model_application_location_availability_notification.go b/go-apps/meep-dai/server/model_application_location_availability_notification.go index f696ac83400f849fe258043120a610f072a9a75d..c66db3f86e784849e910955980c269464fb033e2 100644 --- a/go-apps/meep-dai/server/model_application_location_availability_notification.go +++ b/go-apps/meep-dai/server/model_application_location_availability_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ApplicationLocationAvailabilityNotification struct { diff --git a/go-apps/meep-dai/server/model_inline_notification.go b/go-apps/meep-dai/server/model_inline_notification.go index ac479426ac8d040f44a8923bf0ebd8960c65130c..e9a7d53e0452435db4c7611fb7a58fe8211fa268 100644 --- a/go-apps/meep-dai/server/model_inline_notification.go +++ b/go-apps/meep-dai/server/model_inline_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type InlineNotification struct { diff --git a/go-apps/meep-dai/server/model_link_type.go b/go-apps/meep-dai/server/model_link_type.go index 7161504fe2c3c5769155265973dca424cf145ee6..69dbe30281c8496d4b5505dbd6a07b4d2a801fbd 100644 --- a/go-apps/meep-dai/server/model_link_type.go +++ b/go-apps/meep-dai/server/model_link_type.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_links.go b/go-apps/meep-dai/server/model_links.go index 12fe25fe9cb163decf04001fc10c21f37045c6da..5ab1968256e1143a5b96a5f800022a806b3a888b 100644 --- a/go-apps/meep-dai/server/model_links.go +++ b/go-apps/meep-dai/server/model_links.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_location_constraints.go b/go-apps/meep-dai/server/model_location_constraints.go index bfad0ab97bdc9d5a33086c0af6371a3a771f658f..699db7de82b88319f6e1c58fea50acb3da8e6f09 100644 --- a/go-apps/meep-dai/server/model_location_constraints.go +++ b/go-apps/meep-dai/server/model_location_constraints.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type LocationConstraints struct { diff --git a/go-apps/meep-dai/server/model_location_constraints_civic_address_element.go b/go-apps/meep-dai/server/model_location_constraints_civic_address_element.go index 501960b44ae74afa366a9c813edfc937a5d02a91..c96c32361759369f2266d2f7778e7b124c34e298 100644 --- a/go-apps/meep-dai/server/model_location_constraints_civic_address_element.go +++ b/go-apps/meep-dai/server/model_location_constraints_civic_address_element.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type LocationConstraintsCivicAddressElement struct { diff --git a/go-apps/meep-dai/server/model_one_of_inline_notification.go b/go-apps/meep-dai/server/model_one_of_inline_notification.go index 30a9abaaaca5e10517fa0be6feb2d3c0c9eb277b..8fc3e227bb6a542d69c9c45d791688b4451a8c75 100644 --- a/go-apps/meep-dai/server/model_one_of_inline_notification.go +++ b/go-apps/meep-dai/server/model_one_of_inline_notification.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type OneOfInlineNotification struct { diff --git a/go-apps/meep-dai/server/model_operation_action_type.go b/go-apps/meep-dai/server/model_operation_action_type.go index f6e4b3223d0a1df4265da155beb132379fd4ef4a..51084e1ccda6486ec10b266f82293875a894486b 100644 --- a/go-apps/meep-dai/server/model_operation_action_type.go +++ b/go-apps/meep-dai/server/model_operation_action_type.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com diff --git a/go-apps/meep-dai/server/model_polygon.go b/go-apps/meep-dai/server/model_polygon.go index 914d20343b0b6cc4a4738b83e10dbeb6886e733d..7078eaa85fbb1ac659d62167bef6fb2972280ff9 100644 --- a/go-apps/meep-dai/server/model_polygon.go +++ b/go-apps/meep-dai/server/model_polygon.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package server diff --git a/go-apps/meep-dai/server/model_problem_details.go b/go-apps/meep-dai/server/model_problem_details.go index 50356af01e9db05d60f1ce65e407f9694c7ad5de..4161dd40775abfd46ae2e88ee5c57f0ba95005dc 100644 --- a/go-apps/meep-dai/server/model_problem_details.go +++ b/go-apps/meep-dai/server/model_problem_details.go @@ -1,27 +1,11 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Device application interface - * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package server type ProblemDetails struct { diff --git a/go-apps/meep-dai/server/routers.go b/go-apps/meep-dai/server/routers.go index ab0704aaa8e67cae6fe8f91fdb4c72bbed193b70..6306b0322fe635c85a272d644b769ba99de0dd0e 100644 --- a/go-apps/meep-dai/server/routers.go +++ b/go-apps/meep-dai/server/routers.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ * * AdvantEDGE Device application interface * - * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. + * Device application interface is AdvantEDGE's implementation of [ETSI GS MEC016 Device application interface](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of DAI API endpoints (see below) and a subset of subscription types. * * API version: 2.2.1 * Contact: AdvantEDGE@InterDigital.com @@ -117,10 +117,10 @@ var routes = Routes{ }, Route{ - "DevAppContextsPOST", + "DevAppContextsGET", strings.ToUpper("Post"), "/dev_app/v1/app_contexts", - DevAppContextsPOST, + DevAppContextsGET, }, Route{ diff --git a/go-apps/meep-virt-engine/entrypoint.sh b/go-apps/meep-virt-engine/entrypoint.sh index b19f3fec9f704b7a0a4b3285b1475a80307c9084..0eb84b7a20590a29dbb5ae78d33f3d4cbb634c81 100755 --- a/go-apps/meep-virt-engine/entrypoint.sh +++ b/go-apps/meep-virt-engine/entrypoint.sh @@ -3,6 +3,8 @@ set -e # echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" echo "MEEP_CODECOV: ${MEEP_CODECOV}" echo "MEEP_CODECOV_LOCATION: ${MEEP_CODECOV_LOCATION}" +echo "MEEP_ONBOARDEDAPP: ${MEEP_ONBOARDEDAPP}" +echo "MEEP_ONBOARDEDAPP_LOCATION: ${MEEP_ONBOARDEDAPP_LOCATION}" # Move helm charts from docker data to template folder mkdir -p /templates/sandbox @@ -18,7 +20,7 @@ mv /meep-ams /templates/sandbox/meep-ams mv /meep-sandbox-ctrl /templates/sandbox/meep-sandbox-ctrl mv /meep-tc-engine /templates/sandbox/meep-tc-engine mv /meep-vis /templates/sandbox/meep-vis -#mv /meep-dai /templates/sandbox/meep-dai +mv /meep-dai /templates/sandbox/meep-dai mv /meep-tm /templates/sandbox/meep-tm mkdir -p /templates/scenario diff --git a/go-apps/meep-virt-engine/helm/install.go b/go-apps/meep-virt-engine/helm/install.go index 53da67b9898369894af6f5ee7d73f260dbd43995..c8864135ff864c4e49225f194ba1f7236265395e 100644 --- a/go-apps/meep-virt-engine/helm/install.go +++ b/go-apps/meep-virt-engine/helm/install.go @@ -64,7 +64,8 @@ func install(chart Chart) error { if strings.Trim(chart.ValuesFile, " ") == "" { codecovLocation := strings.TrimSpace(os.Getenv("MEEP_CODECOV_LOCATION")) + chart.ReleaseName codecovEnabled := strings.TrimSpace(os.Getenv("MEEP_CODECOV")) - onboardedappLocation := strings.TrimSpace(os.Getenv("MEEP_ONBOARDEDAPP_LOCATION")) + chart.ReleaseName + /*onboardedappEnabled := strings.TrimSpace(os.Getenv("MEEP_ONBOARDEDAPP")) + onboardedappLocation := strings.TrimSpace(os.Getenv("MEEP_ONBOARDEDAPP_LOCATION")) + chart.ReleaseName*/ cmd = exec.Command("helm", "install", chart.ReleaseName, "--namespace", chart.Namespace, "--create-namespace", "--set", "nameOverride="+chart.Name, @@ -72,9 +73,9 @@ func install(chart Chart) error { chart.Location, "--replace", "--disable-openapi-validation", "--set", "codecov.enabled="+codecovEnabled, "--set", "codecov.location="+codecovLocation, - "--set", "image.env.MEEP_CODECOV="+codecovEnabled, - "--set", "onboardedapp.enabled="+strings.TrimSpace(os.Getenv("MEEP_ONBOARDEDAPP")), - "--set", "onboardedapp.location="+onboardedappLocation) + "--set", "image.env.MEEP_CODECOV="+codecovEnabled) /*, + "--set", "onboardedapp.enabled="+onboardedappEnabled, + "--set", "onboardedapp.location="+onboardedappLocation)*/ } else { cmd = exec.Command("helm", "install", chart.ReleaseName, "--namespace", chart.Namespace, "--create-namespace", diff --git a/go-apps/meepctl/cmd/deploy.go b/go-apps/meepctl/cmd/deploy.go index 0198c7593c9436a48b289939430444ef2eb0c74b..286dd2a6a34ab3451a6562b0e76684522e0805bd 100644 --- a/go-apps/meepctl/cmd/deploy.go +++ b/go-apps/meepctl/cmd/deploy.go @@ -32,15 +32,16 @@ import ( ) type DeployData struct { - codecov bool - gitdir string - workdir string - registry string - tag string - coreApps []string - depApps []string - crds []string - sboxApps []string + codecov bool + onboardedapp bool + gitdir string + workdir string + registry string + tag string + coreApps []string + depApps []string + crds []string + sboxApps []string } const deployDesc = `Deploy containers on the K8s cluster @@ -91,6 +92,7 @@ func init() { // Set deploy-specific flags deployCmd.Flags().BoolP("force", "f", false, "Deployed components are deleted and deployed") deployCmd.Flags().BoolVar(&deployData.codecov, "codecov", false, "Use when deploying code coverage binaries (dev. option)") + deployCmd.Flags().BoolVar(&deployData.onboardedapp, "onboardedapp", false, "Use when shared folder with host (meep-dai)") deployCmd.Flags().StringP("registry", "r", "", "Override registry from config file") deployCmd.Flags().StringP("tag", "", "latest", "Repo tag to use") @@ -186,6 +188,7 @@ func deployCore(cobraCmd *cobra.Command) { for _, app := range deployData.coreApps { chart := deployData.gitdir + "/" + utils.RepoCfg.GetString("repo.core.go-apps."+app+".chart") codecov := utils.RepoCfg.GetBool("repo.core.go-apps." + app + ".codecov") + onboardedapp := utils.RepoCfg.GetBool("repo.core.go-apps." + app + ".onboardedapp") userFe := utils.RepoCfg.GetBool("repo.deployment.user.frontend") userSwagger := utils.RepoCfg.GetBool("repo.deployment.user.swagger") hostName := utils.RepoCfg.GetString("repo.deployment.ingress.host") @@ -201,6 +204,12 @@ func deployCore(cobraCmd *cobra.Command) { coreFlags = utils.HelmFlags(coreFlags, "--set", "codecov.enabled=true") coreFlags = utils.HelmFlags(coreFlags, "--set", "codecov.location="+deployData.workdir+"/codecov/"+app) } + if deployData.onboardedapp && onboardedapp { + coreFlags = utils.HelmFlags(coreFlags, "--set", "image.env.MEEP_ONBOARDEDAPP='true'") + coreFlags = utils.HelmFlags(coreFlags, "--set", "image.env.MEEP_ONBOARDEDAPP_LOCATION="+deployData.workdir+"/onboardedapp-vol/") + coreFlags = utils.HelmFlags(coreFlags, "--set", "onboardedapp.enabled=true") + coreFlags = utils.HelmFlags(coreFlags, "--set", "onboardedapp.location="+deployData.workdir+"/onboardedapp-vol/"+app) + } if userFe { coreFlags = utils.HelmFlags(coreFlags, "--set", "user.frontend.enabled=true") coreFlags = utils.HelmFlags(coreFlags, "--set", "user.frontend.location="+deployData.workdir+"/user/frontend") diff --git a/go-packages/meep-dai-client/api/swagger.yaml b/go-packages/meep-dai-client/api/swagger.yaml index 1acaae43851dfc4170bdd0366548cc0e6c23e7f6..68e79b6be6acf6ace9c86271e63fb1eb4c52212a 100644 --- a/go-packages/meep-dai-client/api/swagger.yaml +++ b/go-packages/meep-dai-client/api/swagger.yaml @@ -10,7 +10,7 @@ info: version: 2.2.1 externalDocs: description: ETSI GS MEC016 V2.2.1 Device application interface - url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/02.02.01_60/gs_MEC016v020201p.pdf + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/03.01.01_60/gs_mec016v030101p.pdf servers: - url: https://localhost/sandboxname/dev_app/v1 tags: @@ -122,7 +122,7 @@ paths: summary: Creation of a new application context. description: "Used to create a new application context. Upon success, the response\ \ contains entity body describing the created application context." - operationId: devAppContextsPOST + operationId: devAppContextsGET parameters: [] requestBody: description: Entity body in the request contains the Application Context as @@ -353,88 +353,6 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' - /subscriptions/{subscriptionId}: - post: - tags: - - app_term - summary: MEC011 Application Termination notification for self termination - description: Terminates itself. - operationId: mec011AppTerminationPOST - parameters: - - name: subscriptionId - in: path - description: "Refers to created subscription, where the VIS API allocates\ - \ a unique resource name for this subscription" - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Termination notification details - content: - application/json: - schema: - $ref: '#/components/schemas/AppTerminationNotification' - example: - notificationType: AppTerminationNotification - operationAction: TERMINATING - maxGracefulTimeout: 10 - _links: - subscription: - href: http://mec011Server.example.com/mec_app_support/v1/applications/appId1234/subscriptions/sub123 - confirmTermination: - href: http://mec011Server.example.com/mec_app_support/v1/confirm_termination - required: true - responses: - "204": - description: No Content - x-swagger-router-controller: notifications - delete: - tags: - - unsupported - summary: Used to cancel the existing subscription. - description: Used to cancel the existing subscription. - operationId: individualSubscriptionDELETE - parameters: - - name: subscriptionId - in: path - description: "Refers to created subscription, where the VIS API allocates\ - \ a unique resource name for this subscription" - required: true - style: simple - explode: false - schema: - type: string - responses: - "204": - description: No Content - "401": - description: "Unauthorized : used when the client did not submit credentials." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "403": - description: "Forbidden : operation is not allowed given the current status\ - \ of the resource." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "404": - description: "Not Found : used when a client provided a URI that cannot\ - \ be mapped to a valid resource URI." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - "429": - description: "Too Many Requests : used when a rate limiter has triggered." - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' components: schemas: AddressChangeNotification: @@ -943,70 +861,6 @@ components: format: uri x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: URI - Links: - required: - - self - type: object - properties: - self: - $ref: '#/components/schemas/LinkType' - description: Hyperlink related to the resource. This shall be only included - in the HTTP responses and in HTTP PUT requests. - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: Structure (inlined) - LinkType: - required: - - href - type: object - properties: - href: - type: string - description: URI referring to a resource - format: uri - x-etsi-mec-cardinality: "1" - x-etsi-mec-origin-type: Uri - example: - href: http://example.com/aeiou - x-etsi-ref: 6.5.13 - AppTerminationNotification: - required: - - _links - - maxGracefulTimeout - - notificationType - - operationAction - type: object - properties: - notificationType: - type: string - description: Shall be set to AppTerminationNotification. - operationAction: - $ref: '#/components/schemas/OperationActionType' - maxGracefulTimeout: - type: integer - description: Maximum timeout value in seconds for graceful termination or - graceful stop of an application instance. - format: uint32 - _links: - $ref: '#/components/schemas/AppTerminationNotification__links' - description: This type represents the information that the MEC platform notifies - the subscribed application instance about the corresponding application instance - termination/stop. - OperationActionType: - type: string - description: Operation that is being performed on the MEC application instance. - enum: - - STOPPING - - TERMINATING - AppTerminationNotification__links: - required: - - subscription - type: object - properties: - subscription: - $ref: '#/components/schemas/LinkType' - confirmTermination: - $ref: '#/components/schemas/LinkType' - description: Object containing hyperlinks related to the resource. AppContext_appInfo_userAppInstanceInfo: type: object properties: diff --git a/go-packages/meep-dai-client/api_dai.go b/go-packages/meep-dai-client/api_dai.go index da4a983f36ae33ba273ee2f181aa4ec2361cdd74..1782ce9c820245edd535103a60dc0c28c1e7c799 100644 --- a/go-packages/meep-dai-client/api_dai.go +++ b/go-packages/meep-dai-client/api_dai.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +26,12 @@ package client import ( "context" "fmt" - "github.com/antihax/optional" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/antihax/optional" ) // Linger please @@ -391,7 +392,7 @@ Used to create a new application context. Upon success, the response contains en * @param body Entity body in the request contains the Application Context as requested by the device application. @return AppContext */ -func (a *DevAppApiService) DevAppContextsPOST(ctx context.Context, body AppContext) (AppContext, *http.Response, error) { +func (a *DevAppApiService) DevAppContextsGET(ctx context.Context, body AppContext) (AppContext, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} diff --git a/go-packages/meep-dai-client/client.go b/go-packages/meep-dai-client/client.go index aed3454dba6b017f287168b45756ccc1262d636b..3c9a628b544d861621901f262f8f32544b035d4c 100644 --- a/go-packages/meep-dai-client/client.go +++ b/go-packages/meep-dai-client/client.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/configuration.go b/go-packages/meep-dai-client/configuration.go index e72fd95efc1fa5df2f3562d9bcf61df82a63567a..306e90cff43c754d49c1bf5dad29fa3754fab04b 100644 --- a/go-packages/meep-dai-client/configuration.go +++ b/go-packages/meep-dai-client/configuration.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/docs/DevAppApi.md b/go-packages/meep-dai-client/docs/DevAppApi.md new file mode 100644 index 0000000000000000000000000000000000000000..b3029a61d6f975fb46943c927c6bafbc89c4e700 --- /dev/null +++ b/go-packages/meep-dai-client/docs/DevAppApi.md @@ -0,0 +1,163 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/dev_app/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AppLocationAvailabilityPOST**](DevAppApi.md#AppLocationAvailabilityPOST) | **Post** /obtain_app_loc_availability | Obtain the location constraints for a new application context. +[**DevAppContextDELETE**](DevAppApi.md#DevAppContextDELETE) | **Delete** /app_contexts/{contextId} | Deletion of an existing application context. +[**DevAppContextPUT**](DevAppApi.md#DevAppContextPUT) | **Put** /app_contexts/{contextId} | Updating the callbackReference and/or appLocation of an existing application context. +[**DevAppContextsGET**](DevAppApi.md#DevAppContextsGET) | **Post** /app_contexts | Creation of a new application context. +[**MeAppListGET**](DevAppApi.md#MeAppListGET) | **Get** /app_list | Get available application information. + +# **AppLocationAvailabilityPOST** +> ApplicationLocationAvailability AppLocationAvailabilityPOST(ctx, body) +Obtain the location constraints for a new application context. + +Used to obtain the locations available for instantiation of a specific user application in the MEC system. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**ApplicationLocationAvailability**](ApplicationLocationAvailability.md)| Entity body in the request contains the user application information for the MEC system to evaluate the locations available for instantiation of that application. | + +### Return type + +[**ApplicationLocationAvailability**](ApplicationLocationAvailability.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DevAppContextDELETE** +> DevAppContextDELETE(ctx, contextId) +Deletion of an existing application context. + +Used to delete the resource that represents the existing application context. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **contextId** | **string**| Uniquely identifies the application context in the MEC system. It is assigned by the MEC system. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DevAppContextPUT** +> DevAppContextPUT(ctx, body, contextId) +Updating the callbackReference and/or appLocation of an existing application context. + +Used to update the callback reference and/or application location constraints of an existing application context. Upon successful operation, the target resource is updated with the new application context information. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**AppContext**](AppContext.md)| Only the callbackReference and/or appLocation attribute values are allowed to be updated. Other attributes and their values shall remain untouched. | + **contextId** | **string**| Uniquely identifies the application context in the MEC system. It is assigned by the MEC system. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DevAppContextsGET** +> AppContext DevAppContextsGET(ctx, body) +Creation of a new application context. + +Used to create a new application context. Upon success, the response contains entity body describing the created application context. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**AppContext**](AppContext.md)| Entity body in the request contains the Application Context as requested by the device application. | + +### Return type + +[**AppContext**](AppContext.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **MeAppListGET** +> ApplicationList MeAppListGET(ctx, optional) +Get available application information. + +Used to query information about the available MEC applications. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***DevAppApiMeAppListGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a DevAppApiMeAppListGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appName** | [**optional.Interface of []string**](string.md)| Name to identify the MEC application. | + **appProvider** | [**optional.Interface of []string**](string.md)| Provider of the MEC application. | + **appSoftVersion** | [**optional.Interface of []string**](string.md)| Software version of the MEC application. | + **vendorId** | [**optional.Interface of []string**](string.md)| Vendor identifier | + **serviceCont** | **optional.Int32**| Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED. | + +### Return type + +[**ApplicationList**](ApplicationList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-dai-client/git_push.sh b/go-packages/meep-dai-client/git_push.sh old mode 100755 new mode 100644 diff --git a/go-packages/meep-dai-client/model_address_change_notification.go b/go-packages/meep-dai-client/model_address_change_notification.go index 8108ba21d38cf09a734c6f3ca3a4e8a5a3efb3f2..cfac850bcdbac5e21bd4d5a2a1990454a68bfe73 100644 --- a/go-packages/meep-dai-client/model_address_change_notification.go +++ b/go-packages/meep-dai-client/model_address_change_notification.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_app_context.go b/go-packages/meep-dai-client/model_app_context.go index 50a59eb8f0524c776871d47157c6313ac92266cb..787883d54bb079ad0f08085657a5a7f13613289b 100644 --- a/go-packages/meep-dai-client/model_app_context.go +++ b/go-packages/meep-dai-client/model_app_context.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_app_context_app_info.go b/go-packages/meep-dai-client/model_app_context_app_info.go index 83d6bfef3d392592c68ae99ae32fe5e75d91973e..9d1c8f284868c1483b56b28552bd5556097852ce 100644 --- a/go-packages/meep-dai-client/model_app_context_app_info.go +++ b/go-packages/meep-dai-client/model_app_context_app_info.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_app_context_app_info_user_app_instance_info.go b/go-packages/meep-dai-client/model_app_context_app_info_user_app_instance_info.go index 06f9388ac49d600796f78ae581fe76d8f25eadb7..431669454aa2b85c55bfe162ee1bfe2d3d15044d 100644 --- a/go-packages/meep-dai-client/model_app_context_app_info_user_app_instance_info.go +++ b/go-packages/meep-dai-client/model_app_context_app_info_user_app_instance_info.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_app_termination_notification.go b/go-packages/meep-dai-client/model_app_termination_notification.go index 67e89d6c8f532b4a4a92f35e82a15cac029239ea..8da02544be29a0b31006e9d028e28bea899cd896 100644 --- a/go-packages/meep-dai-client/model_app_termination_notification.go +++ b/go-packages/meep-dai-client/model_app_termination_notification.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/model_app_termination_notification__links.go b/go-packages/meep-dai-client/model_app_termination_notification__links.go index a20d94b4658996bb529f1dc32009b5749ab07758..c53d1b7542c882188c7063d61af8e88304601d64 100644 --- a/go-packages/meep-dai-client/model_app_termination_notification__links.go +++ b/go-packages/meep-dai-client/model_app_termination_notification__links.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/model_application_context_delete_notification.go b/go-packages/meep-dai-client/model_application_context_delete_notification.go index 5237b4d883fb1072e8c95bae87be931f4c2148c7..5a0f1eeb6c265438a7b815608dee3b559767d5df 100644 --- a/go-packages/meep-dai-client/model_application_context_delete_notification.go +++ b/go-packages/meep-dai-client/model_application_context_delete_notification.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_context_update_notification.go b/go-packages/meep-dai-client/model_application_context_update_notification.go index 1192e9bc6dab3acb1fb3452c2a127cb108358254..76714e74bfcd7e792ae5d8605c585ba991f54933 100644 --- a/go-packages/meep-dai-client/model_application_context_update_notification.go +++ b/go-packages/meep-dai-client/model_application_context_update_notification.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_context_update_notification_user_app_instance_info.go b/go-packages/meep-dai-client/model_application_context_update_notification_user_app_instance_info.go index eb1de9a8162af93b6fac4dd5a319210aab9f24ea..a97f50da45091f5cd8af514e5637565adb41a395 100644 --- a/go-packages/meep-dai-client/model_application_context_update_notification_user_app_instance_info.go +++ b/go-packages/meep-dai-client/model_application_context_update_notification_user_app_instance_info.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_list.go b/go-packages/meep-dai-client/model_application_list.go index a27432eca9cc973d092972e62a0c646af45cea1d..5b419b4030a0dfba1c8338aba756a1eab07fe479 100644 --- a/go-packages/meep-dai-client/model_application_list.go +++ b/go-packages/meep-dai-client/model_application_list.go @@ -1,27 +1,12 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package client +package client type ApplicationList struct { // List of user applications available to the device application. As defined below. diff --git a/go-packages/meep-dai-client/model_application_list_app_info.go b/go-packages/meep-dai-client/model_application_list_app_info.go index 45a5e9283778ca49452fbae52c0f36ff9686a514..6fe98159c75850bd013d2daa0feacce2e3c45b59 100644 --- a/go-packages/meep-dai-client/model_application_list_app_info.go +++ b/go-packages/meep-dai-client/model_application_list_app_info.go @@ -1,27 +1,12 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package client +package client type ApplicationListAppInfo struct { AppCharcs *ApplicationListAppInfoAppCharcs `json:"appCharcs,omitempty"` diff --git a/go-packages/meep-dai-client/model_application_list_app_info_app_charcs.go b/go-packages/meep-dai-client/model_application_list_app_info_app_charcs.go index 23d1d5e5635bf58e763e379acc11b433afc87410..caa80fbbdeeee5ee7013c1a9609219e541ae844a 100644 --- a/go-packages/meep-dai-client/model_application_list_app_info_app_charcs.go +++ b/go-packages/meep-dai-client/model_application_list_app_info_app_charcs.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_list_app_list.go b/go-packages/meep-dai-client/model_application_list_app_list.go index a712a62d0e84addc51764ca185ddbc35d35baa06..5b1ccfca483c9c71f3ca3e000eadbc675302883a 100644 --- a/go-packages/meep-dai-client/model_application_list_app_list.go +++ b/go-packages/meep-dai-client/model_application_list_app_list.go @@ -1,27 +1,12 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ - package client +package client type ApplicationListAppList struct { AppInfo *ApplicationListAppInfo `json:"appInfo,omitempty"` diff --git a/go-packages/meep-dai-client/model_application_location_availability.go b/go-packages/meep-dai-client/model_application_location_availability.go index 50994dc3699ea68ec86ff81b1782cd887c168983..7825d7c4d857bbd887721e600598a30c57de5380 100644 --- a/go-packages/meep-dai-client/model_application_location_availability.go +++ b/go-packages/meep-dai-client/model_application_location_availability.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_location_availability_app_info.go b/go-packages/meep-dai-client/model_application_location_availability_app_info.go index bb63c74ebad877080ccde1f7eb153557abf048ce..33b8e32177e005ed7105c64ce77d037f2d75490f 100644 --- a/go-packages/meep-dai-client/model_application_location_availability_app_info.go +++ b/go-packages/meep-dai-client/model_application_location_availability_app_info.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_location_availability_app_info_available_locations.go b/go-packages/meep-dai-client/model_application_location_availability_app_info_available_locations.go index 80f1b893a557261751ad3953474d23e3da3db25a..521bf1e124a023a52c60efa33db2ab2e975121fc 100644 --- a/go-packages/meep-dai-client/model_application_location_availability_app_info_available_locations.go +++ b/go-packages/meep-dai-client/model_application_location_availability_app_info_available_locations.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_application_location_availability_notification.go b/go-packages/meep-dai-client/model_application_location_availability_notification.go index a021440aea21186150ab1eb3223bdbed31615a4d..2c439f9610b96330fd129bef7244ba6ad35ea413 100644 --- a/go-packages/meep-dai-client/model_application_location_availability_notification.go +++ b/go-packages/meep-dai-client/model_application_location_availability_notification.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_inline_notification.go b/go-packages/meep-dai-client/model_inline_notification.go index 24044c051d9f412848b838075907116d0d970d07..c5382125ca42f3ceff2531950502c48d07c8af1d 100644 --- a/go-packages/meep-dai-client/model_inline_notification.go +++ b/go-packages/meep-dai-client/model_inline_notification.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_link_type.go b/go-packages/meep-dai-client/model_link_type.go index 20b6fa88abed9f204bb94d7844a2ff5378e7f524..039933d0ad0389de88f4fc29945519bf10cd26d0 100644 --- a/go-packages/meep-dai-client/model_link_type.go +++ b/go-packages/meep-dai-client/model_link_type.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/model_links.go b/go-packages/meep-dai-client/model_links.go index f5e06186175628052b471146f75317119b7ea688..b722afd1b3ae66f2dec5ec3c77f154e92d058356 100644 --- a/go-packages/meep-dai-client/model_links.go +++ b/go-packages/meep-dai-client/model_links.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/model_location_constraints.go b/go-packages/meep-dai-client/model_location_constraints.go index 217ea4a55f00e86a68340aafa3770a1541aaf094..bacf2a48af7e56da40267077fa4a62b637e9a4c8 100644 --- a/go-packages/meep-dai-client/model_location_constraints.go +++ b/go-packages/meep-dai-client/model_location_constraints.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_location_constraints_civic_address_element.go b/go-packages/meep-dai-client/model_location_constraints_civic_address_element.go index 9c72b89bf664155013bdfca3981435a518d8c18a..914644980c8d57d4e80608218474a66f067fc53c 100644 --- a/go-packages/meep-dai-client/model_location_constraints_civic_address_element.go +++ b/go-packages/meep-dai-client/model_location_constraints_civic_address_element.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_one_of_inline_notification.go b/go-packages/meep-dai-client/model_one_of_inline_notification.go index 55d0ffb29235aef38f5d5c879ba08b006b5fc019..5e5bfe4ec71798920d0ccd79b49076f1d8fb5b1d 100644 --- a/go-packages/meep-dai-client/model_one_of_inline_notification.go +++ b/go-packages/meep-dai-client/model_one_of_inline_notification.go @@ -1,32 +1,16 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client type OneOfInlineNotification struct { - NotificationType string `json:"notificationType"` - /*AddressChangeNotification + AddressChangeNotification ApplicationContextDeleteNotification ApplicationContextUpdateNotification - ApplicationLocationAvailabilityNotification*/ + ApplicationLocationAvailabilityNotification } diff --git a/go-packages/meep-dai-client/model_operation_action_type.go b/go-packages/meep-dai-client/model_operation_action_type.go index 038918c43214f41f6c593d06c194f2bdb09566a9..42d82de329ce0177c38112a0cd947ad1d678726a 100644 --- a/go-packages/meep-dai-client/model_operation_action_type.go +++ b/go-packages/meep-dai-client/model_operation_action_type.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-client/model_polygon.go b/go-packages/meep-dai-client/model_polygon.go index 8375ad690dce3b6611cbcc83c55a4e7f25066fc5..28d6c82eeb9e368c1f5e3508cb300544028778b1 100644 --- a/go-packages/meep-dai-client/model_polygon.go +++ b/go-packages/meep-dai-client/model_polygon.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/model_problem_details.go b/go-packages/meep-dai-client/model_problem_details.go index 40951460e22983607022cdbf5a0f548b12d2096a..be279b524570ee0e0b8be5b02583dc629811cd8c 100644 --- a/go-packages/meep-dai-client/model_problem_details.go +++ b/go-packages/meep-dai-client/model_problem_details.go @@ -1,24 +1,9 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * ETSI GS MEC 016 Device application interface * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * AdvantEDGE Application Mobility API - * - * Device application interface is AdvantEDGE's implementation of [ETSI MEC ISG MEC016 Device application interface API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/021/02.02.01_60/gs_MEC016v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-dai](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-dai)

**Type & Usage**
Edge Service used by edge applications that want to get information about application mobility in the network

**Note**
AdvantEDGE supports a selected subset of Device application interface API endpoints (see below). + * The ETSI MEC ISG Device application interface API described using OpenAPI. * * API version: 2.2.1 - * Contact: AdvantEDGE@InterDigital.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package client diff --git a/go-packages/meep-dai-client/response.go b/go-packages/meep-dai-client/response.go index 6f3eeed52bd1af296c2c19f3c5adfc7f89077f24..e98d4bdb29ed331491b12403bcc4a850c513aa0e 100644 --- a/go-packages/meep-dai-client/response.go +++ b/go-packages/meep-dai-client/response.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-mgr/convert.go b/go-packages/meep-dai-mgr/convert.go index 8e53fb50ec667e91938edba58fdba5f638a15d9a..5c3ad38ae8c10fdde3814a3c2c0ccb4c8fd3c050 100644 --- a/go-packages/meep-dai-mgr/convert.go +++ b/go-packages/meep-dai-mgr/convert.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,108 +18,138 @@ package meepdaimgr import ( "encoding/json" + "math" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" ) func convertPolygonToJson(area *Polygon) string { if area == nil { // This is not an error - return "" + return "nil" } jsonInfo, err := json.Marshal(*area) if err != nil { log.Error(err.Error()) - return "" + return "nil" } return string(jsonInfo) } func convertJsonToPolygon(jsonInfo string) *Polygon { var obj Polygon - if jsonInfo != "" { // Empty string is processed as an empty array + if jsonInfo != "nil" { // nil string is processed as an empty array err := json.Unmarshal([]byte(jsonInfo), &obj) if err != nil { log.Error(err.Error()) return nil } + return &obj } - return &obj + + return nil } func convertCivicAddressElementToJson(civicAddressElement *CivicAddressElement) string { if civicAddressElement == nil { // This is not an error - return "" + return "nil" } jsonInfo, err := json.Marshal(*civicAddressElement) if err != nil { log.Error(err.Error()) - return "" + return "nil" } + return string(jsonInfo) } func convertJsonToCivicAddressElement(jsonInfo string) *CivicAddressElement { var obj CivicAddressElement - if jsonInfo != "" { // Empty string is processed as an empty array + if jsonInfo != "nil" { // nil string is processed as an empty array err := json.Unmarshal([]byte(jsonInfo), &obj) if err != nil { log.Error(err.Error()) return nil } + return &obj } - return &obj + + return nil } func convertApplicationListToJson(applicationList *ApplicationList) string { if applicationList == nil { // This is not an error - return "" + return "nil" } jsonInfo, err := json.Marshal(*applicationList) if err != nil { log.Error(err.Error()) - return "" + return "nil" } + return string(jsonInfo) } func convertJsonToApplicationList(jsonInfo string) *ApplicationList { var obj ApplicationList - if jsonInfo != "" { // Empty string is processed as an empty array + if jsonInfo != "nil" { // nil string is processed as an empty array err := json.Unmarshal([]byte(jsonInfo), &obj) if err != nil { log.Error(err.Error()) return nil } + return &obj } - return &obj + + return nil } func NilToEmptyString(s *string) string { if s == nil { - return "" + return "nil" } return *s } -func EmptyToNilString(s *string) *string { - if s != nil && *s == "" { +func EmptyToNilString(s string) *string { + if s == "nil" { return nil } - return s + r := new(string) + *r = s + + return r } func NilToEmptyUri(s *Uri) Uri { if s == nil { - return "" + return "nil" + } + + return *s +} + +func EmptyToNilUInt32(s int) *uint32 { + if s == math.MaxUint32 { + return nil + } + + u := new(uint32) + *u = uint32(s) + return u +} + +func NilToEmptyUInt32(s *uint32) uint32 { + if s == nil { + return math.MaxUint32 } return *s } func EmptyToNilUri(s *Uri) *Uri { - if s != nil && *s == "" { + if s != nil && *s == "nil" { return nil } diff --git a/go-packages/meep-dai-mgr/docker.go b/go-packages/meep-dai-mgr/docker.go index 5329d020ad031cc06851e92001d721b2bbcd123f..6cd68af0b6e5baff13988d4ac9312eb30a2abb76 100644 --- a/go-packages/meep-dai-mgr/docker.go +++ b/go-packages/meep-dai-mgr/docker.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-mgr/exec.go b/go-packages/meep-dai-mgr/exec.go index a89bbc43a667ea848e9d5399cf235fb446bc6f88..6e2a5569e9dca8e9cad422cbe7f133ad58008287 100644 --- a/go-packages/meep-dai-mgr/exec.go +++ b/go-packages/meep-dai-mgr/exec.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-mgr/format.go b/go-packages/meep-dai-mgr/format.go index 892524e2779bf35f1799966264d597c0b3f19f8c..a8cebaac074504b36fadcc4cd6619d06742da287 100644 --- a/go-packages/meep-dai-mgr/format.go +++ b/go-packages/meep-dai-mgr/format.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/go-packages/meep-dai-mgr/go.mod b/go-packages/meep-dai-mgr/go.mod index 9fbbea5721ed0b13dd18c27c755b3d9cee7ceeea..4685a7feeb3330a0b7f7c30c4e8f1f92631e94ce 100644 --- a/go-packages/meep-dai-mgr/go.mod +++ b/go-packages/meep-dai-mgr/go.mod @@ -7,6 +7,7 @@ require ( github.com/google/uuid v1.3.0 github.com/lib/pq v1.10.6 github.com/spf13/cobra v1.5.0 + github.com/hashicorp/go-memdb v1.3.4 ) replace ( diff --git a/go-packages/meep-dai-mgr/go.sum b/go-packages/meep-dai-mgr/go.sum index 366f6ccce79d714b400aaf0c2a11790cf3c7486e..253e522eaa99e6fa1e2dda6d5ea939f984212aec 100644 --- a/go-packages/meep-dai-mgr/go.sum +++ b/go-packages/meep-dai-mgr/go.sum @@ -5,6 +5,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-immutable-radix v1.3.0 h1:8exGP7ego3OmkfksihtSouGMZ+hQrhxx+FVELeXpVPE= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= +github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= diff --git a/go-packages/meep-dai-mgr/meep-dai-mgr.go b/go-packages/meep-dai-mgr/meep-dai-mgr.go index b118605e6c96fbf8da181e2664bb03eda2c63f08..88500fdd1231eb5ee5e8c4a13d3cb5bfa5cfc403 100644 --- a/go-packages/meep-dai-mgr/meep-dai-mgr.go +++ b/go-packages/meep-dai-mgr/meep-dai-mgr.go @@ -24,29 +24,19 @@ package meepdaimgr import ( "bytes" - "database/sql" "errors" "io/ioutil" "os" "os/exec" "strconv" "strings" + "time" log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" - _ "github.com/lib/pq" -) - -// DB Config -const ( - DbHost = "meep-postgis.default.svc.cluster.local" - DbPort = "5432" - DbUser = "" - DbPassword = "" - DbDefault = "postgres" - - DbMaxRetryCount int = 2 + uuid "github.com/google/uuid" + memdb "github.com/hashicorp/go-memdb" ) // Enable profiling @@ -54,110 +44,140 @@ const profiling = false var profilingTimers map[string]time.Time -// Tables fields name -const ( - FieldContextId = "contextId" - FieldAssociateDevAppId = "associateDevAppId" - FieldCallbackReference = "callbackReference" - FieldAppLocationUpdates = "appLocationUpdates" - FieldAppAutoInstantiation = "appAutoInstantiation" - FieldAppInfo = "appInfo" - FieldAppDId = "appDId" - FieldAppName = "appName" - FieldAppProvider = "appProvider" - FieldAppSoftVersion = "appSoftVersion" - FieldAppDVersion = "appDVersion" - FieldAppDescription = "appDescription" - FieldCmd = "cmd" - FieldArgs = "args" - FieldUserAppInstanceInfo = "userAppInstanceInfo" - FieldAppPackageSource = "appPackageSource" - FieldAppInstanceId = "appInstanceId" - FieldReferenceURI = "referenceURI" - FieldAppLocation = "appLocation" - FieldArea = "area" - FieldCivicAddressElement = "civicAddressElement" - FieldCountryCode = "countryCode" - FieldCoordinates = "coordinates" -) - type Uri string // ETSI GS MEC 016 Clause Table 6.2.2-1: Definition of type ApplicationList type ApplicationList struct { - AppList []AppList `json:"appList"` -} - -// ETSI GS MEC 016 Clause Table 6.2.2-1: Definition of type ApplicationList -type AppList struct { - AppInfoList []AppInfoList `json:"appInfoList"` - vendorSpecificExt *VendorSpecificExt `json:"vendorSpecificExt,omitempty"` + AppList []AppInfo + VendorSpecificExt *VendorSpecificExt } type VendorSpecificExt struct { - vendorId string `json:"vendorId"` + VendorId string } // ETSI GS MEC 016 Clause Table 6.2.2-1: Definition of type ApplicationList -type AppInfoList struct { - AppDId string `json:"appDId,omitempty"` - AppName string `json:"appName"` - AppProvider string `json:"appProvider"` - AppSoftVersion string `json:"appSoftVersion,omitempty"` - AppDVersion string `json:"appDVersion"` - AppDescription string `json:"appDescription,omitempty"` - AppLocation LocationConstraints `json:"appLocation,omitempty"` - AppCharcs []AppCharcs `json:"appCharcs,omitempty"` - Cmd string `json:"cmd"` // Non standard entry - Args []string `json:"args,omitempty"` // Non standard entry +type AppInfo struct { + AppDId string + AppName string + AppProvider string + AppSoftVersion string + AppDVersion string + AppDescription string + AppLocation *[]LocationConstraintsItem + AppCharcs *AppCharcs +} + +type AppInfoTable struct { + id int + AppDId string + AppName string + AppProvider string + AppSoftVersion string + AppDVersion string + AppDescription string } // ETSI GS MEC 016 Clause Table 6.2.2-1: Definition of type ApplicationList type AppCharcs struct { - Memory *uint32 `json:"memory,omitempty"` - Storage *uint32 `json:"storage,omitempty"` - Latency *uint32 `json:"latency,omitempty"` - Bandwidth *uint32 `json:"bandwidth,omitempty"` - ServiceCont *uint32 `json:"serviceCont,omitempty"` + Memory *uint32 + Storage *uint32 + Latency *uint32 + Bandwidth *uint32 + ServiceCont *uint32 +} + +type AppCharcsTable struct { + id int + AppDId string + Memory int + Storage int + Latency int + Bandwidth int + ServiceCont int } // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext type AppContext struct { - ContextId *string //Uniquely identifies the application context in the MEC system - AssociateDevAppId string // Uniquely identifies the device application + ContextId string // Uniquely identifies the application context in the MEC system + AssociateDevAppId string // Uniquely identifies the device application + CallbackReference *Uri + AppLocationUpdates bool + AppAutoInstantiation bool + AppInfo AppInfoContext +} + +type AppContextTable struct { + id int + ContextId string // Uniquely identifies the application context in the MEC system + AssociateDevAppId string // Uniquely identifies the device application CallbackReference Uri AppLocationUpdates bool AppAutoInstantiation bool - AppInfo AppInfo + AppDId string } // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext -type AppInfo struct { - AppDId *string +type AppInfoContext struct { + AppDId string AppName string AppProvider string AppSoftVersion *string AppDVersion string - AppDescription string + AppDescription *string UserAppInstanceInfo UserAppInstanceInfo - AppPackageSource *Uri +} + +type AppInfoContextTable struct { + id int + ContextId string // Uniquely identifies the application context in the MEC system + AppDId string + AppName string + AppProvider string + AppSoftVersion string + AppDVersion string + AppDescription string } // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext type UserAppInstanceInfo []UserAppInstanceInfoItem type UserAppInstanceInfoItem struct { - AppInstanceId *string - ReferenceURI *Uri - AppLocation LocationConstraints + AppInstanceId string + ReferenceURI Uri + AppLocation *LocationConstraintsItem +} + +type AppLocationTable struct { + id int + AppInstanceId string + Area string + CivicAddressElement string + CountryCode string +} + +type UserAppInstanceInfoItemTable struct { + id int + AppDId string + AppInstanceId string + ReferenceURI Uri } // ETSI GS MEC 016 Clause 6.5.2 Type: LocationConstraints type LocationConstraints []LocationConstraintsItem type LocationConstraintsItem struct { - Area *Polygon `json:"area,omitempty"` - CivicAddressElement *CivicAddressElement `json:"civicAddressElement,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` + Area *Polygon + CivicAddressElement *CivicAddressElement + CountryCode *string +} + +type LocationConstraintsTable struct { + id int + AppDId string + Area string + CivicAddressElement string + CountryCode string } + type Polygon struct { Coordinates [][][]float32 `json:"coordinates"` } @@ -169,8 +189,8 @@ type CivicAddressElementItem struct { // ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability type ApplicationLocationAvailability struct { - AppInfo *ApplicationLocationAvailabilityAppInfo AssociateDevAppId string + AppInfo ApplicationLocationAvailabilityAppInfo } // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext @@ -180,16 +200,26 @@ type ApplicationLocationAvailabilityAppInfo struct { AppSoftVersion *string AppDVersion string AppDescription string - AvailableLocations AvailableLocations + AvailableLocations *[]AvailableLocationsItem AppPackageSource *Uri } +type ApplicationLocationAvailabilityAppInfoTable struct { + id int + AppName string + AppProvider string + AppSoftVersion string + AppDVersion string + AppDescription string + AppPackageSource Uri +} + // ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability type AvailableLocations []AvailableLocationsItem // ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability type AvailableLocationsItem struct { - AppLocation *LocationConstraints + AppLocation *LocationConstraintsItem } type AppExecEntry struct { @@ -202,49 +232,25 @@ var appExecEntries map[int]AppExecEntry = make(map[int]AppExecEntry) // DAI confioguration type DaiCfg struct { - Name string - Namespace string - User string - Pwd string - Host string - Port string NotifyAppContextDeletion func(string, string) } // DAI Manager type DaiMgr struct { - name string - namespace string - user string - pwd string - host string - port string - dbName string - db *sql.DB - connected bool + db *memdb.MemDB + schema *memdb.DBSchema tickerStarted bool updateCb func(string) } -// DB Table Names -const ( - AppContextTable = "app_context" - AppInfoTable = "app_info" - UserAppInstanceInfoTable = "user_app_instance_info" - LocationConstraintsTable = "location_constraints" - AvailableLocationsTable = "available_locations" - ApplicationLocationAvailabilityTable = "application_location_availability" - AppInfoListTable = "app_info_list" - AppInfoListLocationConstraintsTable = "app_info_list_location_constraints" - AppCharcsTable = "app_charcs" -) - var daiMgr *DaiMgr var appContexts map[string]AppContext = make(map[string]AppContext) var notifyAppContextDeletion func(string, string) var processCheckExpiry time.Duration = 5 * time.Second var processCheckTicker *time.Ticker +var dbId int = 0 + // Profiling init func init() { if profiling { @@ -254,58 +260,16 @@ func init() { // NewDaiMgr - Creates and initializes a new DAI Manager func NewDaiMgr(cfg DaiCfg) (am *DaiMgr, err error) { - if cfg.Name == "" { - err = errors.New("Missing connector name") - return nil, err - } + log.Debug(">>> NewDaiMgr: ", cfg) // Create new Asset Manager am = new(DaiMgr) - am.name = cfg.Name - if cfg.Namespace != "" { - am.namespace = cfg.Namespace - } else { - am.namespace = "default" - } - am.user = cfg.User - am.pwd = cfg.Pwd - am.host = cfg.Host - am.port = cfg.Port - - // Connect to Postgis DB - for retry := 0; retry <= DbMaxRetryCount; retry++ { - am.db, err = am.connectDB("", am.user, am.pwd, am.host, am.port) - if err == nil { - break - } - } - if err != nil { - log.Error("Failed to connect to postgis DB with err: ", err.Error()) - return nil, err - } - log.Info("Postgis Connector successfully created") - am.connected = true - defer am.db.Close() - - // Create sandbox DB if it does not exist - // Use format: '_' & replace dashes with underscores - am.dbName = strings.ToLower(strings.Replace(cfg.Namespace+"_"+cfg.Name, "-", "_", -1)) - - // Ignore DB creation error in case it already exists. - // Failure will occur at DB connection if DB was not successfully created. - _ = am.CreateDb(am.dbName) - // Close connection to postgis DB - _ = am.db.Close() - - // Connect with sandbox-specific DB - am.db, err = am.connectDB(am.dbName, cfg.User, cfg.Pwd, cfg.Host, cfg.Port) + err = am.createDb() if err != nil { - log.Error("Failed to connect to sandbox DB with err: ", err.Error()) + log.Error(err.Error()) return nil, err } - log.Info("Postgis Connector successfully created") - am.connected = true // Start process checking timer am.tickerStarted = cfg.NotifyAppContextDeletion != nil @@ -320,39 +284,6 @@ func NewDaiMgr(cfg DaiCfg) (am *DaiMgr, err error) { return am, nil } -func (am *DaiMgr) connectDB(dbName, user, pwd, host, port string) (db *sql.DB, err error) { - // Set default values if none provided - if dbName == "" { - dbName = DbDefault - } - if host == "" { - host = DbHost - } - if port == "" { - port = DbPort - } - log.Debug("Connecting to Postgis DB [", dbName, "] at addr [", host, ":", port, "]") - - // Open postgis DB - connStr := "user=" + user + " password=" + pwd + " dbname=" + dbName + " host=" + host + " port=" + port + " sslmode=disable" - db, err = sql.Open("postgres", connStr) - if err != nil { - log.Warn("Failed to connect to Postgis DB with error: ", err.Error()) - return nil, err - } - - // Make sure connection is up - err = db.Ping() - if err != nil { - log.Warn("Failed to ping Postgis DB with error: ", err.Error()) - db.Close() - return nil, err - } - - log.Info("Connected to Postgis DB [", dbName, "]") - return db, nil -} - func (am *DaiMgr) SetListener(listener func(string)) error { am.updateCb = listener return nil @@ -366,219 +297,345 @@ func (am *DaiMgr) notifyListener(assetName string) { // DeleteDaiMgr - func (am *DaiMgr) DeleteDaiMgr() (err error) { + am.schema = nil + am.db = nil + return nil +} - if am.tickerStarted { - stopProcessCheckTicker() - } +// createDb -- Create new DB with provided name +func (am *DaiMgr) createDb() (err error) { + log.Debug(">>> createDb") - if am.db == nil { - err = errors.New("Asset Manager database not initialized") + // Sanity checks + if am.db != nil { + err = errors.New("DB already exist, cannot create a new one") log.Error(err.Error()) return err } - // Close connection to sandbox-specific DB - _ = am.db.Close() - - // Connect to Postgis DB - am.db, err = am.connectDB("", am.user, am.pwd, am.host, am.port) - if err != nil { - log.Error("Failed to connect to postgis DB with err: ", err.Error()) - return err - } - defer am.db.Close() - - // Destroy sandbox database - _ = am.DestroyDb(am.dbName) - - return nil -} - -// CreateDb -- Create new DB with provided name -func (am *DaiMgr) CreateDb(name string) (err error) { - _, err = am.db.Exec("CREATE DATABASE " + name) + err = am.createTables() if err != nil { log.Error(err.Error()) + am.schema = nil return err } - log.Info("Created database: " + name) - return nil -} - -// DestroyDb -- Destroy DB with provided name -func (am *DaiMgr) DestroyDb(name string) (err error) { - _, err = am.db.Exec("DROP DATABASE " + name) + // Create a new data base + am.db, err = memdb.NewMemDB(am.schema) if err != nil { log.Error(err.Error()) + am.schema = nil return err } - log.Info("Destroyed database: " + name) + log.Info("Created database") return nil } -func (am *DaiMgr) CreateTables() (err error) { - _, err = am.db.Exec("CREATE EXTENSION IF NOT EXISTS postgis") +func (am *DaiMgr) createTables() (err error) { + log.Debug(">>> createTables") + + am.schema = &memdb.DBSchema{ + Tables: map[string]*memdb.TableSchema{ + "AppInfoTable": &memdb.TableSchema{ // AppInfoList Table + // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt + Name: "AppInfoTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + "AppName": &memdb.IndexSchema{ + Name: "AppName", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppName"}, + }, + "AppProvider": &memdb.IndexSchema{ + Name: "AppProvider", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppProvider"}, + }, + "AppSoftVersion": &memdb.IndexSchema{ + Name: "AppSoftVersion", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppSoftVersion"}, + }, + "AppDVersion": &memdb.IndexSchema{ + Name: "AppDVersion", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDVersion"}, + }, + "AppDescription": &memdb.IndexSchema{ + Name: "AppDescription", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDescription"}, + }, + }, + }, + "LocationConstraintsTable": &memdb.TableSchema{ // UserAppInstanceInfo Table + // Warning: appInstanceId shall be present + Name: "LocationConstraintsTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + "Area": &memdb.IndexSchema{ + Name: "Area", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "Area"}, + }, + "CivicAddressElement": &memdb.IndexSchema{ + Name: "CivicAddressElement", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "CivicAddressElement"}, + }, + "CountryCode": &memdb.IndexSchema{ + Name: "CountryCode", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "CountryCode"}, + }, + }, + }, + "AppCharcsTable": &memdb.TableSchema{ // AppCharcs Table + Name: "AppCharcsTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + "Memory": &memdb.IndexSchema{ + Name: "Memory", + Unique: false, + Indexer: &memdb.IntFieldIndex{Field: "Memory"}, + }, + "Storage": &memdb.IndexSchema{ + Name: "Storage", + Unique: false, + Indexer: &memdb.IntFieldIndex{Field: "Storage"}, + }, + "Latency": &memdb.IndexSchema{ + Name: "Latency", + Unique: false, + Indexer: &memdb.IntFieldIndex{Field: "Latency"}, + }, + "Bandwidth": &memdb.IndexSchema{ + Name: "Bandwidth", + Unique: false, + Indexer: &memdb.IntFieldIndex{Field: "Bandwidth"}, + }, + "ServiceCont": &memdb.IndexSchema{ + Name: "ServiceCont", + Unique: false, + Indexer: &memdb.IntFieldIndex{Field: "ServiceCont"}, + }, + }, + }, + "UserAppInstanceInfoItemTable": &memdb.TableSchema{ // UserAppInstanceInfo + // Warning: appInstanceId shall be present + Name: "UserAppInstanceInfoItemTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + "AppInstanceId": &memdb.IndexSchema{ + Name: "AppInstanceId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppInstanceId"}, + }, + "ReferenceURI": &memdb.IndexSchema{ + Name: "ReferenceURI", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "ReferenceURI"}, + }, + }, + }, + "AppLocationTable": &memdb.TableSchema{ // UserAppInstanceInfo + // Warning: appInstanceId shall be present + Name: "AppLocationTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "AppInstanceId": &memdb.IndexSchema{ + Name: "AppInstanceId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppInstanceId"}, + }, + "Area": &memdb.IndexSchema{ + Name: "Area", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "Area"}, + }, + "CivicAddressElement": &memdb.IndexSchema{ + Name: "CivicAddressElement", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "CivicAddressElement"}, + }, + "CountryCode": &memdb.IndexSchema{ + Name: "CountryCode", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "CountryCode"}, + }, + }, + }, + "AppContextTable": &memdb.TableSchema{ // AppContext Table + // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt + Name: "AppContextTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "ContextId": &memdb.IndexSchema{ + Name: "ContextId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "ContextId"}, + }, + "AssociateDevAppId": &memdb.IndexSchema{ + Name: "AssociateDevAppId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AssociateDevAppId"}, + }, + "CallbackReference": &memdb.IndexSchema{ + Name: "CallbackReference", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "CallbackReference"}, + }, + "AppLocationUpdates": &memdb.IndexSchema{ + Name: "AppLocationUpdates", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppLocationUpdates"}, + }, + "AppAutoInstantiation": &memdb.IndexSchema{ + Name: "AppAutoInstantiation", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppAutoInstantiation"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + }, + }, + "AppInfoContextTable": &memdb.TableSchema{ // AppInfo Table + // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt + Name: "AppInfoContextTable", + Indexes: map[string]*memdb.IndexSchema{ + "id": &memdb.IndexSchema{ + Name: "id", + Unique: true, + Indexer: &memdb.IntFieldIndex{Field: "id"}, + }, + "ContextId": &memdb.IndexSchema{ + Name: "ContextId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "ContextId"}, + }, + "AppDId": &memdb.IndexSchema{ + Name: "AppDId", + Unique: true, + Indexer: &memdb.StringFieldIndex{Field: "AppDId"}, + }, + "AppName": &memdb.IndexSchema{ + Name: "AppName", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppName"}, + }, + "AppProvider": &memdb.IndexSchema{ + Name: "AppProvider", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppProvider"}, + }, + "AppSoftVersion": &memdb.IndexSchema{ + Name: "AppSoftVersion", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppSoftVersion"}, + }, + "AppDVersion": &memdb.IndexSchema{ + Name: "AppDVersion", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDVersion"}, + }, + "AppDescription": &memdb.IndexSchema{ + Name: "AppDescription", + Unique: false, + Indexer: &memdb.StringFieldIndex{Field: "AppDescription"}, + }, + }, + }, + }, + } + + err = am.schema.Validate() if err != nil { + am.schema = nil log.Error(err.Error()) return err } - // AppContext - // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt - _, err = am.db.Exec(`CREATE TABLE ` + AppContextTable + ` ( - contextId varchar(32) NOT NULL UNIQUE, - associateDevAppId varchar(32) NOT NULL UNIQUE, - callbackReference varchar(256) NOT NULL DEFAULT '', - appLocationUpdates boolean NOT NULL DEFAULT 'false', - appAutoInstantiation boolean NOT NULL DEFAULT 'false', - appDId varchar(32) NOT NULL UNIQUE, - PRIMARY KEY (contextId) - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", AppContextTable) - - // AppInfo Table - // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt - _, err = am.db.Exec(`CREATE TABLE ` + AppInfoTable + ` ( - appDId varchar(32) NOT NULL UNIQUE, - appName varchar(32) NOT NULL DEFAULT '', - appProvider varchar(32) NOT NULL DEFAULT '', - appSoftVersion varchar(32) NOT NULL DEFAULT '', - appDVersion varchar(32) NOT NULL DEFAULT '', - appDescription varchar(256) NOT NULL DEFAULT '', - appPackageSource varchar(256) NOT NULL DEFAULT '', - PRIMARY KEY (appDId), - FOREIGN KEY (appDId) REFERENCES ` + AppContextTable + `(appDId) ON DELETE CASCADE - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", AppInfoTable) - - // UserAppInstanceInfo Table - // Warning: appInstanceId shall be present - _, err = am.db.Exec(`CREATE TABLE ` + UserAppInstanceInfoTable + ` ( - appDId varchar(32) NOT NULL, - appInstanceId varchar(32) NOT NULL UNIQUE, - referenceURI varchar(256) NOT NULL DEFAULT '', - PRIMARY KEY (appInstanceId), - FOREIGN KEY (appDId) REFERENCES ` + AppInfoTable + `(appDId) ON DELETE CASCADE - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", UserAppInstanceInfoTable) - - // LocationConstraintsTable Table - // Warning: appInstanceId shall be present - _, err = am.db.Exec(`CREATE TABLE ` + LocationConstraintsTable + ` ( - appInstanceId varchar(32) UNIQUE, - appDId varchar(32) NOT NULL DEFAULT '', - area varchar(1024) NOT NULL DEFAULT '', - civicAddressElement varchar(256) NOT NULL DEFAULT '', - countryCode varchar(256) NOT NULL DEFAULT '', - PRIMARY KEY (appInstanceId), - FOREIGN KEY (appDId) REFERENCES ` + AppInfoTable + `(appDId) ON DELETE CASCADE - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", ApplicationLocationAvailabilityTable) - - // AppInfoList Table - _, err = am.db.Exec(`CREATE TABLE ` + AppInfoListTable + ` ( - appDId varchar(32) UNIQUE, - appName varchar(32) NOT NULL DEFAULT '', - appProvider varchar(32) NOT NULL DEFAULT '', - appSoftVersion varchar(32) NOT NULL DEFAULT '', - appDVersion varchar(32) NOT NULL DEFAULT '', - appDescription varchar(256) NOT NULL DEFAULT '', - cmd varchar(256) DEFAULT '', - args varchar(256) DEFAULT '', - PRIMARY KEY (appDId) - )`) // FIXME Fields image and cmd are used to support basic of onboarded applications - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", AppInfoListTable) - - // AppInfoListLocationConstraintsTable Table - _, err = am.db.Exec(`CREATE TABLE ` + AppInfoListLocationConstraintsTable + ` ( - appDId varchar(32) NOT NULL DEFAULT '', - area varchar(1024) NOT NULL DEFAULT '', - civicAddressElement varchar(256) NOT NULL DEFAULT '', - countryCode varchar(256) NOT NULL DEFAULT '', - FOREIGN KEY (appDId) REFERENCES ` + AppInfoListTable + `(appDId) ON DELETE CASCADE - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", ApplicationLocationAvailabilityTable) - - // AppCharcsTable Table - _, err = am.db.Exec(`CREATE TABLE ` + AppCharcsTable + ` ( - appDId varchar(32) DEFAULT '', - memory integer DEFAULT '0', - storage integer DEFAULT '0', - latency integer DEFAULT '0', - bandwidth integer DEFAULT '0', - serviceCont integer DEFAULT '0', - PRIMARY KEY (appDId), - FOREIGN KEY (appDId) REFERENCES ` + AppInfoListTable + `(appDId) ON DELETE CASCADE - )`) - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Created DAI table: ", AppCharcsTable) - return nil } -// DeleteTables - Delete all postgis tables -func (am *DaiMgr) DeleteTables() (err error) { - _ = am.DeleteTable(AppContextTable) - _ = am.DeleteTable(AppInfoTable) - _ = am.DeleteTable(UserAppInstanceInfoTable) - _ = am.DeleteTable(LocationConstraintsTable) - _ = am.DeleteTable(AvailableLocationsTable) - _ = am.DeleteTable(ApplicationLocationAvailabilityTable) - _ = am.DeleteTable(AppInfoListTable) - _ = am.DeleteTable(AppInfoListLocationConstraintsTable) - _ = am.DeleteTable(AppCharcsTable) +// deleteTables - Delete all postgis tables +func (am *DaiMgr) deleteTables() (err error) { + _ = am.deleteTable("AppContextTable") + _ = am.deleteTable("AppInfoContextTable") + _ = am.deleteTable("UserAppInstanceInfoTable") + _ = am.deleteTable("LocationConstraintsTable") + _ = am.deleteTable("AvailableLocationsTable") + _ = am.deleteTable("ApplicationLocationAvailabilityTable") + _ = am.deleteTable("AppInfoTable") + _ = am.deleteTable("AppCharcsTable") return nil } -// DeleteTable - Delete postgis table with provided name -func (am *DaiMgr) DeleteTable(tableName string) (err error) { - result, err := am.db.Exec("DROP TABLE IF EXISTS " + tableName + " CASCADE") +// deleteTable - Delete postgis table with provided name +func (am *DaiMgr) deleteTable(tableName string) (err error) { + txn := am.db.Txn(true) + err = txn.Delete(tableName, "AppDId") if err != nil { log.Error(err.Error()) return err } - rowCnt, err := result.RowsAffected() - if err != nil { - log.Error(err.Error()) - return err - } - log.Info("Deleted table: " + tableName + " - #rows: " + strconv.Itoa(int(rowCnt))) + txn.Commit() + return nil } -// DeleteAppInfoList - Delete DeleteAppContextTable entry -func (am *DaiMgr) DeleteAppInfoList(appDId string) (err error) { +// DeleteAppInfoRecord - Delete DeleteAppContextTable entry +func (am *DaiMgr) DeleteAppInfoRecord(appDId string) (err error) { if profiling { - profilingTimers["DeleteAppInfoList"] = time.Now() + profilingTimers["DeleteAppInfoRecord"] = time.Now() } // Validate input @@ -587,43 +644,67 @@ func (am *DaiMgr) DeleteAppInfoList(appDId string) (err error) { return err } - result, err := am.db.Exec(`DELETE FROM `+AppInfoListTable+` WHERE name = ($1)`, appDId) + txn := am.db.Txn(true) + err = txn.Delete("AppInfoTable", AppInfoTable{AppDId: appDId}) if err != nil { + txn.Abort() log.Error(err.Error()) return err } - rowCnt, err := result.RowsAffected() + _, err = txn.DeleteAll("LocationConstraintsTable", "AppDId", appDId) if err != nil { + txn.Abort() log.Error(err.Error()) return err } - if rowCnt == 0 { - return errors.New("ContextId not found") + _, err = txn.DeleteAll("AppCharcsTable", "id") + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err } + txn.Commit() if profiling { now := time.Now() - log.Debug("DeleteAppInfoList: ", now.Sub(profilingTimers["DeleteAppInfoList"])) + log.Debug("DeleteAppInfoRecord: ", now.Sub(profilingTimers["DeleteAppInfoRecord"])) } + return nil } // DeleteAppContext - Delete all DeleteAppContextTable entries -func (am *DaiMgr) DeleteAllAppInfoList() (err error) { +func (am *DaiMgr) DeleteAllAppInfoRecord() (err error) { if profiling { - profilingTimers["DeleteAllAppInfoList"] = time.Now() + profilingTimers["DeleteAllAppInfoRecord"] = time.Now() } - _, err = am.db.Exec(`DELETE FROM ` + AppInfoListTable) + txn := am.db.Txn(true) + _, err = txn.DeleteAll("AppInfoTable", "id") if err != nil { + txn.Abort() log.Error(err.Error()) return err } + _, err = txn.DeleteAll("LocationConstraintsTable", "id") + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + _, err = txn.DeleteAll("AppCharcsTable", "id") + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + txn.Commit() if profiling { now := time.Now() - log.Debug("DeleteAllAppInfoList: ", now.Sub(profilingTimers["DeleteAllAppInfoList"])) + log.Debug("DeleteAllAppInfoRecord: ", now.Sub(profilingTimers["DeleteAllAppInfoRecord"])) } + return nil } @@ -639,35 +720,56 @@ func (am *DaiMgr) DeleteAppContext(appContextId string) (err error) { return err } - // Whe deleting the context, un-instantiate the application - // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt - // Un-instantiate the MEC application process - pid, err := strconv.ParseInt(appContextId, 10, 64) // FIXME To be enhanced to get outputs + // // Whe deleting the context, un-instantiate the application + // // TODO meep-dai-mgr could be partially enhanced with MEC-10-2 Clauses 6.2.1.2 Type: AppD and Lifecycle Mgmt + // // Un-instantiate the MEC application process + // pid, err := strconv.ParseInt(appContextId, 10, 64) // FIXME To be enhanced to get outputs + // if err != nil { + // log.Error(err.Error()) + // return err + // } + // // TODO Check if the process is running + + // terminatePidProcess(int(pid)) + // log.Debug("Just terminated subprocess ", strconv.Itoa(int(pid))) + // // Delete entries + // delete(appExecEntries, int(pid)) + // delete(appContexts, strconv.Itoa(int(pid))) + + txn := am.db.Txn(false) + raw, err := txn.First("AppContextTable", "ContextId", appContextId) if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + txn.Abort() + if raw == nil { + err = errors.New("Wrong ContextId") log.Error(err.Error()) return err } - // TODO Check if the process is running - - terminatePidProcess(int(pid)) - log.Debug("Just terminated subprocess ", strconv.Itoa(int(pid))) - // Delete entries - delete(appExecEntries, int(pid)) - delete(appContexts, strconv.Itoa(int(pid))) - result, err := am.db.Exec(`DELETE FROM `+AppContextTable+` WHERE contextId = ($1)`, appContextId) + txn = am.db.Txn(true) + err = txn.Delete("AppContextTable", AppContextTable{id: raw.(*AppContextTable).id}) // BUG Unable to delete record based on ContextId if err != nil { + txn.Abort() log.Error(err.Error()) return err } - rowCnt, err := result.RowsAffected() + _, err = txn.DeleteAll("AppInfoContextTable", "ContextId", appContextId) if err != nil { + txn.Abort() log.Error(err.Error()) return err } - if rowCnt == 0 { - return errors.New("ContextId not found") + _, err = txn.DeleteAll("UserAppInstanceInfoItemTable", "AppDId", raw.(*AppContextTable).AppDId) + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err } + txn.Commit() // Notify listener am.notifyListener(appContextId) @@ -687,16 +789,32 @@ func (am *DaiMgr) DeleteAllAppContext() (err error) { profilingTimers["DeleteAllAppContext"] = time.Now() } - _, err = am.db.Exec(`DELETE FROM ` + AppContextTable) + txn := am.db.Txn(true) + _, err = txn.DeleteAll("AppContextTable", "ContextId") if err != nil { + txn.Abort() log.Error(err.Error()) return err } + _, err = txn.DeleteAll("AppInfoContextTable", "ContextId") + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + _, err = txn.DeleteAll("UserAppInstanceInfoItemTable", "AppDId") + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + txn.Commit() if profiling { now := time.Now() log.Debug("DeleteAllAppContext: ", now.Sub(profilingTimers["DeleteAllAppContext"])) } + return nil } @@ -712,9 +830,9 @@ func (am *DaiMgr) LoadOnboardedMecApplications(folder string) (err error) { log.Error(err.Error()) } else { for _, file := range files { + log.Info("LoadOnboardedMecApplications: Looping file ", file.Name()) if !file.IsDir() && strings.HasPrefix(file.Name(), "onboarded-demo") { // Hard-coded in HELM charts log.Info("LoadOnboardedMecApplications: Processing file ", file.Name()) - jsonFile, err := os.Open(folder + file.Name()) if err != nil { log.Error(err.Error()) @@ -726,204 +844,174 @@ func (am *DaiMgr) LoadOnboardedMecApplications(folder string) (err error) { log.Error(err.Error()) continue } - //log.Info("LoadOnboardedMecApplications: Converting ", string(byteValue)) + log.Info("LoadOnboardedMecApplications: Converting ", string(byteValue)) applicationList := convertJsonToApplicationList(string(byteValue)) if applicationList == nil { err = errors.New("Failed to convert file " + file.Name()) log.Error(err.Error()) continue } - if len(applicationList.AppList) == 0 || len(applicationList.AppList[0].AppInfoList) == 0 { + if len(applicationList.AppList) == 0 { err = errors.New("AppInfoList description is missing for " + file.Name()) log.Error(err.Error()) continue } - err = am.CreateAppEntry(applicationList.AppList[0].AppInfoList[0]) + err = am.CreateAppInfoRecord(applicationList.AppList[0]) if err != nil { log.Error(err.Error()) continue } - onboardedAppList.AppList = append(onboardedAppList.AppList, applicationList.AppList[0]) } } // End of 'for' statement } - if len(onboardedAppList.AppList) == 0 { log.Error("No onboarded MEC application found") } - log.Info("Created onboarded user application") + return nil } -func (am *DaiMgr) CreateAppEntry(appInfoList AppInfoList) (err error) { +func (am *DaiMgr) CreateAppInfoRecord(appInfo AppInfo) (err error) { + log.Info(">>> CreateAppInfoRecord: ", appInfo) + if profiling { - profilingTimers["CreateAppEntry"] = time.Now() + profilingTimers["CreateAppInfoRecord"] = time.Now() } // Sanity checks - if appInfoList.AppDId == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppDId == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppDId") } - if appInfoList.AppName == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppName == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppName") } - if appInfoList.AppProvider == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppProvider == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppProvider") } - if appInfoList.AppSoftVersion == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppSoftVersion == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppSoftVersion") } - if appInfoList.AppDVersion == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppDVersion == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppDVersion") } - if appInfoList.AppDescription == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + if appInfo.AppDescription == "" { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList return errors.New("Missing AppDescription") } - if len(appInfoList.AppCharcs) > 1 { // ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList - return errors.New("Too many entries in AppCharcs") - } - - // Create AppInfoList entries - query := `INSERT INTO ` + AppInfoListTable + ` (appDId, appName, appProvider, appSoftVersion, appDVersion, appDescription, cmd, args) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)` - _, err = am.db.Exec( - query, - appInfoList.AppDId, - appInfoList.AppName, - appInfoList.AppProvider, - appInfoList.AppSoftVersion, - appInfoList.AppDVersion, - appInfoList.AppDescription, - appInfoList.Cmd, - strings.Join(appInfoList.Args, " "), - ) + + // Create AppInfo entry + txn := am.db.Txn(true) + newDbId := dbId + record := &AppInfoTable{newDbId, appInfo.AppDId, appInfo.AppName, appInfo.AppProvider, appInfo.AppSoftVersion, appInfo.AppDVersion, appInfo.AppDescription} + err = txn.Insert("AppInfoTable", record) if err != nil { - log.Error(err.Error(), " for ", appInfoList.AppDId) + txn.Abort() + log.Error(err.Error()) return err } - // Create AppInfoList.AppLocation entries if any - if len(appInfoList.AppLocation) != 0 { - for _, appLocation := range appInfoList.AppLocation { - // Create AppInfoListLocationConstraintsTable entries - query = `INSERT INTO ` + AppInfoListLocationConstraintsTable + ` (appDId, area, civicAddressElement, countryCode) VALUES ($1, $2, $3, $4)` - _, err = am.db.Exec(query, appInfoList.AppDId, convertPolygonToJson(appLocation.Area), convertCivicAddressElementToJson(appLocation.CivicAddressElement), NilToEmptyString(appLocation.CountryCode)) + newDbId += 1 + + // Create AppInfo.AppLocation entries if any + if appInfo.AppLocation != nil && len(*appInfo.AppLocation) != 0 { + for _, appLocation := range *appInfo.AppLocation { + record := &LocationConstraintsTable{newDbId, appInfo.AppDId, convertPolygonToJson(appLocation.Area), convertCivicAddressElementToJson(appLocation.CivicAddressElement), NilToEmptyString(appLocation.CountryCode)} + err = txn.Insert("LocationConstraintsTable", record) if err != nil { - am.DeleteAppInfoList(appInfoList.AppDId) + txn.Abort() log.Error(err.Error()) return err } + newDbId += 1 } // End of 'for' statement } - // Create AppInfoList.AppCharcs entries if any - if len(appInfoList.AppCharcs) != 0 { - for _, appCharcs := range appInfoList.AppCharcs { - // Create AppCharcsTable entries - query := `INSERT INTO ` + AppCharcsTable + ` (appDId, memory, storage, latency, bandwidth, serviceCont) VALUES ($1, $2, $3, $4, $5, $6)` - _, err = am.db.Exec( - query, - appInfoList.AppDId, - appCharcs.Memory, - appCharcs.Storage, - appCharcs.Latency, - appCharcs.Bandwidth, - appCharcs.ServiceCont, - ) - if err != nil { - am.DeleteAppInfoList(appInfoList.AppDId) - log.Error(err.Error()) - return err - } - } // End of 'for' statement + // Create AppInfo.AppCharcs entries if any + if appInfo.AppCharcs != nil { + record := &AppCharcsTable{newDbId, appInfo.AppDId, int(NilToEmptyUInt32(appInfo.AppCharcs.Memory)), int(NilToEmptyUInt32(appInfo.AppCharcs.Storage)), int(NilToEmptyUInt32(appInfo.AppCharcs.Latency)), int(NilToEmptyUInt32(appInfo.AppCharcs.Bandwidth)), int(NilToEmptyUInt32(appInfo.AppCharcs.ServiceCont))} + err = txn.Insert("AppCharcsTable", record) + if err != nil { + txn.Abort() + log.Error(err.Error()) + return err + } + newDbId += 1 } + txn.Commit() + dbId = newDbId if profiling { now := time.Now() - log.Debug("CreateAppEntry: ", now.Sub(profilingTimers["CreateAppEntry"])) + log.Debug("CreateAppInfoRecord: ", now.Sub(profilingTimers["CreateAppInfoRecord"])) } return nil } -func (am *DaiMgr) GetAppInfoListEntry(appDId string) (appInfoList *AppInfoList, err error) { +func (am *DaiMgr) GetAppInfoRecord(appDId string) (appInfo *AppInfo, err error) { if profiling { - profilingTimers["GetAppInfoListEntry"] = time.Now() + profilingTimers["GetAppInfoRecord"] = time.Now() } - // Create AppContext map - appInfoList = new(AppInfoList) - - var rows *sql.Rows - rows, err = am.db.Query( - `SELECT * FROM `+AppInfoListTable+` AS appInfoList `+ - `LEFT JOIN `+AppCharcsTable+` AS appCharcs `+ - `ON (appInfoList.appDId = appCharcs.appDId) `+ - `WHERE appInfoList.appDId = ($1)`, appDId) - if err != nil { + // Sanity check + if appDId == "" { + err = errors.New("Missing AppDId") log.Error(err.Error()) - return appInfoList, err + return nil, err } - defer rows.Close() - // Scan results - appInfoList = new(AppInfoList) - for rows.Next() { + txn := am.db.Txn(false) + defer txn.Abort() - appInfoList, err := am.processAppInfoListRecord(rows, appInfoList) - if err != nil { - log.Error(err.Error()) - return appInfoList, err - } - } // End of 'for' statement - if appInfoList == nil || appInfoList.AppName == "" { - err = errors.New("AppInfoList not found for appDId " + appDId) + raw, err := txn.First("AppInfoTable", "AppDId", appDId) + if err != nil { + log.Error(err.Error()) + return nil, err + } + if raw == nil { + err = errors.New("Wrong AppDId") + log.Error(err.Error()) + return nil, err + } + appInfo, err = am.processAppInfoRecord(txn, raw.(*AppInfoTable)) + if err != nil { + log.Error(err.Error()) return nil, err } if profiling { now := time.Now() - log.Debug("GetAppInfoListEntry: ", now.Sub(profilingTimers["GetAppInfoListEntry"])) + log.Debug("GetAppInfoRecord: ", now.Sub(profilingTimers["GetAppInfoRecord"])) } - return appInfoList, nil + return appInfo, nil } -func (am *DaiMgr) GetAllAppInfoListEntry() (appInfoList map[string]*AppInfoList, err error) { +func (am *DaiMgr) GetAllAppInfoRecord() (appInfoList map[string]*AppInfo, err error) { if profiling { - profilingTimers["GetAllAppInfoListEntry"] = time.Now() + profilingTimers["GetAllAppInfoRecord"] = time.Now() } - // Create AppContext map - appInfoList = make(map[string]*AppInfoList) + txn := am.db.Txn(false) + defer txn.Abort() - var rows *sql.Rows - rows, err = am.db.Query( - `SELECT * FROM ` + AppInfoListTable + ` AS appInfoList ` + - `LEFT JOIN ` + AppCharcsTable + ` AS appCharcs ` + - `ON (appInfoList.appDId = appCharcs.appDId)`) + it, err := txn.Get("AppInfoTable", "AppDId") if err != nil { log.Error(err.Error()) - return appInfoList, err + return nil, err } - defer rows.Close() - - // Scan results - for rows.Next() { + if it != nil { + // Create AppInfo map + appInfoList = make(map[string]*AppInfo) - appInfoListEntry := new(AppInfoList) - appInfoListEntry, err := am.processAppInfoListRecord(rows, appInfoListEntry) - if err != nil { - log.Error(err.Error()) - return appInfoList, err - } - // Get AppContext entry from UE map (create new entry if not found) - ac := appInfoList[appInfoListEntry.AppDId] - if ac == nil { - ac = appInfoListEntry - appInfoList[appInfoListEntry.AppDId] = ac - } + for obj := it.Next(); obj != nil; obj = it.Next() { + appInfo, err := am.processAppInfoRecord(txn, obj.(*AppInfoTable)) + if err != nil { + continue // Skip it + } + appInfoList[appInfo.AppDId] = appInfo + } // End of 'for' statement + } - } // End of 'for' statement if appInfoList == nil { err = errors.New("AppInfoList not found") return nil, err @@ -931,7 +1019,7 @@ func (am *DaiMgr) GetAllAppInfoListEntry() (appInfoList map[string]*AppInfoList, if profiling { now := time.Now() - log.Debug("GetAllAppInfoListEntry: ", now.Sub(profilingTimers["GetAllAppInfoListEntry"])) + log.Debug("GetAllAppInfoRecord: ", now.Sub(profilingTimers["GetAllAppInfoRecord"])) } return appInfoList, nil @@ -947,7 +1035,7 @@ func (am *DaiMgr) CreateAppContext(appContext *AppContext, remoteUrl string, san return nil, errors.New("CreateAppContext: Invalid input parameters") } app = appContext - if app.ContextId != nil { // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext. + if app.ContextId != "" { // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext. return nil, errors.New("ContextId shall not be set") } if app.AssociateDevAppId == "" { // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext. @@ -957,116 +1045,102 @@ func (am *DaiMgr) CreateAppContext(appContext *AppContext, remoteUrl string, san return nil, errors.New("Missing at least one UserAppInstanceInfo item") } for _, item := range app.AppInfo.UserAppInstanceInfo { - if item.AppInstanceId != nil { + if item.AppInstanceId != "" { return nil, errors.New("UserAppInstanceInfo.AppInstanceId shall not be set") } - if item.ReferenceURI != nil { + if item.ReferenceURI != "" { return nil, errors.New("UserAppInstanceInfo.ReferenceURI shall not be set") } - if len(item.AppLocation) > 1 { - return nil, errors.New("Only one AppLocation item expected") - } } // End of 'for' statement // Whe creating the context, instantiate the application // Retrieve the MEC application description - appInfo, err := am.GetAppInfoListEntry(*app.AppInfo.AppDId) + appInfo, err := am.GetAppInfoRecord(app.AppInfo.AppDId) if err != nil { log.Error(err.Error()) return nil, err } log.Debug("CreateAppContext: appInfo ", appInfo) - log.Debug("CreateAppContext: appInfo.Cmd ", appInfo.Cmd) - appExecEntry, err := cmdExec(appInfo.Cmd) - if err != nil { - log.Error(err.Error()) - return nil, err - } - log.Debug("Just ran subprocess ", strconv.Itoa(appExecEntry.cmd.Process.Pid)) - targetIp := getOutboundIP() - log.Debug("CreateAppContext: targetIp: ", targetIp) + // appExecEntry, err := cmdExec(appInfo.Cmd) + // if err != nil { + // log.Error(err.Error()) + // return nil, err + // } + // log.Debug("Just ran subprocess ", strconv.Itoa(appExecEntry.cmd.Process.Pid)) + // targetIp := getOutboundIP() + // log.Debug("CreateAppContext: targetIp: ", targetIp) // Create the AppContext - app.ContextId = new(string) - *app.ContextId = strconv.Itoa(appExecEntry.cmd.Process.Pid) + app.ContextId = uuid.New().String()[0:32] // FIXME FSCOM Shall be linked to a real running pod or docker container // Update for i := range app.AppInfo.UserAppInstanceInfo { - app.AppInfo.UserAppInstanceInfo[i].AppInstanceId = new(string) - *app.AppInfo.UserAppInstanceInfo[i].AppInstanceId = *app.ContextId - app.AppInfo.UserAppInstanceInfo[i].ReferenceURI = new(Uri) - log.Debug("CreateAppContext: app.AppInfo.AppName: ", app.AppInfo.AppName) - *app.AppInfo.UserAppInstanceInfo[i].ReferenceURI = Uri(remoteUrl + "/" + sanboxName + "/" + app.AppInfo.AppName) - *app.AppInfo.UserAppInstanceInfo[i].ReferenceURI = Uri(string(*app.AppInfo.UserAppInstanceInfo[i].ReferenceURI)) //Uri(strings.Replace(string(*app.AppInfo.UserAppInstanceInfo[i].ReferenceURI), "http:", "https:", 1)) + app.AppInfo.UserAppInstanceInfo[i].AppInstanceId = uuid.New().String()[0:32] // FIXME FSCOM Shall be linked to a real running pod or docker container + app.AppInfo.UserAppInstanceInfo[i].ReferenceURI = Uri(remoteUrl + "/" + sanboxName + "/" + app.AppInfo.AppName) + app.AppInfo.UserAppInstanceInfo[i].ReferenceURI = Uri(string(app.AppInfo.UserAppInstanceInfo[i].ReferenceURI)) //Uri(strings.Replace(string(*app.AppInfo.UserAppInstanceInfo[i].ReferenceURI), "http:", "https:", 1)) } // End of 'for' statement - log.Debug("CreateAppContext: *app.ContextId: ", *app.ContextId) + log.Debug("CreateAppContext: app.ContextId: ", app.ContextId) log.Debug("CreateAppContext: app.AppInfo: ", app.AppInfo) log.Debug("CreateAppContext: app.AppInfo.UserAppInstanceInfo: ", app.AppInfo.UserAppInstanceInfo) - // Create AppContext entries - query := `INSERT INTO ` + AppContextTable + ` (contextId, associateDevAppId, callbackReference, appLocationUpdates, appAutoInstantiation, appDId) VALUES ($1, $2, $3, $4, $5, $6)` - _, err = am.db.Exec(query, *app.ContextId, app.AssociateDevAppId, app.CallbackReference, app.AppLocationUpdates, app.AppAutoInstantiation, app.AppInfo.AppDId) + // Create AppContext entry + txn := am.db.Txn(true) + newDbId := dbId + record := &AppContextTable{newDbId, app.ContextId, app.AssociateDevAppId, NilToEmptyUri(app.CallbackReference), app.AppLocationUpdates, app.AppAutoInstantiation, app.AppInfo.AppDId} + err = txn.Insert("AppContextTable", record) if err != nil { - terminatePidProcess(int(appExecEntry.cmd.Process.Pid)) + txn.Abort() log.Error(err.Error()) return nil, err } - // Create AppInfo entries - query = `INSERT INTO ` + AppInfoTable + ` (appDId, appName, appProvider, appSoftVersion, appDVersion, appDescription, appPackageSource) VALUES ($1, $2, $3, $4, $5, $6, $7)` - _, err = am.db.Exec( - query, - NilToEmptyString(app.AppInfo.AppDId), - app.AppInfo.AppName, - app.AppInfo.AppProvider, - NilToEmptyString(app.AppInfo.AppSoftVersion), - app.AppInfo.AppDVersion, - app.AppInfo.AppDescription, - NilToEmptyUri(app.AppInfo.AppPackageSource), - ) + newDbId += 1 + + // Create AppInfo entry + record1 := &AppInfoContextTable{newDbId, app.ContextId, app.AppInfo.AppDId, app.AppInfo.AppName, app.AppInfo.AppProvider, NilToEmptyString(app.AppInfo.AppSoftVersion), app.AppInfo.AppDVersion, NilToEmptyString(app.AppInfo.AppDescription)} + err = txn.Insert("AppInfoContextTable", record1) if err != nil { - terminatePidProcess(int(appExecEntry.cmd.Process.Pid)) - am.DeleteAppContext(*app.ContextId) + txn.Abort() log.Error(err.Error()) return nil, err } + newDbId += 1 - // Create UserAppInstanceInfo entries - for _, userAppInstanceInfo := range app.AppInfo.UserAppInstanceInfo { - query = `INSERT INTO ` + UserAppInstanceInfoTable + ` (appDId, appInstanceId, referenceURI) VALUES ($1, $2, $3)` - _, err = am.db.Exec(query, *app.AppInfo.AppDId, userAppInstanceInfo.AppInstanceId, userAppInstanceInfo.ReferenceURI) + // Create UserAppInstanceInfo entry + for i := range app.AppInfo.UserAppInstanceInfo { + record2 := &UserAppInstanceInfoItemTable{newDbId, app.AppInfo.AppDId, app.AppInfo.UserAppInstanceInfo[i].AppInstanceId, app.AppInfo.UserAppInstanceInfo[i].ReferenceURI} + err = txn.Insert("UserAppInstanceInfoItemTable", record2) if err != nil { - terminatePidProcess(int(appExecEntry.cmd.Process.Pid)) - am.DeleteAppContext(*app.ContextId) + txn.Abort() log.Error(err.Error()) return nil, err } - // Create AppLocation entries - if userAppInstanceInfo.AppLocation != nil { - for _, appLocation := range userAppInstanceInfo.AppLocation { - query = `INSERT INTO ` + LocationConstraintsTable + ` (appInstanceId, appDId, area, civicAddressElement, countryCode) VALUES ($1, $2, $3, $4, $5)` - _, err = am.db.Exec(query, userAppInstanceInfo.AppInstanceId, *app.AppInfo.AppDId, convertPolygonToJson(appLocation.Area), convertCivicAddressElementToJson(appLocation.CivicAddressElement), NilToEmptyString(appLocation.CountryCode)) - if err != nil { - terminatePidProcess(int(appExecEntry.cmd.Process.Pid)) - am.DeleteAppContext(*app.ContextId) - log.Error(err.Error()) - return nil, err - } - } // End of 'for' statement + newDbId += 1 + // Create AppLocation entry + record3 := &AppLocationTable{newDbId, app.AppInfo.UserAppInstanceInfo[i].AppInstanceId, convertPolygonToJson(app.AppInfo.UserAppInstanceInfo[i].AppLocation.Area), convertCivicAddressElementToJson(app.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement), NilToEmptyString(app.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode)} + err = txn.Insert("AppLocationTable", record3) + if err != nil { + txn.Abort() + log.Error(err.Error()) + return nil, err } + newDbId += 1 } // End of 'for' statement - process, err := os.FindProcess(int(appExecEntry.cmd.Process.Pid)) - if err != nil { - log.Error(err.Error()) - } - log.Debug("Process info: ", *process) - appExecEntries[appExecEntry.cmd.Process.Pid] = appExecEntry - log.Debug("appExecEntries ", appExecEntries) - appContexts[*app.ContextId] = *app - log.Debug("appContexts ", appContexts) + txn.Commit() + dbId = newDbId + + // process, err := os.FindProcess(int(appExecEntry.cmd.Process.Pid)) + // if err != nil { + // log.Error(err.Error()) + // } + // log.Debug("Process info: ", *process) + // appExecEntries[appExecEntry.cmd.Process.Pid] = appExecEntry + // log.Debug("appExecEntries ", appExecEntries) + // appContexts[app.ContextId] = *app + // log.Debug("appContexts ", appContexts) // Notify listener - am.notifyListener(*app.ContextId) + am.notifyListener(app.ContextId) if profiling { now := time.Now() @@ -1077,356 +1151,231 @@ func (am *DaiMgr) CreateAppContext(appContext *AppContext, remoteUrl string, san } func (am *DaiMgr) PutAppContext(appContext AppContext) (err error) { - if profiling { - profilingTimers["PutAppContext"] = time.Now() - } - - // Sanity checks - if appContext.ContextId == nil || *appContext.ContextId == "" { // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext. - return errors.New("ContextId shall be set") - } - log.Debug("PutAppContext: appContext: ", appContext) - - // Retrieve the existing AppContext - curAppContext, err := am.GetAppContext(*appContext.ContextId) - if err != nil { - return errors.New("ContextId not found") - } - log.Debug("PutAppContext: curAppContext: ", curAppContext) - - // Update the curAppContext - update := false - if curAppContext.CallbackReference != appContext.CallbackReference { - curAppContext.CallbackReference = appContext.CallbackReference - update = true - } - - if update { - query := `UPDATE ` + AppContextTable + ` SET callbackReference = ($1) WHERE contextId = ($2)` - result, err := am.db.Exec(query, curAppContext.CallbackReference, *curAppContext.ContextId) - if err != nil { - log.Error(err.Error()) - return err - } - rowCnt, err := result.RowsAffected() - if err != nil { - log.Fatal(err) - return err - } - if rowCnt == 0 { - return errors.New("Failed to update record") - } - - // Notify listener - am.notifyListener(*curAppContext.ContextId) - } - - if profiling { - now := time.Now() - log.Debug("PutAppContext: ", now.Sub(profilingTimers["PutAppContext"])) - } + // if profiling { + // profilingTimers["PutAppContext"] = time.Now() + // } + + // // Sanity checks + // if appContext.ContextId == nil || *appContext.ContextId == "" { // ETSI GS MEC 016 Clause 6.2.3 Type: AppContext. + // return errors.New("ContextId shall be set") + // } + // log.Debug("PutAppContext: appContext: ", appContext) + + // // Retrieve the existing AppContext + // curAppContext, err := am.GetAppContextRecord(*appContext.ContextId) + // if err != nil { + // return errors.New("ContextId not found") + // } + // log.Debug("PutAppContext: curAppContext: ", curAppContext) + + // // Update the curAppContext + // update := false + // if curAppContext.CallbackReference != appContext.CallbackReference { + // curAppContext.CallbackReference = appContext.CallbackReference + // update = true + // } + + // if update { + // query := `UPDATE ` + AppContextTable + ` SET callbackReference = ($1) WHERE contextId = ($2)` + // result, err := am.db.Exec(query, curAppContext.CallbackReference, *curAppContext.ContextId) + // if err != nil { + // log.Error(err.Error()) + // return err + // } + // rowCnt, err := result.RowsAffected() + // if err != nil { + // log.Fatal(err) + // return err + // } + // if rowCnt == 0 { + // return errors.New("Failed to update record") + // } + + // // Notify listener + // am.notifyListener(*curAppContext.ContextId) + // } + + // if profiling { + // now := time.Now() + // log.Debug("PutAppContext: ", now.Sub(profilingTimers["PutAppContext"])) + // } return nil } -func (am *DaiMgr) GetAllAppList() (jsonString string, err error) { +func (am *DaiMgr) GetAppContextRecord(contextId string) (appContext *AppContext, err error) { if profiling { - profilingTimers["GetAllAppList"] = time.Now() + profilingTimers["GetAppContextRecord"] = time.Now() } - jsonString = "" - - var rows *sql.Rows - rows, err = am.db.Query( - `SELECT * FROM ` + AppInfoTable + ` AS appContext ` + - `LEFT JOIN ` + LocationConstraintsTable + ` AS locationConstraints ` + - `ON (appContext.appDId = locationConstraints.appDId) ` + - `LEFT JOIN ` + AppCharcsTable + ` AS appCharts ` + - `ON (appContext.appDId = appCharts.appDId)`) - if err != nil { + // Sanity check + if contextId == "" { + err = errors.New("Missing ContextId") log.Error(err.Error()) - return jsonString, err + return nil, err } - defer rows.Close() - // Fill ApplicationList and convert into JSon to retur the results + txn := am.db.Txn(false) + defer txn.Abort() - if profiling { - now := time.Now() - log.Debug("GetAppList: ", now.Sub(profilingTimers["GetAppList"])) + raw, err := txn.First("AppContextTable", "ContextId", contextId) + if err != nil { + log.Error(err.Error()) + return nil, err } - - return jsonString, nil -} - -func (am *DaiMgr) GetAppContext(contextId string) (appContext *AppContext, err error) { - if profiling { - profilingTimers["GetAppContext"] = time.Now() + if raw == nil { + err = errors.New("Wrong ContextId") + log.Error(err.Error()) + return nil, err } - - // Create AppContext map - appContext = new(AppContext) - - var rows *sql.Rows - rows, err = am.db.Query( - `SELECT * FROM `+AppContextTable+` AS appContext `+ - `LEFT JOIN `+AppInfoTable+` AS appInfo `+ - `ON (appContext.appDId = appInfo.appDId) `+ - `LEFT JOIN `+UserAppInstanceInfoTable+` AS userAppInstanceInfo `+ - `ON (userAppInstanceInfo.appDId = appInfo.appDId) `+ - `WHERE appContext.contextId = ($1)`, contextId) + appContext, err = am.processAppContextRecord(txn, raw.(*AppContextTable)) if err != nil { log.Error(err.Error()) - return appContext, err - } - defer rows.Close() - - // Scan results - appInfoEntry := new(AppInfo) - for rows.Next() { - - userAppInstanceInfoItem := new(UserAppInstanceInfoItem) - appContext, appInfoEntry, userAppInstanceInfoItem, err := am.processAppContextRecord(rows, appContext, appInfoEntry, userAppInstanceInfoItem) - if err != nil { - log.Error(err.Error()) - return appContext, err - } - // Update UserAppInstanceInfo - appInfoEntry.UserAppInstanceInfo = append(appInfoEntry.UserAppInstanceInfo, *userAppInstanceInfoItem) - } // End of 'for' statement - if appContext.ContextId == nil { - err = errors.New("AppContext not found") return nil, err } - appContext.AppInfo = *appInfoEntry if profiling { now := time.Now() - log.Debug("GetAppContext: ", now.Sub(profilingTimers["GetAppContext"])) + log.Debug("GetAppContextRecord: ", now.Sub(profilingTimers["GetAppContextRecord"])) } return appContext, nil } -func (am *DaiMgr) GetAllAppContext() (appContext map[string]*AppContext, err error) { +func (am *DaiMgr) GetAllAppContextRecord() (appContextList map[string]*AppContext, err error) { if profiling { - profilingTimers["GetAllAppContext"] = time.Now() + profilingTimers["GetAllAppContextRecord"] = time.Now() } - // Create AppContext map - appContext = make(map[string]*AppContext) + txn := am.db.Txn(false) + defer txn.Abort() - var rows *sql.Rows - rows, err = am.db.Query( - `SELECT * FROM ` + AppContextTable + ` AS appContext ` + - `LEFT JOIN ` + AppInfoTable + ` AS appInfo ` + - `ON (appContext.appDId = appInfo.appDId) ` + - `LEFT JOIN ` + UserAppInstanceInfoTable + ` AS userAppInstanceInfo ` + - `ON (userAppInstanceInfo.appDId = appInfo.appDId)`) + it, err := txn.Get("AppContextTable", "ContextId") if err != nil { log.Error(err.Error()) - return appContext, err + return nil, err } - defer rows.Close() + if it != nil { + // Create AppContext map + appContextList = make(map[string]*AppContext) - // Scan results - for rows.Next() { - appContextEntry := new(AppContext) - appInfoEntry := new(AppInfo) + for obj := it.Next(); obj != nil; obj = it.Next() { + appContext, err := am.processAppContextRecord(txn, obj.(*AppContextTable)) + if err != nil { + continue // Skip it + } + appContextList[appContext.ContextId] = appContext + } // End of 'for' statement + } - userAppInstanceInfoItem := new(UserAppInstanceInfoItem) - appContextEntry, appInfoEntry, userAppInstanceInfoItem, err := am.processAppContextRecord(rows, appContextEntry, appInfoEntry, userAppInstanceInfoItem) - if err != nil { - log.Error(err.Error()) - return appContext, err - } - appContextEntry.AppInfo = *appInfoEntry - // Get AppContext entry from UE map (create new entry if not found) - ac := appContext[*appContextEntry.ContextId] - if ac == nil { - ac = appContextEntry - appContext[*appContextEntry.ContextId] = ac - } - appContext[*appContextEntry.ContextId].AppInfo.UserAppInstanceInfo = append(appContext[*appContextEntry.ContextId].AppInfo.UserAppInstanceInfo, *userAppInstanceInfoItem) - } // End of 'for' statement - err = rows.Err() - if err != nil { - log.Error(err) + if appContextList == nil { + err = errors.New("AppInfoList not found") + return nil, err } if profiling { now := time.Now() - log.Debug("GetAllAppContext: ", now.Sub(profilingTimers["GetAllAppContext"])) + log.Debug("GetAllAppContextRecord: ", now.Sub(profilingTimers["GetAllAppContextRecord"])) } - return appContext, nil + return appContextList, nil } -///////////////////////////////////////////////////////////////////////// - -func (am *DaiMgr) processAppInfoListRecord(rows *sql.Rows, appInfoListEntry *AppInfoList) (*AppInfoList, error) { - var appCharcsAppDId sql.NullString - appCharcs := new(AppCharcs) - var args string - err := rows.Scan( - &appInfoListEntry.AppDId, - &appInfoListEntry.AppName, - &appInfoListEntry.AppProvider, - &appInfoListEntry.AppSoftVersion, - &appInfoListEntry.AppDVersion, - &appInfoListEntry.AppDescription, - &appInfoListEntry.Cmd, - &args, - &appCharcsAppDId, // AppCharcs reference - &appCharcs.Memory, - &appCharcs.Storage, - &appCharcs.Latency, - &appCharcs.Bandwidth, - &appCharcs.ServiceCont, - ) +func (am *DaiMgr) processAppInfoRecord(txn *memdb.Txn, appInfoTable *AppInfoTable) (appInfo *AppInfo, err error) { + //log.Debug(">>> processAppInfoRecord: ", appDId) + + appInfo = new(AppInfo) + appInfo.AppDId = appInfoTable.AppDId + appInfo.AppName = appInfoTable.AppName + appInfo.AppProvider = appInfoTable.AppProvider + appInfo.AppSoftVersion = appInfoTable.AppSoftVersion + appInfo.AppDVersion = appInfoTable.AppDVersion + appInfo.AppDescription = appInfoTable.AppDescription + + it, err := txn.Get("LocationConstraintsTable", "AppDId", appInfo.AppDId) if err != nil { log.Error(err.Error()) return nil, err } + if it != nil { + appLocation := make([]LocationConstraintsItem, 0) + for obj := it.Next(); obj != nil; obj = it.Next() { + p := obj.(*LocationConstraintsTable) + var r = LocationConstraintsItem{ + Area: convertJsonToPolygon(p.Area), + CivicAddressElement: convertJsonToCivicAddressElement(p.CivicAddressElement), + CountryCode: EmptyToNilString(p.CountryCode), + } + appLocation = append(appLocation, r) + } // End of 'for' statement + appInfo.AppLocation = &appLocation + } - if appInfoListEntry.AppDId == "" { - // record not found - err := errors.New("No record found") + raw, err := txn.First("AppCharcsTable", "AppDId", appInfo.AppDId) + if err != nil { log.Error(err.Error()) return nil, err } - appInfoListEntry.Args = strings.Split(args, " ") - if appCharcsAppDId.Valid { - appInfoListEntry.AppCharcs = append(appInfoListEntry.AppCharcs, *appCharcs) - } - // Update AppLocation - var rows_1 *sql.Rows - rows_1, err = am.db.Query( - `SELECT * FROM `+AppInfoListLocationConstraintsTable+` WHERE appDId = ($1)`, - appInfoListEntry.AppDId) - if err != nil { - log.Error(err.Error()) - return appInfoListEntry, err - } - // Scan results - for rows_1.Next() { - var applicationLocationAppDId string - var area string - var civicAddressElement string - var countryCode string - err = rows_1.Scan( - &applicationLocationAppDId, - &area, - &civicAddressElement, - &countryCode, - ) - if err != nil { - log.Error(err.Error()) - return nil, err + if raw != nil { + p := raw.(*AppCharcsTable) + appInfo.AppCharcs = &AppCharcs{ + Memory: EmptyToNilUInt32(p.Memory), + Storage: EmptyToNilUInt32(p.Storage), + Latency: EmptyToNilUInt32(p.Latency), + Bandwidth: EmptyToNilUInt32(p.Bandwidth), + ServiceCont: EmptyToNilUInt32(p.ServiceCont), } - locationItem := new(LocationConstraintsItem) - locationItem.Area = convertJsonToPolygon(area) - if len(locationItem.Area.Coordinates) == 0 { - locationItem.Area = nil - } - locationItem.CivicAddressElement = convertJsonToCivicAddressElement(civicAddressElement) - if len(*locationItem.CivicAddressElement) == 0 { - locationItem.CivicAddressElement = nil - } - if countryCode == "" { - locationItem.CountryCode = nil - } else { - locationItem.CountryCode = new(string) - *locationItem.CountryCode = countryCode - } - - appInfoListEntry.AppLocation = append(appInfoListEntry.AppLocation, *locationItem) - - } // End of 'for' statement + } - return appInfoListEntry, err + return appInfo, nil } -///////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////// -func (am *DaiMgr) processAppContextRecord(rows *sql.Rows, appContext *AppContext, appInfoEntry *AppInfo, userAppInstanceInfoItem *UserAppInstanceInfoItem) (*AppContext, *AppInfo, *UserAppInstanceInfoItem, error) { - var userAppInstanceInfoAppDId string - //userAppInstanceInfoItem := new(UserAppInstanceInfoItem) - err := rows.Scan( - &appContext.ContextId, - &appContext.AssociateDevAppId, - &appContext.CallbackReference, - &appContext.AppLocationUpdates, - &appContext.AppAutoInstantiation, - &appInfoEntry.AppDId, // AppContext.AppInfo reference - &appInfoEntry.AppDId, // AppInfo reference - &appInfoEntry.AppName, - &appInfoEntry.AppProvider, - &appInfoEntry.AppSoftVersion, - &appInfoEntry.AppDVersion, - &appInfoEntry.AppDescription, - &appInfoEntry.AppPackageSource, - &userAppInstanceInfoAppDId, // UserAppInstanceInfo reference - &userAppInstanceInfoItem.AppInstanceId, - &userAppInstanceInfoItem.ReferenceURI, - ) - if err != nil { - log.Error(err.Error()) - return nil, nil, nil, err - } - appInfoEntry.AppDId = EmptyToNilString(appInfoEntry.AppDId) - appInfoEntry.AppSoftVersion = EmptyToNilString(appInfoEntry.AppSoftVersion) - appInfoEntry.AppPackageSource = EmptyToNilUri(appInfoEntry.AppPackageSource) - userAppInstanceInfoItem.AppInstanceId = EmptyToNilString(userAppInstanceInfoItem.AppInstanceId) - userAppInstanceInfoItem.ReferenceURI = EmptyToNilUri(userAppInstanceInfoItem.ReferenceURI) - // Update AppLocation - var rows_1 *sql.Rows - rows_1, err = am.db.Query( - `SELECT * FROM `+LocationConstraintsTable+` WHERE appDId = ($1) AND appInstanceId = ($2)`, - userAppInstanceInfoAppDId, *userAppInstanceInfoItem.AppInstanceId) +func (am *DaiMgr) processAppContextRecord(txn *memdb.Txn, appContextTable *AppContextTable) (appContext *AppContext, err error) { + //log.Debug(">>> processAppContextRecord: ", appContextTable) + + appContext = new(AppContext) + appContext.ContextId = appContextTable.ContextId + appContext.AssociateDevAppId = appContextTable.AssociateDevAppId + appContext.CallbackReference = new(Uri) + *appContext.CallbackReference = appContextTable.CallbackReference + appContext.AppLocationUpdates = appContextTable.AppLocationUpdates + appContext.AppAutoInstantiation = appContextTable.AppAutoInstantiation + log.Debug("processAppContextRecord: *appContext.ContextId: ", appContext.ContextId) + + raw, err := txn.First("AppInfoContextTable", "ContextId", appContext.ContextId) if err != nil { log.Error(err.Error()) - return nil, nil, nil, err - } - // Scan results - for rows_1.Next() { - var applicationLocationConstraintsAppDId string - var applicationLocationConstraintsAppInstanceId string - var area string - var civicAddressElement string - var countryCode string - err = rows_1.Scan( - &applicationLocationConstraintsAppDId, - &applicationLocationConstraintsAppInstanceId, - &area, - &civicAddressElement, - &countryCode, - ) + return nil, err + } + if raw != nil { + p := raw.(*AppInfoContextTable) + appContext.AppInfo.AppDId = p.AppDId + appContext.AppInfo.AppName = p.AppName + appContext.AppInfo.AppProvider = p.AppProvider + appContext.AppInfo.AppSoftVersion = EmptyToNilString(p.AppSoftVersion) + appContext.AppInfo.AppDVersion = p.AppDVersion + appContext.AppInfo.AppDescription = EmptyToNilString(p.AppDescription) + log.Debug("processAppContextRecord: appContext.AppInfo: ", appContext.AppInfo) + it, err := txn.Get("UserAppInstanceInfoItemTable", "AppDId", appContext.AppInfo.AppDId) if err != nil { log.Error(err.Error()) - return nil, nil, nil, err - } - locationConstraintsItem := new(LocationConstraintsItem) - locationConstraintsItem.Area = convertJsonToPolygon(area) - if len(locationConstraintsItem.Area.Coordinates) == 0 { - locationConstraintsItem.Area = nil - } - locationConstraintsItem.CivicAddressElement = convertJsonToCivicAddressElement(civicAddressElement) - if len(*locationConstraintsItem.CivicAddressElement) == 0 { - locationConstraintsItem.CivicAddressElement = nil - } - if countryCode == "" { - locationConstraintsItem.CountryCode = nil - } else { - locationConstraintsItem.CountryCode = new(string) - *locationConstraintsItem.CountryCode = countryCode + return nil, err } + if it != nil { + appContext.AppInfo.UserAppInstanceInfo = make([]UserAppInstanceInfoItem, 0) + for obj := it.Next(); obj != nil; obj = it.Next() { + p := obj.(*UserAppInstanceInfoItemTable) + var r UserAppInstanceInfoItem + r.AppInstanceId = p.AppInstanceId + r.ReferenceURI = p.ReferenceURI + appContext.AppInfo.UserAppInstanceInfo = append(appContext.AppInfo.UserAppInstanceInfo, r) + } // End of 'for' statement - userAppInstanceInfoItem.AppLocation = append(userAppInstanceInfoItem.AppLocation, *locationConstraintsItem) - } // End of 'for' statement + } + log.Debug("processAppContextRecord: appContext.AppInfo.UserAppInstanceInfo: ", appContext.AppInfo.UserAppInstanceInfo) + } - return appContext, appInfoEntry, userAppInstanceInfoItem, err + return appContext, nil } func startProcessCheckTicker() { @@ -1453,8 +1402,8 @@ func startProcessCheckTicker() { if res == false { // Process terminated, delete all entries appContextId := strconv.Itoa(appExecEntry.cmd.Process.Pid) - if appContexts[appContextId].CallbackReference != "" { - notifyUrl := appContexts[appContextId].CallbackReference + if appContexts[appContextId].CallbackReference != nil && *appContexts[appContextId].CallbackReference != "" { + notifyUrl := *appContexts[appContextId].CallbackReference daiMgr.DeleteAppContext(appContextId) // Notify event notifyAppContextDeletion(string(notifyUrl), appContextId) diff --git a/go-packages/meep-dai-mgr/meep-dai-mgr_test.go b/go-packages/meep-dai-mgr/meep-dai-mgr_test.go index 118ac40287c65eac4b376f1ee397b4f004775002..8799cc242efec7d47cc7dbf0de2f2a7d66d5bf7c 100644 --- a/go-packages/meep-dai-mgr/meep-dai-mgr_test.go +++ b/go-packages/meep-dai-mgr/meep-dai-mgr_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The AdvantEDGE Authors + * Copyright (c) 2024 The AdvantEDGE Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package meepdaimgr import ( "fmt" - "os/exec" + //"os/exec" //"sort" //"strings" //"strconv" @@ -124,66 +124,65 @@ var cobraCmd = &cobra.Command{ Run: nil, } -func TestExecuteCmd(t *testing.T) { - fmt.Println("--- ", t.Name()) - log.MeepTextLogInit(t.Name()) - - cmd := exec.Command("ls", "-ltr") - cmd.Dir = "." - out, err := ExecuteCmd(cmd, cobraCmd) - if err != nil { - t.Fatalf(err.Error()) - } - fmt.Println(out) - - cmd = exec.Command("ps", "-ltr") - _, err = ExecuteCmd(cmd, cobraCmd) - if err == nil { - t.Fatalf("ExecuteCmd should have failed") - } - - //docker run --rm --expose=31111 -t meep-docker-registry:30001/onboarded-demo4 - /*dockerId, out, err := DockerRun("meep-docker-registry:30001/onboarded-demo4", "31124", 3*time.Second) - fmt.Println(out) - if err != nil { - t.Fatalf(err.Error()) - } - out, err = DockerTerminate(dockerId, 3*time.Second) - fmt.Println(out) - if err != nil { - t.Fatalf(err.Error()) - } - - dockerId, out, err = DockerRun("", "31124", 3*time.Second) - fmt.Println(out) - if err == nil { - t.Fatalf("DockerRun should have failed") - } - - dockerId, out, err = DockerRun("voila", "31124", 3*time.Second) - fmt.Println(out) - if err == nil { - t.Fatalf("DockerRun should have failed") - } - - out, err = DockerTerminate("", 3*time.Second) - fmt.Println(out) - if err == nil { - t.Fatalf("DockerTerminate should have failed") - } - - out, err = DockerTerminate("voila", 3*time.Second) - fmt.Println(out) - if err == nil { - t.Fatalf("DockerTerminate should have failed") - }*/ - -} +// func TestExecuteCmd(t *testing.T) { +// fmt.Println("--- ", t.Name()) +// log.MeepTextLogInit(t.Name()) + +// cmd := exec.Command("ls", "-ltr") +// cmd.Dir = "." +// out, err := ExecuteCmd(cmd, cobraCmd) +// if err != nil { +// t.Fatalf(err.Error()) +// } +// fmt.Println(out) + +// cmd = exec.Command("ps", "-ltr") +// _, err = ExecuteCmd(cmd, cobraCmd) +// if err == nil { +// t.Fatalf("ExecuteCmd should have failed") +// } + +// //docker run --rm --expose=31111 -t meep-docker-registry:30001/onboarded-demo4 +// /*dockerId, out, err := DockerRun("meep-docker-registry:30001/onboarded-demo4", "31124", 3*time.Second) +// fmt.Println(out) +// if err != nil { +// t.Fatalf(err.Error()) +// } +// out, err = DockerTerminate(dockerId, 3*time.Second) +// fmt.Println(out) +// if err != nil { +// t.Fatalf(err.Error()) +// } + +// dockerId, out, err = DockerRun("", "31124", 3*time.Second) +// fmt.Println(out) +// if err == nil { +// t.Fatalf("DockerRun should have failed") +// } + +// dockerId, out, err = DockerRun("voila", "31124", 3*time.Second) +// fmt.Println(out) +// if err == nil { +// t.Fatalf("DockerRun should have failed") +// } + +// out, err = DockerTerminate("", 3*time.Second) +// fmt.Println(out) +// if err == nil { +// t.Fatalf("DockerTerminate should have failed") +// } + +// out, err = DockerTerminate("voila", 3*time.Second) +// fmt.Println(out) +// if err == nil { +// t.Fatalf("DockerTerminate should have failed") +// }*/ + +// } func TestConvertCivicAddressElementToJson(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - civicAddressElementArray := make(CivicAddressElement, 0) retCode := convertCivicAddressElementToJson(&civicAddressElementArray) if retCode == "" { @@ -192,7 +191,6 @@ func TestConvertCivicAddressElementToJson(t *testing.T) { if retCode != "[]" { t.Fatalf("Unexpected conversion result") } - retCode = convertCivicAddressElementToJson(&civicAddressElement1) if retCode == "" { t.Fatalf("Failed to convert empty CivicAddressElement array") @@ -201,19 +199,13 @@ func TestConvertCivicAddressElementToJson(t *testing.T) { t.Fatalf("Unexpected conversion result") } } - func TestConvertJsonToCivicAddressElement(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - - retCode := convertJsonToCivicAddressElement("") - if retCode == nil { + retCode := convertJsonToCivicAddressElement("nil") + if retCode != nil { t.Fatalf("Failed to convert empty CivicAddressElement array") } - if len(*retCode) != 0 { - t.Fatalf("Unexpected conversion result") - } - retCode = convertJsonToCivicAddressElement(civicAddressElement1_str) if retCode == nil { t.Fatalf("Failed to convert empty CivicAddressElement array") @@ -224,11 +216,9 @@ func TestConvertJsonToCivicAddressElement(t *testing.T) { t.Fatalf("Unexpected conversion result") } } - func TestConvertPolygonToJson(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - retCode := convertPolygonToJson(&area1) if retCode == "" { t.Fatalf("Failed to convert empty Polygon") @@ -237,16 +227,13 @@ func TestConvertPolygonToJson(t *testing.T) { t.Fatalf("Unexpected conversion result") } } - func TestConvertJsonToPolygon(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - - retCode := convertJsonToPolygon("") - if retCode == nil { + retCode := convertJsonToPolygon("nil") + if retCode != nil { t.Fatalf("Failed to convert empty Polygon") } - retCode = convertJsonToPolygon(area1_str) if retCode == nil { t.Fatalf("Failed to convert empty Polygon array") @@ -262,86 +249,71 @@ func TestNewDaiMgr(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - // Invalid Connector - fmt.Println("Invalid DAI Manager") - am, err := NewDaiMgr(DaiCfg { "", amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) - if err == nil || am != nil { - t.Fatalf("DB connection should have failed") - } - am, err = NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, "invalid-host", amDBPort, nil }) - if err == nil || am != nil { - t.Fatalf("DB connection should have failed") - } - am, err = NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, "invalid-port", nil }) - if err == nil || am != nil { - t.Fatalf("DB connection should have failed") - } - am, err = NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, "invalid-pwd", amDBHost, amDBPort, nil }) - if err == nil || am != nil { - t.Fatalf("DB connection should have failed") - } - - // Valid Connector fmt.Println("Create valid DAI Manager") - am, err = NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) + am, err := NewDaiMgr(DaiCfg{nil}) if err != nil || am == nil { t.Fatalf("Failed to create DAI Manager") } - // Cleanup - _ = am.DeleteTable(AppContextTable) - _ = am.DeleteTable(AppInfoTable) - _ = am.DeleteTable(UserAppInstanceInfoTable) - _ = am.DeleteTable(LocationConstraintsTable) - _ = am.DeleteTable(AppInfoListTable) - _ = am.DeleteTable(AppCharcsTable) - _ = am.DeleteTable(AppInfoListLocationConstraintsTable) - - // Create tables - fmt.Println("Create Tables") - err = am.CreateTables() + err = am.DeleteDaiMgr() if err != nil { - t.Fatalf("Failed to create tables") + t.Fatalf("Failed to delete DaiMgr") } + // t.Fatalf("DONE") +} - // Cleanup - err = am.DeleteTables() - if err != nil { - t.Fatalf("Failed to create tables") +func TestDaiMgrGenerateCatalog(t *testing.T) { + fmt.Println("--- ", t.Name()) + log.MeepTextLogInit(t.Name()) + + // Build a complete AppInfoList data structure + appLocation1 := make([]LocationConstraintsItem, 2) + appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} + appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} + appCharcs1 := AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} + appInfo1 := AppInfo{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, &appLocation1, &appCharcs1} + fmt.Println("appInfo1: ", appInfo1) + + var appList = ApplicationList{} + appList.AppList = append(appList.AppList, appInfo1) + appList.VendorSpecificExt = &VendorSpecificExt{VendorId: "ETSI"} + s := convertApplicationListToJson(&appList) + if s == "" { + t.Fatalf("Failed to convert ApplicationList into Json string") } + fmt.Println("applicationList: ", s) - err = am.DeleteDaiMgr() - if err != nil { - t.Fatalf("Failed to delete DaiMgr") + // Build another complete AppInfoList data structure + fmt.Println("Create another valid AppInfoList") + appLocation2 := make([]LocationConstraintsItem, 2) + appLocation2[0] = LocationConstraintsItem{&area2, nil, &countryCode2} + appLocation2[1] = LocationConstraintsItem{nil, &civicAddressElement2, nil} + appCharcs2 := AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} + appInfo2 := AppInfo{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, &appLocation2, &appCharcs2} + + appList.AppList = append(appList.AppList, appInfo2) + s = convertApplicationListToJson(&appList) + if s == "" { + t.Fatalf("Failed to convert ApplicationList into Json string") } + fmt.Println("applicationList: ", s) // t.Fatalf("DONE") } -func TestDaiMgrCreateAppList(t *testing.T) { +func TestDaiMgrCreateAppInfo(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - // Create Connector fmt.Println("Create valid Dai Manager") - am, err := NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) + am, err := NewDaiMgr(DaiCfg{nil}) if err != nil || am == nil { t.Fatalf("Failed to create Dai Manager") } - // Cleanup - _ = am.DeleteTables() - - // Create tables - fmt.Println("Create Tables") - err = am.CreateTables() - if err != nil { - t.Fatalf("Failed to create tables") - } - // Make sure AppInfoList don't exist fmt.Println("Verify no AppInfoList present") - appListMap, err := am.GetAllAppList() + appListMap, err := am.GetAllAppInfoRecord() if err != nil { t.Fatalf("Failed to get all AppInfoList") } @@ -353,87 +325,76 @@ func TestDaiMgrCreateAppList(t *testing.T) { appLocation1 := make([]LocationConstraintsItem, 2) appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} - appCharcs1 := make([]AppCharcs, 1) - appCharcs1[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} - appInfoList1 := AppInfoList{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, appLocation1, appCharcs1, appCmd1, []string{}} - - // Create an invalid AppInfoList - ContextId - fmt.Println("Create an invalid AppInfoList - AppDId") - appInfoList1.AppDId = "" - err = am.CreateAppEntry(appInfoList1) + appCharcs1 := AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} + appInfo1 := AppInfo{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, &appLocation1, &appCharcs1} + fmt.Println("appInfo1: ", appInfo1) + + // Create an invalid AppInfo - ContextId + fmt.Println("Create an invalid AppInfo - AppDId") + appInfo1.AppDId = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppDId") } - appInfoList1.AppDId = appDId1 + appInfo1.AppDId = appDId1 - fmt.Println("Create an invalid AppInfoList - AppName") - appInfoList1.AppName = "" - err = am.CreateAppEntry(appInfoList1) + fmt.Println("Create an invalid AppInfo - AppName") + appInfo1.AppName = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppName") } - appInfoList1.AppName = appName1 + appInfo1.AppName = appName1 - fmt.Println("Create an invalid AppInfoList - AppProvider") - appInfoList1.AppProvider = "" - err = am.CreateAppEntry(appInfoList1) + fmt.Println("Create an invalid AppInfo - AppProvider") + appInfo1.AppProvider = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppProvider") } - appInfoList1.AppProvider = appProvider1 + appInfo1.AppProvider = appProvider1 - fmt.Println("Create an invalid AppInfoList - AppSoftVersion") - appInfoList1.AppSoftVersion = "" - err = am.CreateAppEntry(appInfoList1) + fmt.Println("Create an invalid AppInfo - AppSoftVersion") + appInfo1.AppSoftVersion = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppSoftVersion") } - appInfoList1.AppSoftVersion = appSoftVersion1 + appInfo1.AppSoftVersion = appSoftVersion1 - fmt.Println("Create an invalid AppInfoList - AppDVersion") - appInfoList1.AppDVersion = "" - err = am.CreateAppEntry(appInfoList1) + fmt.Println("Create an invalid AppInfo - AppDVersion") + appInfo1.AppDVersion = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppDVersion") } - appInfoList1.AppDVersion = appDVersion1 + appInfo1.AppDVersion = appDVersion1 - fmt.Println("Create an invalid AppInfoList - AppDescription") - appInfoList1.AppDescription = "" - err = am.CreateAppEntry(appInfoList1) + fmt.Println("Create an invalid AppInfo - AppDescription") + appInfo1.AppDescription = "" + err = am.CreateAppInfoRecord(appInfo1) if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AppDescription") } - appInfoList1.AppDescription = appDescription1 - - fmt.Println("Create an invalid AppInfoList - AppCharcs") - appInfoList1.AppCharcs = make([]AppCharcs, 2) - appInfoList1.AppCharcs[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} - appInfoList1.AppCharcs[1] = AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} - err = am.CreateAppEntry(appInfoList1) - if err == nil { - t.Fatalf("AppContext creation should have failed - Invalid AppCharcs") - } - appInfoList1.AppCharcs = appCharcs1 + appInfo1.AppDescription = appDescription1 // Create a valid AppInfoList - fmt.Println("Create a valid AppInfoList: ", appInfoList1) - err = am.CreateAppEntry(appInfoList1) + err = am.CreateAppInfoRecord(appInfo1) if err != nil { t.Fatalf(err.Error()) } - appInfoList, err := am.GetAppInfoListEntry(appDId1) + appInfo, err := am.GetAppInfoRecord(appDId1) if err != nil { t.Fatalf(err.Error()) } - if !validateAppInfoList(appInfoList, appInfoList1) { + if !validateAppInfo(appInfo, appInfo1) { t.Fatalf("AppInfoList validation failed") } - appInfoListMap, err := am.GetAllAppInfoListEntry() - if err != nil || len(appInfoListMap) != 1 { + appInfoMap, err := am.GetAllAppInfoRecord() + if err != nil || len(appInfoMap) != 1 { t.Fatalf(err.Error()) } - if !validateAppInfoList(appInfoListMap[appDId1], appInfoList1) { + if !validateAppInfo(appInfoMap[appDId1], appInfo1) { t.Fatalf("AppInfoList validation failed") } @@ -442,57 +403,61 @@ func TestDaiMgrCreateAppList(t *testing.T) { appLocation2 := make([]LocationConstraintsItem, 2) appLocation2[0] = LocationConstraintsItem{&area2, nil, &countryCode2} appLocation2[1] = LocationConstraintsItem{nil, &civicAddressElement2, nil} - appCharcs2 := make([]AppCharcs, 1) - appCharcs2[0] = AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} - appInfoList2 := AppInfoList{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, appLocation2, appCharcs2, appCmd2, []string{}} - err = am.CreateAppEntry(appInfoList2) + appCharcs2 := AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} + appInfo2 := AppInfo{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, &appLocation2, &appCharcs2} + err = am.CreateAppInfoRecord(appInfo2) if err != nil { t.Fatalf(err.Error()) } - appInfoList, err = am.GetAppInfoListEntry(appDId2) + appInfo, err = am.GetAppInfoRecord(appDId2) if err != nil { t.Fatalf(err.Error()) } - if !validateAppInfoList(appInfoList, appInfoList2) { + if !validateAppInfo(appInfo, appInfo2) { t.Fatalf("AppInfoList validation failed") } - appInfoListMap, err = am.GetAllAppInfoListEntry() - if err != nil || len(appInfoListMap) != 2 { + appInfoMap, err = am.GetAllAppInfoRecord() + if err != nil || len(appInfoMap) != 2 { t.Fatalf(err.Error()) } - if !validateAppInfoList(appInfoListMap[appDId2], appInfoList2) { + if !validateAppInfo(appInfoMap[appDId2], appInfo2) { t.Fatalf("AppInfoList validation failed") } - if validateAppInfoList(appInfoListMap[appDId2], appInfoList1) { + if validateAppInfo(appInfoMap[appDId2], appInfo1) { t.Fatalf("AppInfoList validation should failed") } // Build another complete AppInfoList data structure without any optional field fmt.Println("Create another valid AppInfoList without any optional field") - appLocation3 := make([]LocationConstraintsItem, 0) - appCharcs3 := make([]AppCharcs, 0) - appInfoList3 := AppInfoList{appDId3, appName3, appProvider3, appSoftVersion3, appDVersion3, appDescription3, appLocation3, appCharcs3, appCmd2, []string{}} - err = am.CreateAppEntry(appInfoList3) + appInfo3 := AppInfo{appDId3, appName3, appProvider3, appSoftVersion3, appDVersion3, appDescription3, nil, nil} + err = am.CreateAppInfoRecord(appInfo3) if err != nil { t.Fatalf(err.Error()) } - appInfoList, err = am.GetAppInfoListEntry(appDId3) + appInfo, err = am.GetAppInfoRecord(appDId3) if err != nil { t.Fatalf(err.Error()) } - if !validateAppInfoList(appInfoList, appInfoList3) { + if !validateAppInfo(appInfo, appInfo3) { t.Fatalf("AppInfoList validation failed") } - // Delete all AppInfoList entries - fmt.Println("Delete all AppInfoList entries") - err = am.DeleteAllAppInfoList() + // Delete appInfo3 + fmt.Println("Delete AppInfo records: ", appInfo.AppDId) + err = am.DeleteAppInfoRecord(appInfo.AppDId) if err != nil { - t.Fatalf("Failed to delete all AppInfoList entries") + t.Fatalf("Failed to delete all AppInfoList records") } - appInfoListMap, err = am.GetAllAppInfoListEntry() - if err != nil || len(appInfoListMap) != 0 { - t.Fatalf("AppInfoList entry should no longer exist") + + // Delete all AppInfo records + fmt.Println("Delete all AppInfo records") + err = am.DeleteAllAppInfoRecord() + if err != nil { + t.Fatalf("Failed to delete all AppInfoList records") + } + appInfoMap, err = am.GetAllAppInfoRecord() + if err != nil || len(appInfoMap) != 0 { + t.Fatalf("AppInfo record should no longer exist") } err = am.DeleteDaiMgr() @@ -506,79 +471,66 @@ func TestDaiMgrCreateAppList(t *testing.T) { func TestDaiMgrCreateAppContext(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) - // Create Connector fmt.Println("Create valid Dai Manager") - am, err := NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) + am, err := NewDaiMgr(DaiCfg{nil}) if err != nil || am == nil { t.Fatalf("Failed to create Dai Manager") } - // Cleanup - _ = am.DeleteTables() - - // Create tables - fmt.Println("Create Tables") - err = am.CreateTables() - if err != nil { - t.Fatalf("Failed to create tables") - } - // Make sure AppContexts don't exist fmt.Println("Verify no AppContext present") - appContextMap, err := am.GetAllAppContext() + appContextMap, err := am.GetAllAppContextRecord() if err != nil { t.Fatalf("Failed to get all AppContexts") } if len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } - // Fill AppInfoList table - fmt.Println("Fill AppInfoList table") + // Build a complete AppInfoList data structure appLocation1 := make([]LocationConstraintsItem, 2) appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} - appCharcs1 := make([]AppCharcs, 1) - appCharcs1[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} - appInfoList1 := AppInfoList{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, appLocation1, appCharcs1, appCmd1, []string{}} - err = am.CreateAppEntry(appInfoList1) + appCharcs1 := AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} + appInfo1 := AppInfo{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, &appLocation1, &appCharcs1} + fmt.Println("appInfo1: ", appInfo1) + err = am.CreateAppInfoRecord(appInfo1) if err != nil { t.Fatalf(err.Error()) } appLocation2 := make([]LocationConstraintsItem, 2) appLocation2[0] = LocationConstraintsItem{&area2, nil, &countryCode2} appLocation2[1] = LocationConstraintsItem{nil, &civicAddressElement2, nil} - appCharcs2 := make([]AppCharcs, 1) - appCharcs2[0] = AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} - appInfoList2 := AppInfoList{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, appLocation2, appCharcs2, appCmd2, []string{}} - err = am.CreateAppEntry(appInfoList2) + appCharcs2 := AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} + appInfo2 := AppInfo{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, &appLocation2, &appCharcs2} + fmt.Println("appInfo2: ", appInfo2) + err = am.CreateAppInfoRecord(appInfo2) if err != nil { t.Fatalf(err.Error()) } - appLocation3 := make([]LocationConstraintsItem, 0) - appCharcs3 := make([]AppCharcs, 0) - appInfoList3 := AppInfoList{appDId3, appName3, appProvider3, appSoftVersion3, appDVersion3, appDescription3, appLocation3, appCharcs3, appCmd3, []string{}} - err = am.CreateAppEntry(appInfoList3) + appInfo3 := AppInfo{appDId3, appName3, appProvider3, appSoftVersion3, appDVersion3, appDescription3, nil, nil} + err = am.CreateAppInfoRecord(appInfo3) if err != nil { t.Fatalf(err.Error()) } - // Build a complete AppContexts data structure userAppInstanceInfo1 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo1[0] = UserAppInstanceInfoItem{nil, nil, nil} - userAppInstanceInfo1[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo1[0].AppLocation[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - appInfo1 := AppInfo{&appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, appDescription1, userAppInstanceInfo1, &appPackageSource1} - appContext1 := AppContext{&contextId1, associateDevAppId1, callbackReference1, appLocationUpdates1, appAutoInstantiation1, appInfo1} + userAppInstanceInfo1[0] = UserAppInstanceInfoItem{"", "", nil} + userAppInstanceInfo1[0].AppLocation = &LocationConstraintsItem{&area1, nil, &countryCode1} + appInfoContext1 := AppInfoContext{appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, nil, userAppInstanceInfo1} + var uri Uri + uri = callbackReference1 + appContext1 := AppContext{contextId1, associateDevAppId1, &uri, appLocationUpdates1, appAutoInstantiation1, appInfoContext1} // Create an invalid AppContexts - ContextId fmt.Println("Create an invalid AppContexts - ContextId") + appContext1.ContextId = appDId1 _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { t.Fatalf("AppContext creation should have failed - Invalid ContextId") } - appContext1.ContextId = nil + appContext1.ContextId = "" // Create an invalid AppContext - AssociateDevAppId fmt.Println("Create an invalid AppContext - AssociateDevAppId") @@ -587,9 +539,9 @@ func TestDaiMgrCreateAppContext(t *testing.T) { if err == nil { t.Fatalf("AppContext creation should have failed - Invalid AssociateDevAppId") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } appContext1.AssociateDevAppId = associateDevAppId1 @@ -600,81 +552,77 @@ func TestDaiMgrCreateAppContext(t *testing.T) { if err == nil { t.Fatalf("AppContext creation should have failed - Empty AppInfo.UserAppInstanceInfo") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } // Create an invalid AppContexts - AppInfo.UserAppInstanceInfo with AppInstanceId set fmt.Println("Create an invalid AppContexts - AppInfo.UserAppInstanceInfo with AppInstanceId set") appContext1.AppInfo.UserAppInstanceInfo = make([]UserAppInstanceInfoItem, 1) - appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{&appInstanceId1_1, nil, nil} + appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{appInstanceId1_1, "", nil} _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { t.Fatalf("AppContext creation should have failed - AppInfo.UserAppInstanceInfo with AppInstanceId set") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } // Create an invalid AppContexts - AppInfo.UserAppInstanceInfo with ReferenceURI set - appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{nil, &referenceURI1_1, nil} + appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{"", referenceURI1_1, nil} _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { t.Fatalf("AppContext creation should have failed - AppInfo.UserAppInstanceInfo with ReferenceURI set") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } // Create an invalid AppContexts - AppInfo.UserAppInstanceInfo with both AppInstanceId and ReferenceURI set appContext1.AppInfo.UserAppInstanceInfo = make([]UserAppInstanceInfoItem, 2) - appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{&appInstanceId1_1, nil, nil} - appContext1.AppInfo.UserAppInstanceInfo[1] = UserAppInstanceInfoItem{nil, &referenceURI1_1, nil} + appContext1.AppInfo.UserAppInstanceInfo[0] = UserAppInstanceInfoItem{appInstanceId1_1, "", nil} + appContext1.AppInfo.UserAppInstanceInfo[1] = UserAppInstanceInfoItem{"", referenceURI1_1, nil} _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { t.Fatalf("AppContext creation should have failed - AppInfo.UserAppInstanceInfo with both AppInstanceId and ReferenceURI set") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } appContext1.AppInfo.UserAppInstanceInfo = userAppInstanceInfo1 - // Create an invalid AppContexts - More than one entries in UserAppInstanceInfo.AppLocation - fmt.Println("Create an invalid AppContexts - More than one entries in UserAppInstanceInfo.AppLocation") - userAppInstanceInfo_wrong := make([]UserAppInstanceInfoItem, 1) // Two entries in userAppInstanceInfo1[0].AppLocation - userAppInstanceInfo_wrong[0] = UserAppInstanceInfoItem{&appInstanceId1_1, &referenceURI1_1, nil} - userAppInstanceInfo_wrong[0].AppLocation = make([]LocationConstraintsItem, 2) - userAppInstanceInfo_wrong[0].AppLocation[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - userAppInstanceInfo_wrong[0].AppLocation[1] = LocationConstraintsItem{nil, nil, &countryCode1} + // Create an invalid AppContexts - More than one records in UserAppInstanceInfo.AppLocation + fmt.Println("Create an invalid AppContexts - More than one records in UserAppInstanceInfo.AppLocation") + userAppInstanceInfo_wrong := make([]UserAppInstanceInfoItem, 1) // Two records in userAppInstanceInfo1[0].AppLocation + userAppInstanceInfo_wrong[0] = UserAppInstanceInfoItem{appInstanceId1_1, referenceURI1_1, nil} + userAppInstanceInfo_wrong[0].AppLocation = &LocationConstraintsItem{nil, nil, &countryCode1} appContext1.AppInfo.UserAppInstanceInfo = userAppInstanceInfo_wrong _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { - t.Fatalf("AppContext creation should have failed - More than one entries in UserAppInstanceInfo.AppLocation") + t.Fatalf("AppContext creation should have failed - More than one records in UserAppInstanceInfo.AppLocation") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } // Create an invalid AppContexts - Multiple instance of UserAppInstanceInfo with the same AppInstanceId fmt.Println("Create an invalid AppContexts - Multiple instance of UserAppInstanceInfo with the same AppInstanceId") - userAppInstanceInfo_wrong = make([]UserAppInstanceInfoItem, 2) // Two entries in userAppInstanceInfo with same AppInstanceId - userAppInstanceInfo_wrong[0] = UserAppInstanceInfoItem{&appInstanceId1_1, &referenceURI1_1, nil} - userAppInstanceInfo_wrong[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo_wrong[0].AppLocation[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - userAppInstanceInfo_wrong[1] = UserAppInstanceInfoItem{&appInstanceId1_1, &referenceURI1_1, nil} - userAppInstanceInfo_wrong[1].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo_wrong[1].AppLocation[0] = LocationConstraintsItem{&area1, nil, &countryCode1} + userAppInstanceInfo_wrong = make([]UserAppInstanceInfoItem, 2) // Two records in userAppInstanceInfo with same AppInstanceId + userAppInstanceInfo_wrong[0] = UserAppInstanceInfoItem{appInstanceId1_1, referenceURI1_1, nil} + userAppInstanceInfo_wrong[0].AppLocation = &LocationConstraintsItem{&area1, nil, &countryCode1} + userAppInstanceInfo_wrong[1] = UserAppInstanceInfoItem{appInstanceId1_1, referenceURI1_1, nil} + userAppInstanceInfo_wrong[1].AppLocation = &LocationConstraintsItem{&area1, nil, &countryCode1} appContext1.AppInfo.UserAppInstanceInfo = userAppInstanceInfo_wrong _, err = am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err == nil { t.Fatalf("AppContext creation should have failed - Multiple instance of UserAppInstanceInfo with the same AppInstanceId") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf("No AppContext record should be present") } appContext1.AppInfo.UserAppInstanceInfo = userAppInstanceInfo1 @@ -685,98 +633,99 @@ func TestDaiMgrCreateAppContext(t *testing.T) { if err != nil { t.Fatalf(err.Error()) } - appContext, err = am.GetAppContext(*appContext.ContextId) + appContext, err = am.GetAppContextRecord(appContext.ContextId) if err != nil { t.Fatalf(err.Error()) } if !validateAppContexts(appContext, appContext1) { t.Fatalf("AppContext validation failed") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 1 { t.Fatalf(err.Error()) } - if !validateAppContexts(appContextMap[*appContext.ContextId], appContext1) { + if !validateAppContexts(appContextMap[appContext.ContextId], appContext1) { t.Fatalf("AppContext validation failed") } // Create another valid AppContext fmt.Println("Create another valid AppContext: ", contextId2) userAppInstanceInfo2 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo2[0] = UserAppInstanceInfoItem{nil, nil, nil} - userAppInstanceInfo2[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo2[0].AppLocation[0] = LocationConstraintsItem{&area2, &civicAddressElement2, &countryCode2} - appInfo2 := AppInfo{&appDId2, appName2, appProvider2, &appSoftVersion2, appDVersion2, appDescription2, userAppInstanceInfo2, &appPackageSource2} - appContext2 := AppContext{nil, associateDevAppId2, callbackReference2, appLocationUpdates2, appAutoInstantiation2, appInfo2} + userAppInstanceInfo2[0] = UserAppInstanceInfoItem{"", "", nil} + userAppInstanceInfo2[0].AppLocation = new(LocationConstraintsItem) + *userAppInstanceInfo2[0].AppLocation = LocationConstraintsItem{&area2, &civicAddressElement2, &countryCode2} + appContextInfo2 := AppInfoContext{appDId2, appName2, appProvider2, &appSoftVersion2, appDVersion2, nil, userAppInstanceInfo2} + var uri2 Uri + uri2 = callbackReference2 + appContext2 := AppContext{"", associateDevAppId2, &uri2, appLocationUpdates2, appAutoInstantiation2, appContextInfo2} appContext, err = am.CreateAppContext(&appContext2, "http://examples.io", "sandbox") if err != nil { t.Fatalf(err.Error()) } - appContext, err = am.GetAppContext(*appContext.ContextId) + appContext, err = am.GetAppContextRecord(appContext.ContextId) if err != nil { t.Fatalf(err.Error()) } if !validateAppContexts(appContext, appContext2) { t.Fatalf("AppContext validation failed") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err = am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 2 { t.Fatalf(err.Error()) } - if !validateAppContexts(appContextMap[*appContext.ContextId], appContext2) { + if !validateAppContexts(appContextMap[appContext.ContextId], appContext2) { t.Fatalf("AppContext validation failed") } if validateAppContexts(appContextMap[contextId2], appContext2) { t.Fatalf("AppContext validation should failed") } - // Create another valid AppContext without any optional field - fmt.Println("Create another valid AppContext: ", contextId3) - userAppInstanceInfo3 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo3[0] = UserAppInstanceInfoItem{nil, nil, nil} - userAppInstanceInfo3[0].AppLocation = make([]LocationConstraintsItem, 0) - appInfo3 := AppInfo{&appDId3, appName3, appProvider3, nil, appDVersion3, appDescription3, userAppInstanceInfo3, nil} - fmt.Println("Create another valid appInfo3: ", appInfo3) - appContext3 := AppContext{nil, associateDevAppId3, callbackReference3, appLocationUpdates3, appAutoInstantiation3, appInfo3} - fmt.Println("Create another valid appContext3: ", appContext3) - appContext, err = am.CreateAppContext(&appContext3, "http://examples.io", "sandbox") - if err != nil { - t.Fatalf(err.Error()) - } - appContext, err = am.GetAppContext(*appContext.ContextId) - if err != nil { - t.Fatalf(err.Error()) - } - if !validateAppContexts(appContext, appContext3) { - t.Fatalf("AppContext validation failed") - } - appContextMap, err = am.GetAllAppContext() - if err != nil || len(appContextMap) != 3 { - t.Fatalf(err.Error()) - } - if !validateAppContexts(appContextMap[*appContext.ContextId], appContext3) { - t.Fatalf("AppContext validation failed") - } - if validateAppContexts(appContextMap[contextId3], appContext3) { - t.Fatalf("AppContext validation should failed") - } - - // Delete all AppContexts - fmt.Println("Delete all AppContexts") - err = am.DeleteAllAppContext() - if err != nil { - t.Fatalf("Failed to delete all AppContexts") - } - appContextMap, err = am.GetAllAppContext() - if err != nil || len(appContextMap) != 0 { - t.Fatalf("AppContext entry should no longer exist") - } + // // Create another valid AppContext without any optional field + // fmt.Println("Create another valid AppContext: ", contextId3) + // userAppInstanceInfo3 := make([]UserAppInstanceInfoItem, 1) + // userAppInstanceInfo3[0] = UserAppInstanceInfoItem{nil, nil, nil} + // userAppInstanceInfo3[0].AppLocation = make([]LocationConstraintsItem, 0) + // appInfo3 := AppInfo{&appDId3, appName3, appProvider3, nil, appDVersion3, appDescription3, userAppInstanceInfo3, nil} + // fmt.Println("Create another valid appInfo3: ", appInfo3) + // appContext3 := AppContext{nil, associateDevAppId3, callbackReference3, appLocationUpdates3, appAutoInstantiation3, appInfo3} + // fmt.Println("Create another valid appContext3: ", appContext3) + // appContext, err = am.CreateAppContext(&appContext3, "http://examples.io", "sandbox") + // if err != nil { + // t.Fatalf(err.Error()) + // } + // appContext, err = am.GetAppContextRecord(*appContext.ContextId) + // if err != nil { + // t.Fatalf(err.Error()) + // } + // if !validateAppContexts(appContext, appContext3) { + // t.Fatalf("AppContext validation failed") + // } + // appContextMap, err = am.GetAllAppContextRecord() + // if err != nil || len(appContextMap) != 3 { + // t.Fatalf(err.Error()) + // } + // if !validateAppContexts(appContextMap[*appContext.ContextId], appContext3) { + // t.Fatalf("AppContext validation failed") + // } + // if validateAppContexts(appContextMap[contextId3], appContext3) { + // t.Fatalf("AppContext validation should failed") + // } + + // // Delete all AppContexts + // fmt.Println("Delete all AppContexts") + // err = am.DeleteAllAppContext() + // if err != nil { + // t.Fatalf("Failed to delete all AppContexts") + // } + // appContextMap, err = am.GetAllAppContextRecord() + // if err != nil || len(appContextMap) != 0 { + // t.Fatalf("AppContext record should no longer exist") + // } err = am.DeleteDaiMgr() if err != nil { t.Fatalf("Failed to delete DaiMgr") } - // t.Fatalf("DONE") } @@ -786,87 +735,94 @@ func TestDaiMgrDeleteAppContext(t *testing.T) { // Create Connector fmt.Println("Create valid Dai Manager") - am, err := NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) + am, err := NewDaiMgr(DaiCfg{nil}) if err != nil || am == nil { t.Fatalf("Failed to create Dai Manager") } - // Cleanup - _ = am.DeleteTables() - - // Create tables - fmt.Println("Create Tables") - err = am.CreateTables() + // Build a complete AppInfoList data structure + appLocation1 := make([]LocationConstraintsItem, 2) + appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} + appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} + appCharcs1 := AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} + appInfo1 := AppInfo{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, &appLocation1, &appCharcs1} + fmt.Println("appInfo1: ", appInfo1) + err = am.CreateAppInfoRecord(appInfo1) if err != nil { - t.Fatalf("Failed to create tables") + t.Fatalf(err.Error()) } - - // Make sure AppContexts don't exist - fmt.Println("Verify no AppContext present") - appContextMap, err := am.GetAllAppContext() + appLocation2 := make([]LocationConstraintsItem, 2) + appLocation2[0] = LocationConstraintsItem{&area2, nil, &countryCode2} + appLocation2[1] = LocationConstraintsItem{nil, &civicAddressElement2, nil} + appCharcs2 := AppCharcs{&memory2, &storage2, &latency2, &bandwidth2, &serviceCont2} + appInfo2 := AppInfo{appDId2, appName2, appProvider2, appSoftVersion2, appDVersion2, appDescription2, &appLocation2, &appCharcs2} + fmt.Println("appInfo2: ", appInfo2) + err = am.CreateAppInfoRecord(appInfo2) if err != nil { - t.Fatalf("Failed to get all AppContexts") - } - if len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") + t.Fatalf(err.Error()) } - - // Fill AppInfoList table - fmt.Println("Fill AppInfoList table") - appLocation1 := make([]LocationConstraintsItem, 2) - appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} - appCharcs1 := make([]AppCharcs, 1) - appCharcs1[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} - appInfoList1 := AppInfoList{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, appLocation1, appCharcs1, appCmd1, []string{}} - err = am.CreateAppEntry(appInfoList1) + appInfo3 := AppInfo{appDId3, appName3, appProvider3, appSoftVersion3, appDVersion3, appDescription3, nil, nil} + err = am.CreateAppInfoRecord(appInfo3) if err != nil { t.Fatalf(err.Error()) } - // Build a complete AppContexts data structure userAppInstanceInfo1 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo1[0] = UserAppInstanceInfoItem{nil, nil, nil} - userAppInstanceInfo1[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo1[0].AppLocation[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - appInfo1 := AppInfo{&appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, appDescription1, userAppInstanceInfo1, &appPackageSource1} - appContext1 := AppContext{nil, associateDevAppId1, callbackReference1, appLocationUpdates1, appAutoInstantiation1, appInfo1} + userAppInstanceInfo1[0] = UserAppInstanceInfoItem{"", "", nil} + userAppInstanceInfo1[0].AppLocation = &LocationConstraintsItem{&area1, nil, &countryCode1} + appInfoContext1 := AppInfoContext{appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, nil, userAppInstanceInfo1} + var uri Uri + uri = callbackReference1 + appContext1 := AppContext{"", associateDevAppId1, &uri, appLocationUpdates1, appAutoInstantiation1, appInfoContext1} // Create a valid AppContext - fmt.Println("Create a valid AppContext: ", appContext1) + fmt.Println("Create a valid AppContext: ", contextId1) appContext, err := am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") if err != nil { t.Fatalf(err.Error()) } - fmt.Println("Created AppContext: ", appContext) + appContext, err = am.GetAppContextRecord(appContext.ContextId) + if err != nil { + t.Fatalf(err.Error()) + } + if !validateAppContexts(appContext, appContext1) { + t.Fatalf("AppContext validation failed") + } + + fmt.Println("Delete an invalid AppContext: ", "") // Delete an invalid AppContext - fmt.Println("Delete an invalid AppContext: ", contextId1) - err = am.DeleteAppContext(contextId1) + fmt.Println("Delete an invalid AppContext: ", "") + err = am.DeleteAppContext("") + if err == nil { + t.Fatalf("AppContext deletion should failed") + } + fmt.Println("Delete an invalid AppContext: ", "unknown") + err = am.DeleteAppContext("unknown") if err == nil { t.Fatalf("AppContext deletion should failed") } // Delete a valid AppContext fmt.Println("Delete a valid AppContext: ", appContext.ContextId) - err = am.DeleteAppContext(*appContext.ContextId) + err = am.DeleteAppContext(appContext.ContextId) if err != nil { t.Fatalf("AppContext deletion failed") } - _, err = am.GetAppContext(*appContext.ContextId) + _, err = am.GetAppContextRecord(appContext.ContextId) if err == nil { t.Fatalf("AppContext still exists after deletion") } - // Delete all AppContexts entries - fmt.Println("Delete all AppContexts entries") + // Delete all AppContexts records + fmt.Println("Delete all AppContexts records") err = am.DeleteAllAppContext() if err != nil { t.Fatalf("Failed to delete all AppContexts") } - appContextMap, err = am.GetAllAppContext() + appContextMap, err := am.GetAllAppContextRecord() if err != nil || len(appContextMap) != 0 { - t.Fatalf("AppContext entry should no longer exist") + t.Fatalf("AppContext record should no longer exist") } err = am.DeleteDaiMgr() @@ -877,103 +833,20 @@ func TestDaiMgrDeleteAppContext(t *testing.T) { // t.Fatalf("DONE") } -func TestDaiMgrPutAppContext(t *testing.T) { +func TestLoadOnboardedMecApplications(t *testing.T) { fmt.Println("--- ", t.Name()) log.MeepTextLogInit(t.Name()) // Create Connector fmt.Println("Create valid Dai Manager") - am, err := NewDaiMgr(DaiCfg { amName, amNamespace, amDBUser, amDBPwd, amDBHost, amDBPort, nil }) + am, err := NewDaiMgr(DaiCfg{nil}) if err != nil || am == nil { t.Fatalf("Failed to create Dai Manager") } - // Cleanup - _ = am.DeleteTables() - - // Create tables - fmt.Println("Create Tables") - err = am.CreateTables() - if err != nil { - t.Fatalf("Failed to create tables") - } - - // Make sure AppContexts don't exist - fmt.Println("Verify no AppContext present") - appContextMap, err := am.GetAllAppContext() - if err != nil { - t.Fatalf("Failed to get all AppContexts") - } - if len(appContextMap) != 0 { - t.Fatalf("No AppContext entry should be present") - } - - // Fill AppInfoList table - fmt.Println("Fill AppInfoList table") - appLocation1 := make([]LocationConstraintsItem, 2) - appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} - appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} - appCharcs1 := make([]AppCharcs, 1) - appCharcs1[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} - appInfoList1 := AppInfoList{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, appLocation1, appCharcs1, appCmd1, []string{}} - err = am.CreateAppEntry(appInfoList1) - if err != nil { - t.Fatalf(err.Error()) - } - - // Build a complete AppContexts data structure - userAppInstanceInfo1 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo1[0] = UserAppInstanceInfoItem{nil, nil, nil} - userAppInstanceInfo1[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo1[0].AppLocation[0] = LocationConstraintsItem{&area1, &civicAddressElement1, &countryCode1} - appInfo1 := AppInfo{&appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, appDescription1, userAppInstanceInfo1, &appPackageSource1} - appContext1 := AppContext{nil, associateDevAppId1, callbackReference1, appLocationUpdates1, appAutoInstantiation1, appInfo1} - // Build another complete AppContexts data structure for invalid behavior tests - userAppInstanceInfo2 := make([]UserAppInstanceInfoItem, 1) - userAppInstanceInfo2[0] = UserAppInstanceInfoItem{&appInstanceId2_1, &referenceURI2_1, nil} - userAppInstanceInfo2[0].AppLocation = make([]LocationConstraintsItem, 1) - userAppInstanceInfo2[0].AppLocation[0] = LocationConstraintsItem{&area2, nil, &countryCode2} - appInfo2 := AppInfo{&appDId2, appName2, appProvider2, &appSoftVersion2, appDVersion2, appDescription2, userAppInstanceInfo2, &appPackageSource2} - appContext2 := AppContext{&contextId2, associateDevAppId2, callbackReference2, appLocationUpdates2, appAutoInstantiation2, appInfo2} - - // Create a valid AppContext - fmt.Println("Create a valid AppContext: ", contextId1) - appContext, err := am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") - if err != nil { - t.Fatalf(err.Error()) - } - - // Update an invalid AppContext - fmt.Println("Update an invalid AppContext: ", contextId2) - err = am.PutAppContext(appContext2) - if err == nil { - t.Fatalf("AppContext update should failed") - } - - // Update a valid AppContext - CallbackReference - fmt.Println("Update a valid AppContext - CallbackReference: ", *appContext.ContextId) - appContext.CallbackReference = callbackReference3 - err = am.PutAppContext(*appContext) - if err != nil { - t.Fatalf("AppContext update failed") - } - appContext, err = am.GetAppContext(*appContext.ContextId) - if err != nil { - t.Fatalf("AppContext should exist after update") - } - if appContext.CallbackReference != callbackReference3 { - t.Fatalf("failed to update AppContext - CallbackReference") - } - - // Delete all AppContexts entries - fmt.Println("Delete all AppContexts") - err = am.DeleteAllAppContext() + err = am.LoadOnboardedMecApplications("../../examples/demo4-ue/src/onboarded-demo/") if err != nil { - t.Fatalf("Failed to delete all AppContexts") - } - appContextMap, err = am.GetAllAppContext() - if err != nil || len(appContextMap) != 0 { - t.Fatalf("AppContext entry should no longer exist") + t.Fatalf("Failed to load MEC application files") } err = am.DeleteDaiMgr() @@ -984,131 +857,241 @@ func TestDaiMgrPutAppContext(t *testing.T) { // t.Fatalf("DONE") } -func validateAppInfoList(appInfoListEntry *AppInfoList, appInfoList AppInfoList) bool { - - if appInfoListEntry.AppDId != appInfoList.AppDId { - fmt.Println("appInfoListEntry.AppDId != appInfoList.AppDId") +// func TestDaiMgrPutAppContext(t *testing.T) { +// fmt.Println("--- ", t.Name()) +// log.MeepTextLogInit(t.Name()) + +// // Create Connector +// fmt.Println("Create valid Dai Manager") +// am, err := NewDaiMgr(DaiCfg{nil}) +// if err != nil || am == nil { +// t.Fatalf("Failed to create Dai Manager") +// } + +// // Cleanup +// _ = am.DeleteTables() + +// // Create tables +// fmt.Println("Create Tables") +// err = am.CreateTables() +// if err != nil { +// t.Fatalf("Failed to create tables") +// } + +// // Make sure AppContexts don't exist +// fmt.Println("Verify no AppContext present") +// appContextMap, err := am.GetAllAppContextRecord() +// if err != nil { +// t.Fatalf("Failed to get all AppContexts") +// } +// if len(appContextMap) != 0 { +// t.Fatalf("No AppContext record should be present") +// } + +// // Fill AppInfoList table +// fmt.Println("Fill AppInfoList table") +// appLocation1 := make([]LocationConstraintsItem, 2) +// appLocation1[0] = LocationConstraintsItem{&area1, nil, &countryCode1} +// appLocation1[1] = LocationConstraintsItem{nil, &civicAddressElement1, nil} +// appCharcs1 := make([]AppCharcs, 1) +// appCharcs1[0] = AppCharcs{&memory1, &storage1, &latency1, &bandwidth1, &serviceCont1} +// appInfo1 := AppInfoList{appDId1, appName1, appProvider1, appSoftVersion1, appDVersion1, appDescription1, appLocation1, appCharcs1} +// err = am.CreateAppInfoRecord(appInfo1) +// if err != nil { +// t.Fatalf(err.Error()) +// } + +// // Build a complete AppContexts data structure +// userAppInstanceInfo1 := make([]UserAppInstanceInfoItem, 1) +// userAppInstanceInfo1[0] = UserAppInstanceInfoItem{nil, nil, nil} +// userAppInstanceInfo1[0].AppLocation = make([]LocationConstraintsItem, 1) +// userAppInstanceInfo1[0].AppLocation[0] = LocationConstraintsItem{&area1, &civicAddressElement1, &countryCode1} +// appInfo1 := AppInfo{&appDId1, appName1, appProvider1, &appSoftVersion1, appDVersion1, appDescription1, userAppInstanceInfo1, &appPackageSource1} +// appContext1 := AppContext{nil, associateDevAppId1, callbackReference1, appLocationUpdates1, appAutoInstantiation1, appInfo1} +// // Build another complete AppContexts data structure for invalid behavior tests +// userAppInstanceInfo2 := make([]UserAppInstanceInfoItem, 1) +// userAppInstanceInfo2[0] = UserAppInstanceInfoItem{&appInstanceId2_1, &referenceURI2_1, nil} +// userAppInstanceInfo2[0].AppLocation = make([]LocationConstraintsItem, 1) +// userAppInstanceInfo2[0].AppLocation[0] = LocationConstraintsItem{&area2, nil, &countryCode2} +// appInfo2 := AppInfo{&appDId2, appName2, appProvider2, &appSoftVersion2, appDVersion2, appDescription2, userAppInstanceInfo2, &appPackageSource2} +// appContext2 := AppContext{&contextId2, associateDevAppId2, callbackReference2, appLocationUpdates2, appAutoInstantiation2, appInfo2} + +// // Create a valid AppContext +// fmt.Println("Create a valid AppContext: ", contextId1) +// appContext, err := am.CreateAppContext(&appContext1, "http://examples.io", "sandbox") +// if err != nil { +// t.Fatalf(err.Error()) +// } + +// // Update an invalid AppContext +// fmt.Println("Update an invalid AppContext: ", contextId2) +// err = am.PutAppContext(appContext2) +// if err == nil { +// t.Fatalf("AppContext update should failed") +// } + +// // Update a valid AppContext - CallbackReference +// fmt.Println("Update a valid AppContext - CallbackReference: ", *appContext.ContextId) +// appContext.CallbackReference = callbackReference3 +// err = am.PutAppContext(*appContext) +// if err != nil { +// t.Fatalf("AppContext update failed") +// } +// appContext, err = am.GetAppContextRecord(*appContext.ContextId) +// if err != nil { +// t.Fatalf("AppContext should exist after update") +// } +// if appContext.CallbackReference != callbackReference3 { +// t.Fatalf("failed to update AppContext - CallbackReference") +// } + +// // Delete all AppContexts records +// fmt.Println("Delete all AppContexts") +// err = am.DeleteAllAppContext() +// if err != nil { +// t.Fatalf("Failed to delete all AppContexts") +// } +// appContextMap, err = am.GetAllAppContextRecord() +// if err != nil || len(appContextMap) != 0 { +// t.Fatalf("AppContext record should no longer exist") +// } + +// err = am.DeleteDaiMgr() +// if err != nil { +// t.Fatalf("Failed to delete DaiMgr") +// } + +// // t.Fatalf("DONE") +// } + +func validateAppInfo(appInfoRecord *AppInfo, appInfo AppInfo) bool { + + if appInfoRecord.AppDId != appInfo.AppDId { + fmt.Println("appInfoRecord.AppDId != appInfo.AppDId") return false } - if appInfoListEntry.AppName != appInfoList.AppName { - fmt.Println("appInfoListEntry.AppName != appInfoList.AppName") + if appInfoRecord.AppName != appInfo.AppName { + fmt.Println("appInfoRecord.AppName != appInfo.AppName") return false } - if appInfoListEntry.AppProvider != appInfoList.AppProvider { - fmt.Println("appInfoListEntry.AppProvider != appInfoList.AppProvider") + if appInfoRecord.AppProvider != appInfo.AppProvider { + fmt.Println("appInfoRecord.AppProvider != appInfo.AppProvider") return false } - if appInfoListEntry.AppSoftVersion != appInfoList.AppSoftVersion { - fmt.Println("appInfoListEntry.AppSoftVersion != appInfoList.AppSoftVersion") + if appInfoRecord.AppSoftVersion != appInfo.AppSoftVersion { + fmt.Println("appInfoRecord.AppSoftVersion != appInfo.AppSoftVersion") return false } - if appInfoListEntry.AppDVersion != appInfoList.AppDVersion { - fmt.Println("appInfoListEntry.AppDVersion != appInfoList.AppDVersion") + if appInfoRecord.AppDVersion != appInfo.AppDVersion { + fmt.Println("appInfoRecord.AppDVersion != appInfo.AppDVersion") return false } - if appInfoListEntry.AppDescription != appInfoList.AppDescription { - fmt.Println("appInfoListEntry.AppDescription != appInfoList.AppDescription") + if appInfoRecord.AppDescription != appInfo.AppDescription { + fmt.Println("appInfoRecord.AppDescription != appInfo.AppDescription") return false } - if len(appInfoListEntry.AppCharcs) != len(appInfoList.AppCharcs) { - fmt.Println("len(appInfoListEntry.AppCharcs) != len(appInfoList.AppCharcs)") - return false - } - if len(appInfoListEntry.AppCharcs) != 0 { - for i, appCharcs := range appInfoListEntry.AppCharcs { - if appCharcs.Memory != nil && appInfoList.AppCharcs[i].Memory != nil { - if *appCharcs.Memory != *appInfoList.AppCharcs[i].Memory { - fmt.Println("appCharcs.Memory != appInfoList.AppCharcs[i].Memory") - return false - } - } else if (appCharcs.Memory == nil) != (appInfoList.AppCharcs[i].Memory != nil) { - fmt.Println("appCharcs.Memory != appInfoList.AppCharcs[i].Memory") + if appInfoRecord.AppCharcs != nil && appInfo.AppCharcs != nil { + if appInfoRecord.AppCharcs.Memory != nil && appInfo.AppCharcs.Memory != nil { + if *appInfoRecord.AppCharcs.Memory != *appInfo.AppCharcs.Memory { + fmt.Println("appCharcs.Memory != appInfo.AppCharcs.Memory") return false } - if appCharcs.Storage != nil && appInfoList.AppCharcs[i].Storage != nil { - if *appCharcs.Storage != *appInfoList.AppCharcs[i].Storage { - fmt.Println("appCharcs.Storage != appInfoList.AppCharcs[i].Storage") - return false - } - } else if (appCharcs.Storage == nil) != (appInfoList.AppCharcs[i].Storage != nil) { - fmt.Println("appCharcs.Storage != appInfoList.AppCharcs[i].Storage") + } else if (appInfoRecord.AppCharcs.Memory == nil) != (appInfo.AppCharcs.Memory != nil) { + fmt.Println("appCharcs.Memory != appInfo.AppCharcs.Memory") + return false + } + if appInfoRecord.AppCharcs.Storage != nil && appInfo.AppCharcs.Storage != nil { + if *appInfoRecord.AppCharcs.Storage != *appInfo.AppCharcs.Storage { + fmt.Println("appInfoRecord.AppCharcs.Storage != appInfo.AppCharcs.Storage") return false } - if appCharcs.Latency != nil && appInfoList.AppCharcs[i].Latency != nil { - if *appCharcs.Latency != *appInfoList.AppCharcs[i].Latency { - fmt.Println("appCharcs.Latency != appInfoList.AppCharcs[i].Latency") - return false - } - } else if (appCharcs.Latency == nil) != (appInfoList.AppCharcs[i].Latency != nil) { - fmt.Println("appCharcs.Latency != appInfoList.AppCharcs[i].Latency") + } else if (appInfoRecord.AppCharcs.Storage == nil) && (appInfo.AppCharcs.Storage != nil) { + fmt.Println("appInfoRecord.AppCharcs.Storage != appInfo.AppCharcs.Storage") + return false + } + if appInfoRecord.AppCharcs.Latency != nil && appInfo.AppCharcs.Latency != nil { + if *appInfoRecord.AppCharcs.Latency != *appInfo.AppCharcs.Latency { + fmt.Println("appInfoRecord.AppCharcs.Latency != appInfo.AppCharcs.Latency") return false } - if appCharcs.Bandwidth != nil && appInfoList.AppCharcs[i].Bandwidth != nil { - if *appCharcs.Bandwidth != *appInfoList.AppCharcs[i].Bandwidth { - fmt.Println("appCharcs.Bandwidth != appInfoList.AppCharcs[i].Bandwidth") - return false - } - } else if (appCharcs.Bandwidth == nil) != (appInfoList.AppCharcs[i].Bandwidth != nil) { - fmt.Println("appCharcs.Bandwidth != appInfoList.AppCharcs[i].Bandwidth") + } else if (appInfoRecord.AppCharcs.Latency == nil) && (appInfo.AppCharcs.Latency != nil) { + fmt.Println("appInfoRecord.AppCharcs.Latency != appInfo.AppCharcs.Latency") + return false + } + if appInfoRecord.AppCharcs.Bandwidth != nil && appInfo.AppCharcs.Bandwidth != nil { + if *appInfoRecord.AppCharcs.Bandwidth != *appInfo.AppCharcs.Bandwidth { + fmt.Println("appInfoRecord.AppCharcs.Bandwidth != appInfo.AppCharcs.Bandwidth") return false } - if appCharcs.ServiceCont != nil && appInfoList.AppCharcs[i].ServiceCont != nil { - if *appCharcs.ServiceCont != *appInfoList.AppCharcs[i].ServiceCont { - fmt.Println("appCharcs.ServiceCont != appInfoList.AppCharcs[i].ServiceCont") - return false - } - } else if (appCharcs.ServiceCont == nil) != (appInfoList.AppCharcs[i].ServiceCont != nil) { - fmt.Println("appCharcs.ServiceCont != appInfoList.AppCharcs[i].ServiceCont") + } else if (appInfoRecord.AppCharcs.Bandwidth == nil) && (appInfo.AppCharcs.Bandwidth != nil) { + fmt.Println("appInfoRecord.AppCharcs.Bandwidth != appInfo.AppCharcs.Bandwidth") + return false + } + if appInfoRecord.AppCharcs.ServiceCont != nil && appInfo.AppCharcs.ServiceCont != nil { + if *appInfoRecord.AppCharcs.ServiceCont != *appInfo.AppCharcs.ServiceCont { + fmt.Println("appInfoRecord.AppCharcs.ServiceCont != appInfo.AppCharcs.ServiceCont") return false } - } // End of 'for' statement - } - if len(appInfoListEntry.AppLocation) != len(appInfoList.AppLocation) { - fmt.Println("len(appInfoListEntry.AppLocation) != len(appInfoList.AppLocation)") + } else if (appInfoRecord.AppCharcs.ServiceCont == nil) && (appInfo.AppCharcs.ServiceCont != nil) { + fmt.Println("appInfoRecord.AppCharcs.ServiceCont != appInfo.AppCharcs.ServiceCont") + return false + } + } else if appInfoRecord.AppCharcs == nil && appInfo.AppCharcs != nil { + fmt.Println("appInfoRecord.AppCharcs != appInfo.AppCharcs") return false } - if len(appInfoListEntry.AppLocation) != 0 { - for j, item1 := range appInfoListEntry.AppLocation { - if item1.Area != nil && appInfoList.AppLocation[j].Area != nil { - if len(item1.Area.Coordinates) != len(appInfoList.AppLocation[j].Area.Coordinates) { - fmt.Println("len(item1.Area.Coordinates) != len(appInfoList.AppLocation[j].Area.Coordinates)") + + if appInfoRecord.AppLocation != nil && appInfo.AppLocation != nil { + if len(*appInfoRecord.AppLocation) != len(*appInfo.AppLocation) { + fmt.Println("len(appInfoRecord.AppLocation) != len(appInfo.AppLocation)") + return false + } + if len(*appInfoRecord.AppLocation) != 0 { + for j, item1 := range *appInfoRecord.AppLocation { + item := *appInfo.AppLocation + if item1.Area != nil && item[j].Area != nil { + if len(item1.Area.Coordinates) != len(item[j].Area.Coordinates) { + fmt.Println("len(item1.Area.Coordinates) != len(appInfo.AppLocation[j].Area.Coordinates)") + return false + } + // TODO Compare content + } else if (item1.Area == nil) && (item[j].Area != nil) { + fmt.Println("item1.Area != appInfo.AppLocation[j].Area") return false } - // TODO Compare content - } else if (item1.Area == nil) != (appInfoList.AppLocation[j].Area == nil) { - fmt.Println("item1.Area != appInfoList.AppLocation[j].Area") - return false - } - if item1.CivicAddressElement != nil && appInfoList.AppLocation[j].CivicAddressElement != nil { - if len(*item1.CivicAddressElement) != len(*appInfoList.AppLocation[j].CivicAddressElement) { - fmt.Println("len(item1.CivicAddressElement) != len(appInfoList.AppLocation[j].CivicAddressElement") + if item1.CivicAddressElement != nil && item[j].CivicAddressElement != nil { + if len(*item1.CivicAddressElement) != len(*item[j].CivicAddressElement) { + fmt.Println("len(item1.CivicAddressElement) != len(appInfo.AppLocation[j].CivicAddressElement") + return false + } + appContextCivicAddressElements := *item[j].CivicAddressElement + for k, cv := range *item1.CivicAddressElement { + if cv != appContextCivicAddressElements[k] { + fmt.Println("cv.CivicAddressElement != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement") + return false + } + } // End of 'for' statement + } else if (item1.CivicAddressElement == nil) && (item[j].CivicAddressElement != nil) { + fmt.Println("item1.CivicAddressElement != appInfo.AppLocation[j].CivicAddressElement)") return false } - appContextCivicAddressElements := *appInfoList.AppLocation[j].CivicAddressElement - for k, cv := range *item1.CivicAddressElement { - if cv != appContextCivicAddressElements[k] { - fmt.Println("cv.CivicAddressElement != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement") + + if item1.CountryCode != nil && item[j].CountryCode != nil { + if *item1.CountryCode != *item[j].CountryCode { + fmt.Println("item1.CountryCode != appInfo.AppLocation[j].CountryCode") return false } - } // End of 'for' statement - } else if (item1.CivicAddressElement == nil) != (appInfoList.AppLocation[j].CivicAddressElement == nil) { - fmt.Println("item1.CivicAddressElement != appInfoList.AppLocation[j].CivicAddressElement)") - return false - } - - if item1.CountryCode != nil && appInfoList.AppLocation[j].CountryCode != nil { - if *item1.CountryCode != *appInfoList.AppLocation[j].CountryCode { - fmt.Println("item1.CountryCode != appInfoList.AppLocation[j].CountryCode") + } else if (item1.CountryCode == nil) && (item[j].CountryCode != nil) { + fmt.Println("item1.CountryCode != appInfo.AppLocation[j].CountryCode") return false } - } else if (item1.CountryCode == nil) != (appInfoList.AppLocation[j].CountryCode == nil) { - fmt.Println("item1.CountryCode != appInfoList.AppLocation[j].CountryCode") - return false - } - } // End of 'for' statement + } // End of 'for' statement + } + } else if appInfoRecord.AppLocation == nil && appInfo.AppLocation != nil { + fmt.Println("appInfoRecord.AppLocation != appInfo.AppLocation") + return false } - return true } @@ -1118,7 +1101,7 @@ func validateAppContexts(appContextEntry *AppContext, appContext AppContext) boo fmt.Println("appContextEntry should not be nil") return false } - if appContextEntry.ContextId == nil || appContextEntry.ContextId == appContext.ContextId { + if appContextEntry.ContextId != appContext.ContextId { fmt.Println("appContextEntry.ContextId != ContextId") return false } @@ -1126,8 +1109,13 @@ func validateAppContexts(appContextEntry *AppContext, appContext AppContext) boo fmt.Println("appContextEntry.AssociateDevAppId != AssociateDevAppId") return false } - if appContextEntry.CallbackReference != appContext.CallbackReference { - fmt.Println("appContextEntry.CallbackReference != CallbackReference") + if appContextEntry.CallbackReference != nil && appContext.CallbackReference != nil { + if *appContextEntry.CallbackReference != *appContext.CallbackReference { + fmt.Println("appContextEntry.CallbackReference != CallbackReference") + return false + } + } else if appContextEntry.CallbackReference != nil || appContext.CallbackReference != nil { + fmt.Println("appContextEntry.CallbackReference != appContext.CallbackReference") return false } if appContextEntry.AppLocationUpdates != appContext.AppLocationUpdates { @@ -1139,14 +1127,7 @@ func validateAppContexts(appContextEntry *AppContext, appContext AppContext) boo return false } - if appContextEntry.AppInfo.AppDId != nil && appContext.AppInfo.AppDId != nil { - fmt.Println("*appContext.AppInfo.AppDId: ", *appContext.AppInfo.AppDId) - fmt.Println("*appContextEntry.AppInfo.AppDId: ", *appContextEntry.AppInfo.AppDId) - if *appContextEntry.AppInfo.AppDId != *appContext.AppInfo.AppDId { - fmt.Println("*appContextEntry.AppInfo.AppDId != *AppInfo.AppDId") - return false - } - } else if appContextEntry.AppInfo.AppDId != nil || appContext.AppInfo.AppDId != nil { + if appContextEntry.AppInfo.AppDId != appContext.AppInfo.AppDId { fmt.Println("appContextEntry.AppInfo.AppDId != AppInfo.AppDId") return false } @@ -1175,15 +1156,6 @@ func validateAppContexts(appContextEntry *AppContext, appContext AppContext) boo fmt.Println("appContextEntry.AppInfo.AppDescription != AppInfo.AppDescription") return false } - if appContextEntry.AppInfo.AppPackageSource != nil && appContext.AppInfo.AppPackageSource != nil { - if *appContextEntry.AppInfo.AppPackageSource != *appContext.AppInfo.AppPackageSource { - fmt.Println("*appContextEntry.AppInfo.AppPackageSource != *AppInfo.AppPackageSource") - return false - } - } else if appContextEntry.AppInfo.AppPackageSource != nil || appContext.AppInfo.AppPackageSource != nil { - fmt.Println("appContextEntry.AppInfo.AppPackageSource != AppInfo.AppPackageSource") - return false - } if appContextEntry.AppInfo.UserAppInstanceInfo == nil || appContext.AppInfo.UserAppInstanceInfo == nil { fmt.Println("appContextEntry.AppInfo.UserAppInstanceInfo != AppInfo.UserAppInstanceInfo") return false @@ -1201,82 +1173,65 @@ func validateAppContexts(appContextEntry *AppContext, appContext AppContext) boo fmt.Println("validateAppContexts: item: ", item) // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId: ", *appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId) // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI: ", *appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI) - if item.AppInstanceId != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId != nil { - if *item.AppInstanceId != *appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId { - fmt.Println("*item.AppInstanceId != *AppInfo.UserAppInstanceInfo.AppInstanceId") - return false - } - } else if (item.AppInstanceId == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId == nil) { - fmt.Println("item.AppInstanceId != AppInfo.UserAppInstanceInfo.AppInstanceId") + if item.AppInstanceId != appContext.AppInfo.UserAppInstanceInfo[i].AppInstanceId { + fmt.Println("*item.AppInstanceId != *AppInfo.UserAppInstanceInfo.AppInstanceId") return false } fmt.Println("validateAppContexts: item.ReferenceURI: ", item.ReferenceURI) fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI: ", appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI) - if item.ReferenceURI != nil && appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI != nil { - if *item.ReferenceURI != *appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI { - fmt.Println("*item.ReferenceURI != *AppInfo.UserAppInstanceInfo.ReferenceURI") - return false - } - } else if (item.ReferenceURI == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI == nil) { - fmt.Println("item.ReferenceURI != AppInfo.UserAppInstanceInfo.ReferenceURI") + if item.ReferenceURI != appContext.AppInfo.UserAppInstanceInfo[i].ReferenceURI { + fmt.Println("*item.ReferenceURI != *AppInfo.UserAppInstanceInfo.ReferenceURI") return false } if item.AppLocation != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation != nil { - // fmt.Println("len(item.AppLocation): ", len(item.AppLocation)) - // fmt.Println("len(appContext.AppInfo.UserAppInstanceInfo.AppLocation): ", len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation)) - if len(item.AppLocation) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation) { - fmt.Println("len(item1)!= len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation") - return false - } - for j, item1 := range item.AppLocation { - // fmt.Println("validateAppContexts: Process item j#", j) - // fmt.Println("validateAppContexts: item1.Area: ", item1.Area) - // fmt.Println("validateAppContexts: item1.CivicAddressElement: ", item1.CivicAddressElement) - // fmt.Println("validateAppContexts: item1.CountryCode: ", item1.CountryCode) - // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].Area: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area) - // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].CivicAddressElement: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement) - // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].CountryCode: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode) - if item1.Area != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area != nil { - if len(item1.Area.Coordinates) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area.Coordinates) { - fmt.Println("len(item1.Area.Coordinates) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area.Coordinates)") - return false - } - // TODO Compare content - } else if (item1.Area == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area == nil) { - fmt.Println("item1.Area != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area") + item1 := *item.AppLocation + // fmt.Println("validateAppContexts: Process item j#", j) + // fmt.Println("validateAppContexts: item1.Area: ", item1.Area) + // fmt.Println("validateAppContexts: item1.CivicAddressElement: ", item1.CivicAddressElement) + // fmt.Println("validateAppContexts: item1.CountryCode: ", item1.CountryCode) + // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].Area: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].Area) + // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].CivicAddressElement: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement) + // fmt.Println("validateAppContexts: appContext.AppInfo.UserAppInstanceInfo[i].CountryCode: ", appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode) + if item1.Area != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.Area != nil { + if len(item1.Area.Coordinates) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.Area.Coordinates) { + fmt.Println("len(item1.Area.Coordinates) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.Area.Coordinates)") return false } + // TODO Compare content + } else if (item1.Area == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.Area == nil) { + fmt.Println("item1.Area != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.Area") + return false + } - if item1.CivicAddressElement != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement != nil { - if len(*item1.CivicAddressElement) != len(*appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement) { - fmt.Println("len(item1.CivicAddressElement) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement") - return false - } - appContextCivicAddressElements := *appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement - for k, cv := range *item1.CivicAddressElement { - fmt.Println("validateAppContexts: Process item k#", k) - fmt.Println("validateAppContexts: cv: ", cv) - fmt.Println("validateAppContexts: civicAddressElements[k]: ", appContextCivicAddressElements) - if cv != appContextCivicAddressElements[k] { - fmt.Println("cv.CivicAddressElement != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement") - return false - } - } // End of 'for' statement - } else if (item1.CivicAddressElement == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CivicAddressElement == nil) { - fmt.Println("item1.CivicAddressElement != AppInfo.UserAppInstanceInfo.CivicAddressElement)") + if item1.CivicAddressElement != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement != nil { + if len(*item1.CivicAddressElement) != len(*appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement) { + fmt.Println("len(item1.CivicAddressElement) != len(appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement") return false } - - if item1.CountryCode != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode != nil { - if *item1.CountryCode != *appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode { - fmt.Println("item1.CountryCode != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode") + appContextCivicAddressElements := *appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement + for k, cv := range *item1.CivicAddressElement { + fmt.Println("validateAppContexts: Process item k#", k) + fmt.Println("validateAppContexts: cv: ", cv) + fmt.Println("validateAppContexts: civicAddressElements[k]: ", appContextCivicAddressElements) + if cv != appContextCivicAddressElements[k] { + fmt.Println("cv.CivicAddressElement != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement") return false } - } else if (item1.CountryCode == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation[j].CountryCode == nil) { - fmt.Println("item1.CountryCode != AppInfo.UserAppInstanceInfo.CountryCode") + } // End of 'for' statement + } else if (item1.CivicAddressElement == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CivicAddressElement == nil) { + fmt.Println("item1.CivicAddressElement != AppInfo.UserAppInstanceInfo.CivicAddressElement)") + return false + } + + if item1.CountryCode != nil && appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode != nil { + if *item1.CountryCode != *appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode { + fmt.Println("item1.CountryCode != appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode") return false } - } // End of 'for' statement + } else if (item1.CountryCode == nil) != (appContext.AppInfo.UserAppInstanceInfo[i].AppLocation.CountryCode == nil) { + fmt.Println("item1.CountryCode != AppInfo.UserAppInstanceInfo.CountryCode") + return false + } } } // End of 'for' statement diff --git a/test/system/dai_test.go b/test/system/dai_test.go index f50e8bd0cf392b156aa9b33b7057a4cade96504c..9b6e642737b8f457dae15eef75e9bb29b13b8c39 100644 --- a/test/system/dai_test.go +++ b/test/system/dai_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 ETSI STF 625 + * Copyright (c) 2024 ETSI STF 625 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/test/system/go.mod b/test/system/go.mod index 9b63593fe86a9093d59a458e4cc4064761e24b0d..8123336c4e6dc6be5c4ce07f5a41940266d2e119 100644 --- a/test/system/go.mod +++ b/test/system/go.mod @@ -4,6 +4,7 @@ go 1.12 require ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-dai-client v0.0.0-00010101000000-000000000000 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-loc-serv-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0-00010101000000-000000000000 @@ -11,6 +12,7 @@ require ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-rnis-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client v0.0.0 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-vis-client v0.0.0-00010101000000-000000000000 github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-wais-client v0.0.0 github.com/ghodss/yaml v1.0.0 gopkg.in/yaml.v2 v2.2.2 // indirect @@ -18,6 +20,7 @@ require ( replace ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client => ../../go-packages/meep-app-support-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-dai-client => ../../go-packages/meep-dai-client github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client => ../../go-packages/meep-gis-engine-client github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-loc-serv-client => ../../go-packages/meep-loc-serv-client github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger => ../../go-packages/meep-logger @@ -27,5 +30,4 @@ replace ( github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client => ../../go-packages/meep-service-mgmt-client github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-vis-client => ../../go-packages/meep-vis-client github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-wais-client => ../../go-packages/meep-wais-client - github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-dai-client => ../../go-packages/meep-dai-client ) diff --git a/test/system/go.sum b/test/system/go.sum index 1859e16306c966bbef3d94773454f3d6b3efb161..5d40f0ed3e5347283f6352614b71d1f1325bc5f4 100644 --- a/test/system/go.sum +++ b/test/system/go.sum @@ -1,40 +1,388 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/InterDigitalInc/AdvantEDGE v1.9.2 h1:CAcF+bn5m0Va2mHFL2lE4awU/kjuF6CjC05phiz8vnk= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=