From 72951a9e46961aa98d20b4674cc091039917a494 Mon Sep 17 00:00:00 2001 From: RehanRaza Date: Tue, 20 Jul 2021 15:42:31 +0200 Subject: [PATCH] Add control-loop rest payloads for script version of ORU usecase These payloads are used when the microservices are deployed using kubernetes participant as part of a control loop. Change-Id: Ia18ce17857a2815b5b92aff6b7139b008631d2d6 Issue-ID: NONRTRIC-554 Signed-off-by: RehanRaza --- .../controlloop-rest-payloads/commission.yaml | 183 +++++++++++++++++++++ .../instantiation-command.json | 9 + .../controlloop-rest-payloads/instantiation.json | 73 ++++++++ .../scriptversion/helm/dmaap-mr/Chart.yaml | 2 +- .../helm/message-generator/Chart.yaml | 2 +- .../scriptversion/helm/oru-app/Chart.yaml | 2 +- .../scriptversion/helm/sdnr-simulator/Chart.yaml | 2 +- 7 files changed, 269 insertions(+), 4 deletions(-) create mode 100644 test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/commission.yaml create mode 100644 test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation-command.json create mode 100644 test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation.json diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/commission.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/commission.yaml new file mode 100644 index 00000000..7e913482 --- /dev/null +++ b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/commission.yaml @@ -0,0 +1,183 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# +tosca_definitions_version: tosca_simple_yaml_1_1_0 +data_types: + onap.datatypes.ToscaConceptIdentifier: + derived_from: tosca.datatypes.Root + properties: + name: + type: string + required: true + version: + type: string + required: true +node_types: + org.onap.policy.clamp.controlloop.Participant: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + requred: false + org.onap.policy.clamp.controlloop.ControlLoop: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + requred: false + elements: + type: list + required: true + entry_schema: + type: onap.datatypes.ToscaConceptIdentifier + org.onap.policy.clamp.controlloop.ControlLoopElement: + version: 1.0.1 + derived_from: tosca.nodetypes.Root + properties: + provider: + type: string + requred: false + participant_id: + type: onap.datatypes.ToscaConceptIdentifier + requred: true + org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement: + version: 1.0.1 + derived_from: org.onap.policy.clamp.controlloop.ControlLoopElement + properties: + chart: + type: string + required: true + configs: + type: list + required: false + requirements: + type: string + requred: false + templates: + type: list + required: false + entry_schema: + values: + type: string + requred: true +topology_template: + node_templates: + org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition: + version: 1.2.3 + type: org.onap.policy.clamp.controlloop.ControlLoop + type_version: 1.0.1 + description: Control loop for Link Monitor + properties: + provider: Ericsson + elements: + - name: org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement + version: 1.2.3 + - name: org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement + version: 1.2.3 + - name: org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement + version: 1.2.3 + - name: org.onap.domain.linkmonitor.DmaapMrK8SMicroserviceControlLoopElement + version: 1.2.3 + org.onap.k8s.controlloop.K8SControlLoopParticipant: + version: 2.3.4 + type: org.onap.policy.clamp.controlloop.Participant + type_version: 1.0.1 + description: Participant for k8s + properties: + provider: ONAP + org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement: + version: 1.2.3 + type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement + type_version: 1.0.1 + description: Control loop element for oru-app + properties: + provider: ONAP + participant_id: + name: org.onap.k8s.controlloop.K8SControlLoopParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + podStatusCheckInterval: 30 + chart: + chartId: + name: oru-app + version: 0.1.0 + releaseName: oru-app + # repository can point to a helm repo or a path in local file system where chart is stored + repository: local + namespace: nonrtric + org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement: + version: 1.2.3 + type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement + type_version: 1.0.1 + description: Control loop element for message-generator + properties: + provider: ONAP + participant_id: + name: org.onap.k8s.controlloop.K8SControlLoopParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + podStatusCheckInterval: 30 + chart: + chartId: + name: message-generator + version: 0.1.0 + releaseName: message-generator + # repository can point to a helm repo or a path in local file system where chart is stored + repository: local + namespace: nonrtric + overrideParams: + image.tag: v2 + org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement: + version: 1.2.3 + type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement + type_version: 1.0.1 + description: Control loop element for sdnr-simulator + properties: + provider: ONAP + participant_id: + name: org.onap.k8s.controlloop.K8SControlLoopParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + podStatusCheckInterval: 30 + chart: + chartId: + name: sdnr-simulator + version: 0.1.0 + releaseName: sdnr-simulator + # repository can point to a helm repo or a path in local file system where chart is stored + repository: local + namespace: nonrtric + org.onap.domain.linkmonitor.DmaapMrK8SMicroserviceControlLoopElement: + version: 1.2.3 + type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement + type_version: 1.0.1 + description: Control loop element for dmaap-mr + properties: + provider: ONAP + participant_id: + name: org.onap.k8s.controlloop.K8SControlLoopParticipant + version: 2.3.4 + uninitializedToPassiveTimeout: 180 + podStatusCheckInterval: 30 + chart: + chartId: + name: dmaap-mr + version: 0.1.0 + releaseName: dmaap-mr + # repository can point to a helm repo or a path in local file system where chart is stored + repository: local + namespace: nonrtric \ No newline at end of file diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation-command.json b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation-command.json new file mode 100644 index 00000000..a09c1121 --- /dev/null +++ b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation-command.json @@ -0,0 +1,9 @@ +{ + "orderedState": "RUNNING", + "controlLoopIdentifierList": [ + { + "name": "LinkMonitorInstance0", + "version": "1.0.1" + } + ] +} \ No newline at end of file diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation.json b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation.json new file mode 100644 index 00000000..e80b67f7 --- /dev/null +++ b/test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation.json @@ -0,0 +1,73 @@ +{ + "controlLoopList": [ + { + "name": "LinkMonitorInstance0", + "version": "1.0.1", + "definition": { + "name": "org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition", + "version": "1.2.3" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Link Monitor control loop instance 0", + "elements": { + "709c62b3-8918-41b9-a747-d21eb79c6c22": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c22", + "definition": { + "name": "org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement", + "version": "1.2.3" + }, + "participantType": { + "name": "org.onap.k8s.controlloop.K8SControlLoopParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Oru App k8s Control Loop Element" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c23": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c23", + "definition": { + "name": "org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement", + "version": "1.2.3" + }, + "participantType": { + "name": "org.onap.k8s.controlloop.K8SControlLoopParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Message Generator k8s Control Loop Element" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c24": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c24", + "definition": { + "name": "org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement", + "version": "1.2.3" + }, + "participantType": { + "name": "org.onap.k8s.controlloop.K8SControlLoopParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Sdnr Simulator k8s Control Loop Element" + }, + "709c62b3-8918-41b9-a747-d21eb79c6c25": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c25", + "definition": { + "name": "org.onap.domain.linkmonitor.DmaapMrK8SMicroserviceControlLoopElement", + "version": "1.2.3" + }, + "participantType": { + "name": "org.onap.k8s.controlloop.K8SControlLoopParticipant", + "version": "2.3.4" + }, + "state": "UNINITIALISED", + "orderedState": "UNINITIALISED", + "description": "Dmaap Mr k8s Control Loop Element" + } + } + } + ] +} \ No newline at end of file diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/helm/dmaap-mr/Chart.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/helm/dmaap-mr/Chart.yaml index 82b7895a..95b7f51e 100644 --- a/test/usecases/oruclosedlooprecovery/scriptversion/helm/dmaap-mr/Chart.yaml +++ b/test/usecases/oruclosedlooprecovery/scriptversion/helm/dmaap-mr/Chart.yaml @@ -13,7 +13,7 @@ # limitations under the License. # ============LICENSE_END================================================= -apiVersion: v2 +apiVersion: v1 name: dmaap-mr description: A Helm chart for Kubernetes diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/Chart.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/Chart.yaml index b336fd8e..59720da2 100644 --- a/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/Chart.yaml +++ b/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/Chart.yaml @@ -13,7 +13,7 @@ # limitations under the License. # ============LICENSE_END================================================= -apiVersion: v2 +apiVersion: v1 name: message-generator description: A Helm chart for Kubernetes diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/Chart.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/Chart.yaml index 42330a79..ed7203c1 100644 --- a/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/Chart.yaml +++ b/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/Chart.yaml @@ -13,7 +13,7 @@ # limitations under the License. # ============LICENSE_END================================================= -apiVersion: v2 +apiVersion: v1 name: oru-app description: A Helm chart for Kubernetes diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/Chart.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/Chart.yaml index 88907822..0e311434 100644 --- a/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/Chart.yaml +++ b/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/Chart.yaml @@ -13,7 +13,7 @@ # limitations under the License. # ============LICENSE_END================================================= -apiVersion: v2 +apiVersion: v1 name: sdnr-simulator description: A Helm chart for Kubernetes -- 2.16.6