aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/policy
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2020-05-25 12:03:38 +0200
committerKonrad Bańka <k.banka@samsung.com>2020-05-25 12:03:38 +0200
commit1389192a547b108a5492460e6e1bad672935f3bc (patch)
tree01eef4ee0b9fdd9b8807bfaf90f03c70044ca826 /heat/vFW_CNF_CDS/templates/policy
parent7c523c94d26afe32ef655e252cf06583aa3509ec (diff)
[vFW_CNF_CDS] Update package with latest CDS/Policy changes
Rename csar directory with proper name. Update CBA to refer to default naming policy. Remove policy creating script/docs as it's no longer relevant. Issue-ID: INT-1457 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I7d3b888ce073a88e6dfd41883a8853fbf7cb0539
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/policy')
-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
5 files changed, 0 insertions, 83 deletions
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"
-}