rApp - Hello World SME Invoker 87/12587/4
authorambrishest <ambrish.singh@est.tech>
Fri, 1 Mar 2024 13:30:49 +0000 (13:30 +0000)
committerambrishest <ambrish.singh@est.tech>
Mon, 11 Mar 2024 17:38:35 +0000 (17:38 +0000)
Issue-ID: NONRTRIC-965
Change-Id: Icd743e0012215c2a3e9c10da506ebd4e0d21714b
Signed-off-by: ambrishest <ambrish.singh@est.tech>
sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf [new file with mode: 0644]
sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz

diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz b/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz
new file mode 100644 (file)
index 0000000..3dfa1bb
Binary files /dev/null and b/sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz differ
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml
new file mode 100644 (file)
index 0000000..6e921c0
--- /dev/null
@@ -0,0 +1,48 @@
+#  ============LICENSE_START=======================================================\r
+#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+#  ================================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#        http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#  SPDX-License-Identifier: Apache-2.0\r
+#  ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+\r
+description: rApp Hello World SME Invoker\r
+\r
+imports:\r
+  - asd_types.yaml\r
+\r
+topology_template:\r
+  node_templates:\r
+    applicationServiceDescriptor:\r
+      type: tosca.nodes.asd\r
+      description: "rapp-hello-world-sme-invoker"\r
+      properties:\r
+        descriptor_id: 2cd6a567-2e33-5970-8ef7-1cc519c998c4\r
+        descriptor_invariant_id: 3f8a5e1b-78g1-42e5-89d0-47090dd0ef5a\r
+        descriptor_version: 1.0\r
+        schema_version: 2.0\r
+        function_description: rApp description\r
+        provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+        application_name: rapp-hello-world-sme-invoker\r
+        application_version: 1.0\r
+      artifacts:\r
+        helloworld:\r
+          type: tosca.artifacts.asd.deploymentItem\r
+          file: "Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz"\r
+          properties:\r
+            artifact_type: "helm_chart"\r
+            target_server: "chartmuseum"\r
+            target_server_uri: "UPDATE_THIS_CHART_MUSEUM_POST_CHARTS_URI"\r
+            item_id: 1\r
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml b/sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml
new file mode 100644 (file)
index 0000000..c4de6ad
--- /dev/null
@@ -0,0 +1,90 @@
+#  ============LICENSE_START=======================================================\r
+#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.\r
+#  ================================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#        http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#  SPDX-License-Identifier: Apache-2.0\r
+#  ============LICENSE_END=========================================================\r
+\r
+tosca_definitions_version: tosca_simple_yaml_1_2\r
+description: ASD types definitions version 0.1\r
+node_types:\r
+  tosca.nodes.asd:\r
+    derived_from: tosca.nodes.Root\r
+    description: "The ASD node type"\r
+    version: 0.1\r
+    properties:\r
+      descriptor_id:\r
+        type: string # UUID\r
+        required: true\r
+        description: Identifier of this ASD. It is in UUID format as specified in RFC 4122\r
+      descriptor_invariant_id:\r
+        type: string # UUID\r
+        required: true\r
+        description: >\r
+          Identifier of this descriptor in a version independent manner. This attribute\r
+          is invariant across versions of ASD. It is in UUID format as specified in RFC 4122\r
+      descriptor_version:\r
+        type: string\r
+        required: true\r
+        description: Identifies the version of the ASD.\r
+      schema_version:\r
+        type: string\r
+        required: true\r
+        description: Identifies the Identifies the version of this ASD’s schema.\r
+      function_description:\r
+        type: string\r
+        required: false\r
+        description: Description of the application service described by this ASD.\r
+      provider:\r
+        type: string\r
+        required: true\r
+        description: Identifies the provider of the ASD.\r
+      application_name:\r
+        type: string\r
+        required: true\r
+        description: Name to identify the application service described by this ASD\r
+      application_version:\r
+        type: string\r
+        required: true\r
+        description: Identifies the version of the application service described by this ASD.\r
+\r
+artifact_types:\r
+tosca.artifacts.asd.deploymentItem:\r
+  version: 0.1\r
+  derived_from: tosca.artifacts.Root\r
+  description: "Describes the artifact type of asd deployment item"\r
+  file: "Relative path of the artifact in the package"\r
+  properties:\r
+    item_id:\r
+      description: "The identifier of this asd deployment item"\r
+      required: true\r
+      type: string\r
+    artifact_type:\r
+      description: >\r
+        Specify artifact type.\r
+      required: true\r
+      type: string\r
+      constraints:\r
+        - valid_values: ["helm_chart"]\r
+    target_server:\r
+      description: >\r
+        Specify target server for artifact.\r
+      required: true\r
+      type: string\r
+      constraints:\r
+        - valid_values: [ "chartmuseum" ]\r
+    target_server_uri:\r
+      description: "URI of the target server"\r
+      required: true\r
+      type: string
\ No newline at end of file
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json
new file mode 100644 (file)
index 0000000..f7b0401
--- /dev/null
@@ -0,0 +1,189 @@
+{\r
+  "tosca_definitions_version": "tosca_simple_yaml_1_3",\r
+  "data_types": {\r
+    "onap.datatypes.ToscaConceptIdentifier": {\r
+      "derived_from": "tosca.datatypes.Root",\r
+      "properties": {\r
+        "name": {\r
+          "type": "string",\r
+          "required": true\r
+        },\r
+        "version": {\r
+          "type": "string",\r
+          "required": true\r
+        }\r
+      }\r
+    }\r
+  },\r
+  "node_types": {\r
+    "org.onap.policy.clamp.acm.Participant": {\r
+      "version": "1.0.1",\r
+      "derived_from": "tosca.nodetypes.Root",\r
+      "properties": {\r
+        "provider": {\r
+          "type": "string",\r
+          "required": false\r
+        }\r
+      }\r
+    },\r
+    "org.onap.policy.clamp.acm.AutomationCompositionElement": {\r
+      "version": "1.0.1",\r
+      "derived_from": "tosca.nodetypes.Root",\r
+      "properties": {\r
+        "provider": {\r
+          "type": "string",\r
+          "required": false\r
+        },\r
+        "participantType": {\r
+          "type": "onap.datatypes.ToscaConceptIdentifier",\r
+          "required": true\r
+        },\r
+        "startPhase": {\r
+          "type": "integer",\r
+          "required": false,\r
+          "constraints": [\r
+            {\r
+              "greater-or-equal": 0\r
+            }\r
+          ],\r
+          "metadata": {\r
+            "common": true\r
+          },\r
+          "description": "A value indicating the start phase in which this automation composition element will be started, the first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped in reverse start phase order. Automation Composition Elements with the same start phase are started and stopped simultaneously"\r
+        },\r
+        "passiveToRunningTimeout": {\r
+          "type": "integer",\r
+          "required": false,\r
+          "constraints": [\r
+            {\r
+              "greater_or_equal": 0\r
+            }\r
+          ],\r
+          "default": 60,\r
+          "metadata": {\r
+            "common": true\r
+          },\r
+          "description": "The maximum time in seconds to wait for a state chage from passive to running"\r
+        },\r
+        "runningToPassiveTimeout": {\r
+          "type": "integer",\r
+          "required": false,\r
+          "constraints": [\r
+            {\r
+              "greater_or_equal": 0\r
+            }\r
+          ],\r
+          "default": 60,\r
+          "metadata": {\r
+            "common": true\r
+          },\r
+          "description": "The maximum time in seconds to wait for a state chage from running to passive"\r
+        },\r
+        "passiveToUninitializedTimeout": {\r
+          "type": "integer",\r
+          "required": false,\r
+          "constraints": [\r
+            {\r
+              "greater_or_equal": 0\r
+            }\r
+          ],\r
+          "default": 60,\r
+          "metadata": {\r
+            "common": true\r
+          },\r
+          "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized"\r
+        }\r
+      }\r
+    },\r
+    "org.onap.policy.clamp.acm.AutomationComposition": {\r
+      "version": "1.0.1",\r
+      "derived_from": "tosca.nodetypes.Root",\r
+      "properties": {\r
+        "provider": {\r
+          "type": "string",\r
+          "required": false,\r
+          "metadata": {\r
+            "common": true\r
+          }\r
+        },\r
+        "elements": {\r
+          "type": "list",\r
+          "required": true,\r
+          "metadata": {\r
+            "common": true\r
+          },\r
+          "entry_schema": {\r
+            "type": "onap.datatypes.ToscaConceptIdentifier"\r
+          }\r
+        }\r
+      }\r
+    },\r
+    "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": {\r
+      "version": "1.0.0",\r
+      "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement",\r
+      "properties": {\r
+        "chart": {\r
+          "type": "string",\r
+          "required": true\r
+        },\r
+        "configs": {\r
+          "type": "list",\r
+          "required": false\r
+        },\r
+        "requirements": {\r
+          "type": "string",\r
+          "required": false\r
+        },\r
+        "templates": {\r
+          "type": "list",\r
+          "required": false,\r
+          "entry_schema": null\r
+        },\r
+        "values": {\r
+          "type": "string",\r
+          "required": true\r
+        }\r
+      }\r
+    }\r
+  },\r
+  "topology_template": {\r
+    "node_templates": {\r
+      "org.onap.k8s.acm.K8SAutomationCompositionParticipant": {\r
+        "version": "2.3.4",\r
+        "type": "org.onap.policy.clamp.acm.Participant",\r
+        "type_version": "1.0.1",\r
+        "description": "Participant for K8S",\r
+        "properties": {\r
+          "provider": "ONAP"\r
+        }\r
+      },\r
+      "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": {\r
+        "version": "1.2.3",\r
+        "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement",\r
+        "type_version": "1.0.0",\r
+        "description": "Automation composition element for the K8S microservice for AC Element Starter",\r
+        "properties": {\r
+          "provider": "ONAP",\r
+          "startPhase": 0,\r
+          "uninitializedToPassiveTimeout": 300,\r
+          "podStatusCheckInterval": 30\r
+        }\r
+      },\r
+      "onap.policy.clamp.ac.element.AutomationCompositionDefinition": {\r
+        "version": "1.2.3",\r
+        "type": "org.onap.policy.clamp.acm.AutomationComposition",\r
+        "type_version": "1.0.1",\r
+        "description": "Automation composition for rapp deployment",\r
+        "properties": {\r
+          "provider": "ONAP",\r
+          "elements": [\r
+            {\r
+              "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",\r
+              "version": "1.2.3"\r
+            }\r
+          ]\r
+        }\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json
new file mode 100644 (file)
index 0000000..917497e
--- /dev/null
@@ -0,0 +1,35 @@
+{\r
+  "name": "K8SmeInvokerDemoInstance0",\r
+  "version": "1.0.1",\r
+  "compositionId": "DO_NOT_CHANGE_THIS_COMPOSITION_ID",\r
+  "description": "Demo automation composition instance 0",\r
+  "elements": {\r
+    "d7be552e-bdd5-2233-b64d-797dbaec8f55": {\r
+      "id": "d7be552e-bdd5-2233-b64d-797dbaec8f55",\r
+      "definition": {\r
+        "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",\r
+        "version": "1.2.3"\r
+      },\r
+      "description": "Starter Automation Composition Element for the Hello World",\r
+      "properties": {\r
+        "chart": {\r
+          "chartId": {\r
+            "name": "hello-world-sme-invoker",\r
+            "version": "0.1.0"\r
+          },\r
+          "namespace": "nonrtric",\r
+          "releaseName": "hello-world-sme-invoker",\r
+          "podName": "hello-world-sme-invoker",\r
+          "repository": {\r
+            "repoName": "local",\r
+            "address": "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI"\r
+          },\r
+          "overrideParams": {\r
+            "appId": "DO_NOT_CHANGE_THIS_RAPP_INSTANCE_ID",\r
+            "smeDiscoveryEndpoint": "DO_NOT_CHANGE_THIS_SME_DISCOVERY_ENDPOINT"\r
+          }\r
+        }\r
+      }\r
+    }\r
+  }\r
+}\r
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json
new file mode 100644 (file)
index 0000000..a9d3cf6
--- /dev/null
@@ -0,0 +1,14 @@
+[
+  {
+    "apiInvokerInformation": "DO_NOT_CHANGE_THIS_RAPP_INSTANCE_ID",
+    "apiList": [
+      { "apiName": "Hello World API Set 1" }
+    ],
+    "notificationDestination": "NOT USED here",
+    "onboardingInformation": {
+      "apiInvokerPublicKey": "{PUBLIC_KEY_INVOKER_1}",
+      "apiInvokerCertificate": "apiInvokerCertificate"
+    },
+    "requestTestNotification": true
+  }
+]
\ No newline at end of file
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta b/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..3da5f0d
--- /dev/null
@@ -0,0 +1,5 @@
+TOSCA-Meta-File-Version: 1.0\r
+CSAR-Version: 1.0\r
+Created-By: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+Entry-Definitions: Definitions/asd.yaml\r
+ETSI-Entry-Manifest: asd.mf
\ No newline at end of file
diff --git a/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf b/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf
new file mode 100644 (file)
index 0000000..c6936a9
--- /dev/null
@@ -0,0 +1,14 @@
+metadata:\r
+  application_name: rapp-hello-world-sme-invoker\r
+  application_provider: Ericsson Software Technology (O-RAN SC NONRTRIC team)\r
+  release_date_time: 2024-03-04T11:30:00+00:00\r
+  entry_definition_type: asd\r
+\r
+Source: asd.mf\r
+Source: Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz\r
+Source: Definitions/asd.yaml\r
+Source: Definitions/asd_types.yaml\r
+Source: TOSCA-Metadata/TOSCA.meta\r
+Source: Files/Acm/definition/compositions.json\r
+Source: Files/Acm/instances/k8s-instance.json\r
+Source: Files/Sme/invokers/invoker-app1.json\r
index 141ad8a..e0e67c3 100644 (file)
Binary files a/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz and b/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz differ