Add control-loop rest payloads for script version of ORU usecase 04/6504/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 20 Jul 2021 13:42:31 +0000 (15:42 +0200)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 20 Jul 2021 13:42:37 +0000 (15:42 +0200)
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 <muhammad.rehan.raza@est.tech>
test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/commission.yaml [new file with mode: 0644]
test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation-command.json [new file with mode: 0644]
test/usecases/oruclosedlooprecovery/scriptversion/controlloop-rest-payloads/instantiation.json [new file with mode: 0644]
test/usecases/oruclosedlooprecovery/scriptversion/helm/dmaap-mr/Chart.yaml
test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/Chart.yaml
test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/Chart.yaml
test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/Chart.yaml

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 (file)
index 0000000..7e91348
--- /dev/null
@@ -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 (file)
index 0000000..a09c112
--- /dev/null
@@ -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 (file)
index 0000000..e80b67f
--- /dev/null
@@ -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
index 82b7895..95b7f51 100644 (file)
@@ -13,7 +13,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 
-apiVersion: v2
+apiVersion: v1
 name: dmaap-mr
 description: A Helm chart for Kubernetes
 
index b336fd8..59720da 100644 (file)
@@ -13,7 +13,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 
-apiVersion: v2
+apiVersion: v1
 name: message-generator
 description: A Helm chart for Kubernetes
 
index 42330a7..ed7203c 100644 (file)
@@ -13,7 +13,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 
-apiVersion: v2
+apiVersion: v1
 name: oru-app
 description: A Helm chart for Kubernetes
 
index 8890782..0e31143 100644 (file)
@@ -13,7 +13,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 
-apiVersion: v2
+apiVersion: v1
 name: sdnr-simulator
 description: A Helm chart for Kubernetes