aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/cba-dev
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-03-19 17:50:37 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2021-03-19 18:59:53 +0100
commitd2c5f361fa3a246dfa23c2c582ec498322a97282 (patch)
tree50f8ecf48470eac3845444b42dc29fa8a0033549 /heat/vFW_CNF_CDS/templates/cba-dev
parent1ff5827ffde7af1d8aed23890a571455300ade6d (diff)
Implementation of config-assign and config-deploy actions
Implementation of config-assign and config-deploy actions Issue-ID: INT-1868 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Ibe61ea32bb1d0fbfc5396adf54c7d2fcbc7bbf30
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba-dev')
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh23
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/enrich.sh22
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh2
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh14
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh52
-rwxr-xr-xheat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh2
6 files changed, 107 insertions, 8 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh b/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh
new file mode 100755
index 00000000..74ec06a0
--- /dev/null
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/bootstrap.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 Orange
+# ================================================================================
+# 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=========================================================
+
+curl --location --request POST 'http://127.0.0.1:8081/api/v1/blueprint-model/bootstrap' \
+--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
+--header 'Content-Type: application/json' \
+--data '{"loadModelType": true, "loadResourceDictionary": true, "loadCBA": false}' | jq
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh b/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh
new file mode 100755
index 00000000..1db994b6
--- /dev/null
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/enrich.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 Orange
+# ================================================================================
+# 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=========================================================
+
+curl --location --request POST 'http://127.0.0.1:8081/api/v1/blueprint-model/enrich' \
+--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
+--form 'file=@../package_native/CBA.zip' | jq
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh
index 840bb859..f40760f2 100755
--- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-base-ra.sh
@@ -19,7 +19,7 @@
REQ_ID=`shuf -i 1-1000000 -n 1`
SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1`
-TEMPLATE_NAME="base_template"
+TEMPLATE_NAME="helm_base_template"
curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \
--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh
index b7835626..09283293 100755
--- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vf-pkg-ra.sh
@@ -19,7 +19,7 @@
REQ_ID=`shuf -i 1-1000000 -n 1`
SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1`
-TEMPLATE_NAME="vpkg"
+TEMPLATE_NAME="helm_vpkg"
curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \
--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
@@ -53,13 +53,15 @@ curl --location --request POST 'http://localhost:8081/api/v1/execution-service/p
"vf-module-label": "'$TEMPLATE_NAME'",
"vf-module-type": "vf-module-type",
"vf-module-model-customization-uuid": "d3ae2df9-95d4-48cc-a466-9f12dee80458",
- "vf-module-model-invariant-uuid": "564e55dc-3b90-4c9c-9e97-42f2c97d8f11",
- "vf-module-model-version": "3d55e2a6-7634-4ceb-98e9-2852d621a544",
+ "vf-module-model-invariant-uuid": "95e56eee-eeef-4a18-a032-8dbd757544b5",
+ "vf-module-model-version": "de66174a-d401-4b31-9331-3a44ad3ba01b",
"vf-module-id": "3e6a0375-4b92-4bf5-9910-b0b893448a9c",
"vf-naming-policy" : "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
- "k8s-rb-profile-name": "vpkg-modified",
- "k8s-rb-profile-source": "vfw-cnf-cds-vpkg-profile",
- "k8s-rb-profile-namespace": "test",
+ "k8s-rb-profile-name": "vfw-cnf-cds-base-profile",
+ "k8s-rb-profile-source": "vfw-cnf-cds-base-profile",
+ "k8s-rb-profile-namespace": "vfirewall",
+ "k8s-rb-config-template-name": "ssh-service-config",
+ "k8s-rb-config-template-source": "ssh-service-config",
"management-prefix-id" : 3
}
}
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh
new file mode 100755
index 00000000..1461475e
--- /dev/null
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-config.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Orange
+# ================================================================================
+# 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=========================================================
+
+REQ_ID=`shuf -i 1-1000000 -n 1`
+SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1`
+ACTION=$1
+
+curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \
+--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "commonHeader": {
+ "originatorId": "onap-me-cm-adapter",
+ "requestId": "'$REQ_ID'",
+ "subRequestId": "'$SUB_REQ_ID'"
+ },
+ "actionIdentifiers": {
+ "blueprintName": "vFW_CNF_CDS",
+ "blueprintVersion": "7.0.0",
+ "actionName": "'config-$ACTION'",
+ "mode": "sync"
+ },
+ "payload": {
+ "'config-$ACTION-request'": {
+ "resolution-key": "VF_vfw_k8s_demo_CNF_KUD-6",
+ "'config-$ACTION-properties'": {
+ "service-instance-id": "889670f7-ed49-41b0-a251-b43e9a035811",
+ "service-model-uuid": "bea61c93-1a90-426b-9fbe-6024bde48419",
+ "vnf-id": "317f28f3-37b4-40c8-8062-e93fda15db99",
+ "vnf-name": "VF_vfw_k8s_demo_CNF_KUD",
+ "vnf-customization-uuid": "2793ba6f-332d-4694-8f8e-0b1f2ec3a732"
+ }
+ }
+ }
+}' | jq '.payload | .["'config-$ACTION-response'"]'
+
diff --git a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh
index 8261ace3..1e24a7a2 100755
--- a/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh
+++ b/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh
@@ -46,7 +46,7 @@ curl --location --request POST 'http://localhost:8081/api/v1/execution-service/p
"aic-cloud-region": "RegionOne",
"vnf-model-customization-uuid": "d73864db-1f6e-4e54-a533-a96773c926a4",
"service-instance-id": "2afee7c4-8b16-4f2f-a567-48fb7948abcf",
- "vnf-id": "21dcbbd2-3ec2-4a9c-bb0d-599cafc16a1f",
+ "vnf-id": "51274ece-55ca-4cbc-b7c4-0da0dcc65d38",
"vnf_name": "sample-vnf-name",
"k8s-rb-profile-namespace": "vfw-namespace",
"int_private1_net_cidr" : "192.168.10.0/24",