aboutsummaryrefslogtreecommitdiffstats
path: root/heat
diff options
context:
space:
mode:
Diffstat (limited to 'heat')
-rw-r--r--heat/vFW_CNF_CDS/templates/.gitignore2
-rw-r--r--heat/vFW_CNF_CDS/templates/Makefile24
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json4
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/TOSCA-Metadata/TOSCA.meta2
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl4
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl2
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl4
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json2
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl4
-rw-r--r--heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl4
-rw-r--r--heat/vFW_CNF_CDS/templates/policy/README.txt13
-rw-r--r--heat/vFW_CNF_CDS/templates/policy/create.json11
-rw-r--r--heat/vFW_CNF_CDS/templates/policy/get.json3
-rwxr-xr-xheat/vFW_CNF_CDS/templates/policy/policy.sh51
-rw-r--r--heat/vFW_CNF_CDS/templates/policy/push.json5
15 files changed, 34 insertions, 101 deletions
diff --git a/heat/vFW_CNF_CDS/templates/.gitignore b/heat/vFW_CNF_CDS/templates/.gitignore
index a6967843..f88e099b 100644
--- a/heat/vFW_CNF_CDS/templates/.gitignore
+++ b/heat/vFW_CNF_CDS/templates/.gitignore
@@ -1,2 +1,2 @@
-csar/
+package/
vfw_k8s_demo.zip
diff --git a/heat/vFW_CNF_CDS/templates/Makefile b/heat/vFW_CNF_CDS/templates/Makefile
index 5cae204b..66dbb298 100644
--- a/heat/vFW_CNF_CDS/templates/Makefile
+++ b/heat/vFW_CNF_CDS/templates/Makefile
@@ -7,24 +7,24 @@ clean_all:
$(MAKE) all
#Can't use .csar extension or SDC will panic
-all: csar/ helm base cba
- cd csar/ && zip -r $(ONBOARDING_PACKAGE_NAME).zip .
- mv csar/$(ONBOARDING_PACKAGE_NAME).zip .
+all: package/ helm base cba
+ cd package/ && zip -r $(ONBOARDING_PACKAGE_NAME).zip .
+ mv package/$(ONBOARDING_PACKAGE_NAME).zip .
-helm: csar/
+helm: package/
make -C helm
- mv helm/*.tgz csar/
+ mv helm/*.tgz package/
-base: csar/
- cp base/* csar/
+base: package/
+ cp base/* package/
-cba: csar/
+cba: package/
cd cba/ && zip -r $(CBA_NAME).zip .
- mv cba/$(CBA_NAME).zip csar/
+ mv cba/$(CBA_NAME).zip package/
-csar/:
- mkdir csar/
+package/:
+ mkdir package/
clean:
- rm -rf csar/
+ rm -rf package/
rm -f $(ONBOARDING_PACKAGE_NAME).zip
diff --git a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
index 914405b3..01e14b55 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
@@ -5,7 +5,7 @@
"author-email": "abdelmuhaimen.seaudi@orange.com",
"user-groups": "ADMIN, OPERATION",
"template_name": "vFW_CNF_CDS",
- "template_version": "1.0.44",
+ "template_version": "1.0.45",
"template_tags": "Samuli Silvius, vFW_CNF_CDS",
"template_type": "DEFAULT"
},
@@ -66,7 +66,7 @@
"type": "maria-db",
"url": "jdbc:mysql://mariadb-galera:3306/sdnctl",
"username": "root",
- "password": "secretpassword"
+ "password": "TepsMavaFota9+"
}
},
"topology_template": {
diff --git a/heat/vFW_CNF_CDS/templates/cba/TOSCA-Metadata/TOSCA.meta b/heat/vFW_CNF_CDS/templates/cba/TOSCA-Metadata/TOSCA.meta
index 8405b709..80d82af3 100644
--- a/heat/vFW_CNF_CDS/templates/cba/TOSCA-Metadata/TOSCA.meta
+++ b/heat/vFW_CNF_CDS/templates/cba/TOSCA-Metadata/TOSCA.meta
@@ -3,6 +3,6 @@ CSAR-Version: 1.0
Created-By: Samuli Silvius <s.silvius@partner.samsung.com>
Entry-Definitions: Definitions/vFW_CNF_CDS.json
Template-Name: vFW_CNF_CDS
-Template-Version: 1.0.44
+Template-Version: 1.0.45
Template-Type: DEFAULT
Template-Tags: Samuli Silvius, vFW_CNF_CDS
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl
index 888b8421..401a0bd7 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/base_template-template.vtl
@@ -67,6 +67,10 @@
"param-value": "${vnf_name}"
},
{
+ "param-name": "VF_MODULE_TYPE",
+ "param-value": "vfmt"
+ },
+ {
"param-name": "VF_MODULE_LABEL",
"param-value": "${vf-module-label}"
}
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl
index 98cc9e71..3dc2eb5f 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/k8s-profiles/ssh-service-template.vtl
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.vpg_name_0 }}-ssh-access
+ name: {{ .Values.vpg_name_0 }}-ssh
labels:
vnf-name: {{ .Values.vnf_name }}
vf-module-name: {{ .Values.vpg_name_0 }}
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl
index 754ff731..d65b6f92 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vfw-template.vtl
@@ -12,6 +12,10 @@
],
"payload": [
{
+ "param-name": "VF_MODULE_TYPE",
+ "param-value": "vfmt"
+ },
+ {
"param-name": "resource-name",
"param-value": "vf_module_name"
},
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json
index 70a95cb8..bee80d14 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vnf-mapping.json
@@ -99,7 +99,7 @@
"description": "",
"required": false,
"type": "string",
- "default": "SDNC_Policy.Config_MS_ONAP_CNF_NAMING_TIMESTAMP"
+ "default": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP"
},
"input-param": false,
"dictionary-name": "vf-naming-policy",
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl
index 6f0461bb..18511d54 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vpkg-template.vtl
@@ -43,6 +43,10 @@
],
"payload": [
{
+ "param-name": "VF_MODULE_TYPE",
+ "param-value": "vfmt"
+ },
+ {
"param-name": "resource-name",
"param-value": "vf_module_name"
},
diff --git a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl
index 394bf16c..3e2d8c1c 100644
--- a/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl
+++ b/heat/vFW_CNF_CDS/templates/cba/Templates/vsn-template.vtl
@@ -12,6 +12,10 @@
],
"payload": [
{
+ "param-name": "VF_MODULE_TYPE",
+ "param-value": "vfmt"
+ },
+ {
"param-name": "resource-name",
"param-value": "vf_module_name"
},
diff --git a/heat/vFW_CNF_CDS/templates/policy/README.txt b/heat/vFW_CNF_CDS/templates/policy/README.txt
deleted file mode 100644
index afb30f7c..00000000
--- a/heat/vFW_CNF_CDS/templates/policy/README.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-`policy.sh` script allows to create and push naming policy for CNF usecase. Execution of script can be checked by calling `./policy.sh -h`. As pdp doesn't expose it's service externally, this folder needs to be copied to some ONAP pod with bash and curl available (for example, mariadb-galera) and executed within.
-Scope of changes and reasoning behind is described in related ticket: https://jira.onap.org/browse/SDNC-1109.
-
-Example execution flow:
-```
-cd ..
-kubectl cp policy onap-mariadb-galera-mariadb-galera-0:/tmp/policy
-kubectl exec -it onap-mariadb-galera-mariadb-galera-0 bash
-cd /tmp/policy
-./policy.sh get #See that CNF naming policy is not uploaded yet
-./policy.sh create #Create and push CNF naming policy
-./policy.sh get #Verify that now it's visible
-```
diff --git a/heat/vFW_CNF_CDS/templates/policy/create.json b/heat/vFW_CNF_CDS/templates/policy/create.json
deleted file mode 100644
index 2443d550..00000000
--- a/heat/vFW_CNF_CDS/templates/policy/create.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "configBody": "{ \"content\": { \"naming-models\": [ { \"naming-properties\": [ { \"property-name\": \"AIC_CLOUD_REGION\" }, { \"property-name\": \"CONSTANT\", \"property-value\": \"onap-nf\" }, { \"increment-sequence\": { \"increment\": \"1\", \"length\": \"3\", \"max\": \"zzz\", \"scope\": \"ENTIRETY\", \"sequence-type\": \"alpha-numeric\", \"start-value\": \"001\" }, \"property-name\": \"SEQUENCE\" }, { \"property-name\": \"DELIMITER\", \"property-value\": \"-\" } ], \"naming-recipe\": \"AIC_CLOUD_REGION|DELIMITER|CONSTANT|DELIMITER|SEQUENCE\", \"naming-type\": \"VNF\" }, { \"naming-properties\": [ { \"property-name\": \"VNF_NAME\" }, { \"increment-sequence\": { \"increment\": \"1\", \"length\": \"3\", \"max\": \"zzz\", \"scope\": \"ENTIRETY\", \"sequence-type\": \"alpha-numeric\", \"start-value\": \"001\" }, \"property-name\": \"SEQUENCE\" }, { \"property-name\": \"NFC_NAMING_CODE\" }, { \"property-name\": \"DELIMITER\", \"property-value\": \"-\" } ], \"naming-recipe\": \"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\", \"naming-type\": \"VNFC\" }, { \"naming-properties\": [ { \"property-name\": \"VNF_NAME\" }, { \"property-name\": \"DELIMITER\", \"property-value\": \"-\" }, { \"property-name\": \"VF_MODULE_LABEL\" }, { \"increment-sequence\": { \"increment\": \"1\", \"length\": \"3\", \"max\": \"zzz\", \"scope\": \"PRECEEDING\", \"sequence-type\": \"alpha-numeric\", \"start-value\": \"01\" }, \"property-name\": \"SEQUENCE\" } ], \"naming-recipe\": \"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|SEQUENCE\", \"naming-type\": \"VF-MODULE\" } ], \"policy-instance-name\": \"ONAP_VNF_NAMING_TIMESTAMP\" }, \"service\": \"SDNC-GenerateName\", \"version\": \"CSIT\" }",
- "description": "ONAP_CNF_NAMING_TIMESTAMP",
- "guard": "false",
- "onapName": "SDNC",
- "policyConfigType": "MicroService",
- "policyName": "SDNC_Policy.ONAP_CNF_NAMING_TIMESTAMP",
- "priority": "4",
- "riskLevel": "4",
- "riskType": "test"
-}
diff --git a/heat/vFW_CNF_CDS/templates/policy/get.json b/heat/vFW_CNF_CDS/templates/policy/get.json
deleted file mode 100644
index b9a6281e..00000000
--- a/heat/vFW_CNF_CDS/templates/policy/get.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "policyName": "SDNC_Policy.Config_MS_ONAP_CNF_NAMING_TIMESTAMP.*.xml"
-}
diff --git a/heat/vFW_CNF_CDS/templates/policy/policy.sh b/heat/vFW_CNF_CDS/templates/policy/policy.sh
deleted file mode 100755
index a09ab0a8..00000000
--- a/heat/vFW_CNF_CDS/templates/policy/policy.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-set -e
-
-check(){
- if ! which curl >/dev/null 2>&1; then
- echo "Fatal error, curl command not available" >&2
- return 1
- fi
-
- for arg; do
- if ! test -f "$arg"; then
- echo "Fatal error, REST payload - $arg - not found in current directory" >&2
- return 1
- fi
- done
-}
-
-query_policy(){
- local mode="$1"
- local content="$2"
- local url="$3"
-
- declare -a flags=(-kf -H 'Content-Type: application/json'
- -H 'ClientAuth: cHl0aG9uOnRlc3Q=' -u testpdp:alpha123
- -H 'Environment: TEST')
-
- check "$content"
-
- curl -X "$mode" -d @"$content" "${flags[@]}" "${PDP_URL:-https://pdp:8081}/$url"
-}
-
-case "$1" in
- -h|--help|help|?|"")
- echo "Script usage:"
- echo "$0 get|verify - query policy for CNF policy"
- echo "$0 create - Create CNF naming policy and push it"
- echo "$0 update - Update CNF naming policy and push it"
- ;;
- get|verify)
- query_policy POST get.json pdp/api/getConfig
- ;;
- create|update)
- query_policy PUT create.json "pdp/api/$1Policy"
- query_policy PUT push.json "pdp/api/pushPolicy"
- ;;
- *)
- echo "Wrong usage, check '$0 -h'" >&2
- exit 1
- ;;
-esac
diff --git a/heat/vFW_CNF_CDS/templates/policy/push.json b/heat/vFW_CNF_CDS/templates/policy/push.json
deleted file mode 100644
index 9a8f9ae2..00000000
--- a/heat/vFW_CNF_CDS/templates/policy/push.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "pdpGroup": "default",
- "policyName": "SDNC_Policy.ONAP_CNF_NAMING_TIMESTAMP",
- "policyType": "MicroService"
-}