diff options
author | Konrad Bańka <k.banka@samsung.com> | 2020-05-25 12:03:38 +0200 |
---|---|---|
committer | Konrad Bańka <k.banka@samsung.com> | 2020-05-25 12:03:38 +0200 |
commit | 1389192a547b108a5492460e6e1bad672935f3bc (patch) | |
tree | 01eef4ee0b9fdd9b8807bfaf90f03c70044ca826 /heat/vFW_CNF_CDS/templates/policy/policy.sh | |
parent | 7c523c94d26afe32ef655e252cf06583aa3509ec (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/policy.sh')
-rwxr-xr-x | heat/vFW_CNF_CDS/templates/policy/policy.sh | 51 |
1 files changed, 0 insertions, 51 deletions
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 |