From 0b66bf0cbfbfc24dc749881782161415cc326635 Mon Sep 17 00:00:00 2001 From: ambrishest Date: Fri, 1 Mar 2024 13:30:49 +0000 Subject: [PATCH] rApp - Hello World SME Invoker Issue-ID: NONRTRIC-965 Change-Id: Icd743e0012215c2a3e9c10da506ebd4e0d21714b Signed-off-by: ambrishest --- .../HELM/hello-world-sme-invoker-0.1.0.tgz | Bin 0 -> 1596 bytes .../Definitions/asd.yaml | 48 ++++++ .../Definitions/asd_types.yaml | 90 ++++++++++ .../Files/Acm/definition/compositions.json | 189 +++++++++++++++++++++ .../Files/Acm/instances/k8s-instance.json | 35 ++++ .../Files/Sme/invokers/invoker-app1.json | 14 ++ .../TOSCA-Metadata/TOSCA.meta | 5 + .../rapp-hello-world-sme-invoker/asd.mf | 14 ++ .../Deployment/HELM/hello-world-chart-0.1.0.tgz | Bin 2039 -> 1446 bytes 9 files changed, 395 insertions(+) create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd.yaml create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Definitions/asd_types.yaml create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta create mode 100644 sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf 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 index 0000000000000000000000000000000000000000..3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mKoXE)dYxM7(QP2hQVO^lq>wXh0#Yy=`rq39fXx4)L;t&L zSQerC+1;9z2=5imX?9a7PX|o!j+nIy-jO-I3EmM~y8lwMB6#<&-~_IyX0kGn3`Zs) uO3Pm`vjJf_(y;EX + Identifier of this descriptor in a version independent manner. This attribute + is invariant across versions of ASD. It is in UUID format as specified in RFC 4122 + descriptor_version: + type: string + required: true + description: Identifies the version of the ASD. + schema_version: + type: string + required: true + description: Identifies the Identifies the version of this ASD’s schema. + function_description: + type: string + required: false + description: Description of the application service described by this ASD. + provider: + type: string + required: true + description: Identifies the provider of the ASD. + application_name: + type: string + required: true + description: Name to identify the application service described by this ASD + application_version: + type: string + required: true + description: Identifies the version of the application service described by this ASD. + +artifact_types: +tosca.artifacts.asd.deploymentItem: + version: 0.1 + derived_from: tosca.artifacts.Root + description: "Describes the artifact type of asd deployment item" + file: "Relative path of the artifact in the package" + properties: + item_id: + description: "The identifier of this asd deployment item" + required: true + type: string + artifact_type: + description: > + Specify artifact type. + required: true + type: string + constraints: + - valid_values: ["helm_chart"] + target_server: + description: > + Specify target server for artifact. + required: true + type: string + constraints: + - valid_values: [ "chartmuseum" ] + target_server_uri: + description: "URI of the target server" + required: true + 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 index 0000000..f7b0401 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/definition/compositions.json @@ -0,0 +1,189 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_3", + "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.acm.Participant": { + "version": "1.0.1", + "derived_from": "tosca.nodetypes.Root", + "properties": { + "provider": { + "type": "string", + "required": false + } + } + }, + "org.onap.policy.clamp.acm.AutomationCompositionElement": { + "version": "1.0.1", + "derived_from": "tosca.nodetypes.Root", + "properties": { + "provider": { + "type": "string", + "required": false + }, + "participantType": { + "type": "onap.datatypes.ToscaConceptIdentifier", + "required": true + }, + "startPhase": { + "type": "integer", + "required": false, + "constraints": [ + { + "greater-or-equal": 0 + } + ], + "metadata": { + "common": true + }, + "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" + }, + "passiveToRunningTimeout": { + "type": "integer", + "required": false, + "constraints": [ + { + "greater_or_equal": 0 + } + ], + "default": 60, + "metadata": { + "common": true + }, + "description": "The maximum time in seconds to wait for a state chage from passive to running" + }, + "runningToPassiveTimeout": { + "type": "integer", + "required": false, + "constraints": [ + { + "greater_or_equal": 0 + } + ], + "default": 60, + "metadata": { + "common": true + }, + "description": "The maximum time in seconds to wait for a state chage from running to passive" + }, + "passiveToUninitializedTimeout": { + "type": "integer", + "required": false, + "constraints": [ + { + "greater_or_equal": 0 + } + ], + "default": 60, + "metadata": { + "common": true + }, + "description": "The maximum time in seconds to wait for a state chage from passive to uninitialized" + } + } + }, + "org.onap.policy.clamp.acm.AutomationComposition": { + "version": "1.0.1", + "derived_from": "tosca.nodetypes.Root", + "properties": { + "provider": { + "type": "string", + "required": false, + "metadata": { + "common": true + } + }, + "elements": { + "type": "list", + "required": true, + "metadata": { + "common": true + }, + "entry_schema": { + "type": "onap.datatypes.ToscaConceptIdentifier" + } + } + } + }, + "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement": { + "version": "1.0.0", + "derived_from": "org.onap.policy.clamp.acm.AutomationCompositionElement", + "properties": { + "chart": { + "type": "string", + "required": true + }, + "configs": { + "type": "list", + "required": false + }, + "requirements": { + "type": "string", + "required": false + }, + "templates": { + "type": "list", + "required": false, + "entry_schema": null + }, + "values": { + "type": "string", + "required": true + } + } + } + }, + "topology_template": { + "node_templates": { + "org.onap.k8s.acm.K8SAutomationCompositionParticipant": { + "version": "2.3.4", + "type": "org.onap.policy.clamp.acm.Participant", + "type_version": "1.0.1", + "description": "Participant for K8S", + "properties": { + "provider": "ONAP" + } + }, + "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement": { + "version": "1.2.3", + "type": "org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement", + "type_version": "1.0.0", + "description": "Automation composition element for the K8S microservice for AC Element Starter", + "properties": { + "provider": "ONAP", + "startPhase": 0, + "uninitializedToPassiveTimeout": 300, + "podStatusCheckInterval": 30 + } + }, + "onap.policy.clamp.ac.element.AutomationCompositionDefinition": { + "version": "1.2.3", + "type": "org.onap.policy.clamp.acm.AutomationComposition", + "type_version": "1.0.1", + "description": "Automation composition for rapp deployment", + "properties": { + "provider": "ONAP", + "elements": [ + { + "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement", + "version": "1.2.3" + } + ] + } + } + } + } +} \ 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 index 0000000..917497e --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Acm/instances/k8s-instance.json @@ -0,0 +1,35 @@ +{ + "name": "K8SmeInvokerDemoInstance0", + "version": "1.0.1", + "compositionId": "DO_NOT_CHANGE_THIS_COMPOSITION_ID", + "description": "Demo automation composition instance 0", + "elements": { + "d7be552e-bdd5-2233-b64d-797dbaec8f55": { + "id": "d7be552e-bdd5-2233-b64d-797dbaec8f55", + "definition": { + "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement", + "version": "1.2.3" + }, + "description": "Starter Automation Composition Element for the Hello World", + "properties": { + "chart": { + "chartId": { + "name": "hello-world-sme-invoker", + "version": "0.1.0" + }, + "namespace": "nonrtric", + "releaseName": "hello-world-sme-invoker", + "podName": "hello-world-sme-invoker", + "repository": { + "repoName": "local", + "address": "UPDATE_THIS_CHART_MUSEUM_GET_CHARTS_URI" + }, + "overrideParams": { + "appId": "DO_NOT_CHANGE_THIS_RAPP_INSTANCE_ID", + "smeDiscoveryEndpoint": "DO_NOT_CHANGE_THIS_SME_DISCOVERY_ENDPOINT" + } + } + } + } + } +} 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 index 0000000..a9d3cf6 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/Files/Sme/invokers/invoker-app1.json @@ -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 index 0000000..3da5f0d --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,5 @@ +TOSCA-Meta-File-Version: 1.0 +CSAR-Version: 1.0 +Created-By: Ericsson Software Technology (O-RAN SC NONRTRIC team) +Entry-Definitions: Definitions/asd.yaml +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 index 0000000..c6936a9 --- /dev/null +++ b/sample-rapp-generator/rapp-hello-world-sme-invoker/asd.mf @@ -0,0 +1,14 @@ +metadata: + application_name: rapp-hello-world-sme-invoker + application_provider: Ericsson Software Technology (O-RAN SC NONRTRIC team) + release_date_time: 2024-03-04T11:30:00+00:00 + entry_definition_type: asd + +Source: asd.mf +Source: Artifacts/Deployment/HELM/hello-world-sme-invoker-0.1.0.tgz +Source: Definitions/asd.yaml +Source: Definitions/asd_types.yaml +Source: TOSCA-Metadata/TOSCA.meta +Source: Files/Acm/definition/compositions.json +Source: Files/Acm/instances/k8s-instance.json +Source: Files/Sme/invokers/invoker-app1.json diff --git a/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz b/sample-rapp-generator/rapp-hello-world/Artifacts/Deployment/HELM/hello-world-chart-0.1.0.tgz index 141ad8a9c0ba7ea7e37eeee9f4c28cc2c61258fd..e0e67c3a68bdf491c8cfff936a37f5db4bcde5f5 100644 GIT binary patch delta 1404 zcmV-?1%vwc52g!{JAYZ>Pvbfg=d=HcxuTT-(IhPeRz2N^USYM>p%&3DtNpZclWFS3 zv3<7F(&PI6_9r_nq;wZn0`c~}m*0n^vBxvx$z*<$bc&qI`dn(B)Z;1DHtf1%u%H>= zc_l{%akI4p(SK_>@Dy@msosfRZ0qsn z{v@D^U86QkiZ;xegerA^83m0XA_We>J-5b=^3Z@Y&@N z5j4X#Y-JX)3x#c;~B&C;obz3x6V zqvlZ?1`0(_Of-cLG8c)j2ymWjsj$5Cg2gBdCXkB+HP|UaN6~nS>zPAXl`Lom5$rjE z+G?t{|4*-DA#=#+0)(`X8w5LL1}2On;BAb`0uvC+On-4kMT{_KcIpkS)C6A1mz5GZ zwv-8=5KFZHIVnp5wPe>zdrYlW?J%6r=K=LT2U4dYFJw))3U0j_M5|Sw1V>{)<9~Ce zF@f=7T`$KRfzvri4K&q=30Udeo@-{ANDsltiJenj#4cgRYBtX8M%>m;GP5Bd1yBLC z&JcRT8h`w|Gwclyy_V0t(Z|835q$1kU3L1S-uVy)SI`~w&w8W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