From c42cc923fd2cfe85b9a8e355a63cb9af4818c210 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Wed, 27 Sep 2023 13:24:58 +0100 Subject: [PATCH] Move sample rApp resources to seperate directory Sample rApp files moved to separate directory. Generator file added for Windows and Linux environment to generate the rApp csar file. Issue-ID: NONRTRIC-932 Signed-off-by: aravind.est Change-Id: I8e309da4d52d02afcc2ac66691811ec8313600dd --- csar-generator/generate.bat | 25 +++++++ csar-generator/generate.sh | 23 +++++++ .../resources}/Definitions/asd.yaml | 0 .../resources}/Definitions/asd_types.yaml | 0 .../Files/Acm/definition/compositions.json | 0 .../Files/Acm/instances/a1pms-instance.json | 0 .../Files/Acm/instances/all-instance.json | 72 +++++++++++++++++++++ .../Files/Acm/instances/k8s-instance.json | 0 .../Files/Acm/instances/kserve-instance.json | 0 .../resources}/Files/ChangeLog.txt | 0 .../Dme/infoconsumers/json-file-consumer.json | 0 .../Files/Dme/infoconsumers/xml-file-consumer.json | 0 .../Dme/infoproducers/json-file-data-producer.json | 0 .../Dme/infoproducers/xml-file-data-producer.json | 0 .../infotypes/json-file-data-from-filestore.json | 0 .../infotypes/xml-file-data-from-filestore.json | 0 .../resources}/Files/Events/MyASD_v1.yaml | 0 .../resources}/Files/Guides/user_guide.txt | 0 .../Files/Measurements/PM_Dictionary.yaml | 0 .../resources}/Files/Scripts/my_script.sh | 0 .../Files/Sme/invokers/invoker-app1.json | 0 .../Files/Sme/invokers/invoker-app2.json | 0 .../Files/Sme/providers/aef-provider-function.json | 0 .../Files/Sme/providers/amf-provider-function.json | 0 .../Files/Sme/providers/apf-provider-function.json | 0 .../Sme/providers/gateway-provider-function.json | 0 .../Files/Sme/serviceapis/api-set-1.json | 0 .../Files/Sme/serviceapis/api-set-2.json | 0 .../resources}/Files/Yang_module/mynetconf.yang | 0 .../resources}/Files/rapp1/rapp.zip | Bin .../resources}/HELM/free5gc-1.1.3.tgz | Bin .../resources}/HELM/ueransim-2.0.14.tgz | Bin .../resources}/TOSCA-Metadata/TOSCA.meta | 0 .../resources}/asd.mf | 0 34 files changed, 120 insertions(+) create mode 100755 csar-generator/generate.bat create mode 100755 csar-generator/generate.sh rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Definitions/asd.yaml (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Definitions/asd_types.yaml (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Acm/definition/compositions.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Acm/instances/a1pms-instance.json (100%) create mode 100755 csar-generator/resources/Files/Acm/instances/all-instance.json rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Acm/instances/k8s-instance.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Acm/instances/kserve-instance.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/ChangeLog.txt (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infoconsumers/json-file-consumer.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infoconsumers/xml-file-consumer.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infoproducers/json-file-data-producer.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infoproducers/xml-file-data-producer.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infotypes/json-file-data-from-filestore.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Dme/infotypes/xml-file-data-from-filestore.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Events/MyASD_v1.yaml (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Guides/user_guide.txt (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Measurements/PM_Dictionary.yaml (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Scripts/my_script.sh (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/invokers/invoker-app1.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/invokers/invoker-app2.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/providers/aef-provider-function.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/providers/amf-provider-function.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/providers/apf-provider-function.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/providers/gateway-provider-function.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/serviceapis/api-set-1.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Sme/serviceapis/api-set-2.json (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/Yang_module/mynetconf.yang (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/Files/rapp1/rapp.zip (100%) rename {rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment => csar-generator/resources}/HELM/free5gc-1.1.3.tgz (100%) rename {rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment => csar-generator/resources}/HELM/ueransim-2.0.14.tgz (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/TOSCA-Metadata/TOSCA.meta (100%) rename {rapp-manager-application/src/main/resources/resource-csar => csar-generator/resources}/asd.mf (100%) diff --git a/csar-generator/generate.bat b/csar-generator/generate.bat new file mode 100755 index 0000000..1e34698 --- /dev/null +++ b/csar-generator/generate.bat @@ -0,0 +1,25 @@ +:: ============LICENSE_START=============================================== +:: Copyright (C) 2023 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================================================= +:: + +@echo off +SET CSARFILE=rapp.csar +SET ZIPFILE=rapp.zip +del %CSARFILE% 2>nul +pushd resources +tar -a -cf ..\%ZIPFILE% * +popd +rename %ZIPFILE% %CSARFILE% diff --git a/csar-generator/generate.sh b/csar-generator/generate.sh new file mode 100755 index 0000000..3bb223a --- /dev/null +++ b/csar-generator/generate.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2023 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================================================= +# + +rm rapp.csar +pushd resources +zip -r ../rapp.csar * +popd diff --git a/rapp-manager-application/src/main/resources/resource-csar/Definitions/asd.yaml b/csar-generator/resources/Definitions/asd.yaml similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Definitions/asd.yaml rename to csar-generator/resources/Definitions/asd.yaml diff --git a/rapp-manager-application/src/main/resources/resource-csar/Definitions/asd_types.yaml b/csar-generator/resources/Definitions/asd_types.yaml similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Definitions/asd_types.yaml rename to csar-generator/resources/Definitions/asd_types.yaml diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Acm/definition/compositions.json b/csar-generator/resources/Files/Acm/definition/compositions.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Acm/definition/compositions.json rename to csar-generator/resources/Files/Acm/definition/compositions.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/a1pms-instance.json b/csar-generator/resources/Files/Acm/instances/a1pms-instance.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/a1pms-instance.json rename to csar-generator/resources/Files/Acm/instances/a1pms-instance.json diff --git a/csar-generator/resources/Files/Acm/instances/all-instance.json b/csar-generator/resources/Files/Acm/instances/all-instance.json new file mode 100755 index 0000000..20d9a88 --- /dev/null +++ b/csar-generator/resources/Files/Acm/instances/all-instance.json @@ -0,0 +1,72 @@ +{ + "name": "AllInstance0", + "version": "1.0.1", + "compositionId": "COMPOSITIONID", + "description": "Demo automation composition instance", + "elements": { + "709c62b3-8918-41b9-a747-d21eb79c6c12": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c12", + "definition": { + "name": "onap.policy.clamp.ac.element.A1PMSAutomationCompositionElement", + "version": "1.2.3" + }, + "description": "Starter Automation Composition Element for the Demo", + "properties": { + "policyServiceEntities": [ + { + "a1PolicyServiceEntityId": { + "name": "entity1", + "version": "1.0.1" + }, + "clientId": "firstService", + "callbackUrl": "http:\\localhost" + } + ] + } + }, + "709c62b3-8918-41b9-a747-d21eb79c6c21": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c21", + "definition": { + "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement", + "version": "1.2.3" + }, + "description": "Starter Automation Composition Element for the Demo", + "properties": { + "chart": { + "chartId": { + "name": "ransliceassurance", + "version": "1.0.0" + }, + "namespace": "nonrtric", + "releaseName": "ransliceassurance", + "podName": "ransliceassurance", + "repository": { + "repoName": "local", + "address": "http://10.101.2.41:8879/charts" + } + } + } + }, + "709c62b3-8918-41b9-a747-d21eb79c6c20": { + "id": "709c62b3-8918-41b9-a747-d21eb79c6c20", + "definition": { + "name": "onap.policy.clamp.ac.element.KserveAutomationCompositionElement", + "version": "1.2.3" + }, + "description": "Starter Automation Composition Element for the Demo", + "properties": { + "kserveInferenceEntities": [ + { + "kserveInferenceEntityId": { + "name": "entity1", + "version": "1.0.1" + }, + "name": "sklearn-iris", + "namespace": "kserve-test", + "payload": "{\"apiVersion\": \"serving.kserve.io/v1beta1\",\"kind\": \"InferenceService\",\"metadata\": {\"name\": \"sklearn-iris\"},\"spec\": {\"predictor\": {\"model\":{\"modelFormat\": {\"name\": \"sklearn\"},\"storageUri\": \"gs://kfserving-examples/models/sklearn/1.0/model\"}}}}" + } + ] + } + } + } +} \ No newline at end of file diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/k8s-instance.json b/csar-generator/resources/Files/Acm/instances/k8s-instance.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/k8s-instance.json rename to csar-generator/resources/Files/Acm/instances/k8s-instance.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/kserve-instance.json b/csar-generator/resources/Files/Acm/instances/kserve-instance.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Acm/instances/kserve-instance.json rename to csar-generator/resources/Files/Acm/instances/kserve-instance.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/ChangeLog.txt b/csar-generator/resources/Files/ChangeLog.txt similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/ChangeLog.txt rename to csar-generator/resources/Files/ChangeLog.txt diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoconsumers/json-file-consumer.json b/csar-generator/resources/Files/Dme/infoconsumers/json-file-consumer.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoconsumers/json-file-consumer.json rename to csar-generator/resources/Files/Dme/infoconsumers/json-file-consumer.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoconsumers/xml-file-consumer.json b/csar-generator/resources/Files/Dme/infoconsumers/xml-file-consumer.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoconsumers/xml-file-consumer.json rename to csar-generator/resources/Files/Dme/infoconsumers/xml-file-consumer.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoproducers/json-file-data-producer.json b/csar-generator/resources/Files/Dme/infoproducers/json-file-data-producer.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoproducers/json-file-data-producer.json rename to csar-generator/resources/Files/Dme/infoproducers/json-file-data-producer.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoproducers/xml-file-data-producer.json b/csar-generator/resources/Files/Dme/infoproducers/xml-file-data-producer.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infoproducers/xml-file-data-producer.json rename to csar-generator/resources/Files/Dme/infoproducers/xml-file-data-producer.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infotypes/json-file-data-from-filestore.json b/csar-generator/resources/Files/Dme/infotypes/json-file-data-from-filestore.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infotypes/json-file-data-from-filestore.json rename to csar-generator/resources/Files/Dme/infotypes/json-file-data-from-filestore.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infotypes/xml-file-data-from-filestore.json b/csar-generator/resources/Files/Dme/infotypes/xml-file-data-from-filestore.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Dme/infotypes/xml-file-data-from-filestore.json rename to csar-generator/resources/Files/Dme/infotypes/xml-file-data-from-filestore.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Events/MyASD_v1.yaml b/csar-generator/resources/Files/Events/MyASD_v1.yaml similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Events/MyASD_v1.yaml rename to csar-generator/resources/Files/Events/MyASD_v1.yaml diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Guides/user_guide.txt b/csar-generator/resources/Files/Guides/user_guide.txt similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Guides/user_guide.txt rename to csar-generator/resources/Files/Guides/user_guide.txt diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Measurements/PM_Dictionary.yaml b/csar-generator/resources/Files/Measurements/PM_Dictionary.yaml similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Measurements/PM_Dictionary.yaml rename to csar-generator/resources/Files/Measurements/PM_Dictionary.yaml diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Scripts/my_script.sh b/csar-generator/resources/Files/Scripts/my_script.sh similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Scripts/my_script.sh rename to csar-generator/resources/Files/Scripts/my_script.sh diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/invokers/invoker-app1.json b/csar-generator/resources/Files/Sme/invokers/invoker-app1.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/invokers/invoker-app1.json rename to csar-generator/resources/Files/Sme/invokers/invoker-app1.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/invokers/invoker-app2.json b/csar-generator/resources/Files/Sme/invokers/invoker-app2.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/invokers/invoker-app2.json rename to csar-generator/resources/Files/Sme/invokers/invoker-app2.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/aef-provider-function.json b/csar-generator/resources/Files/Sme/providers/aef-provider-function.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/aef-provider-function.json rename to csar-generator/resources/Files/Sme/providers/aef-provider-function.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/amf-provider-function.json b/csar-generator/resources/Files/Sme/providers/amf-provider-function.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/amf-provider-function.json rename to csar-generator/resources/Files/Sme/providers/amf-provider-function.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/apf-provider-function.json b/csar-generator/resources/Files/Sme/providers/apf-provider-function.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/apf-provider-function.json rename to csar-generator/resources/Files/Sme/providers/apf-provider-function.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/gateway-provider-function.json b/csar-generator/resources/Files/Sme/providers/gateway-provider-function.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/providers/gateway-provider-function.json rename to csar-generator/resources/Files/Sme/providers/gateway-provider-function.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/serviceapis/api-set-1.json b/csar-generator/resources/Files/Sme/serviceapis/api-set-1.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/serviceapis/api-set-1.json rename to csar-generator/resources/Files/Sme/serviceapis/api-set-1.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Sme/serviceapis/api-set-2.json b/csar-generator/resources/Files/Sme/serviceapis/api-set-2.json similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Sme/serviceapis/api-set-2.json rename to csar-generator/resources/Files/Sme/serviceapis/api-set-2.json diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/Yang_module/mynetconf.yang b/csar-generator/resources/Files/Yang_module/mynetconf.yang similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/Yang_module/mynetconf.yang rename to csar-generator/resources/Files/Yang_module/mynetconf.yang diff --git a/rapp-manager-application/src/main/resources/resource-csar/Files/rapp1/rapp.zip b/csar-generator/resources/Files/rapp1/rapp.zip similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Files/rapp1/rapp.zip rename to csar-generator/resources/Files/rapp1/rapp.zip diff --git a/rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment/HELM/free5gc-1.1.3.tgz b/csar-generator/resources/HELM/free5gc-1.1.3.tgz similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment/HELM/free5gc-1.1.3.tgz rename to csar-generator/resources/HELM/free5gc-1.1.3.tgz diff --git a/rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment/HELM/ueransim-2.0.14.tgz b/csar-generator/resources/HELM/ueransim-2.0.14.tgz similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/Artifacts/Deployment/HELM/ueransim-2.0.14.tgz rename to csar-generator/resources/HELM/ueransim-2.0.14.tgz diff --git a/rapp-manager-application/src/main/resources/resource-csar/TOSCA-Metadata/TOSCA.meta b/csar-generator/resources/TOSCA-Metadata/TOSCA.meta similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/TOSCA-Metadata/TOSCA.meta rename to csar-generator/resources/TOSCA-Metadata/TOSCA.meta diff --git a/rapp-manager-application/src/main/resources/resource-csar/asd.mf b/csar-generator/resources/asd.mf similarity index 100% rename from rapp-manager-application/src/main/resources/resource-csar/asd.mf rename to csar-generator/resources/asd.mf -- 2.16.6