aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-12-08 10:17:11 -0600
committerJorge Hernandez <jh1730@att.com>2017-12-08 16:29:30 +0000
commit945456fc13eb0f9448a80be3a97b56fe495459cc (patch)
tree7bb9481b29367b286d8e326c5725473a9d9b9a38
parent6b606427ebf23d529a2ebbde57dd621354730128 (diff)
delete vFW policy before updating resourceID
POLICY-486 deals with the issue that pushPolicy API may not provision the latest version of the policy when multiple versions are present. While a fix has been merged into amsterdam release, it has not been released, the next 1.1.2 released version has not been produced yet. We met with Tarun to discuss the issue and suggested to place a call to the deletePolicy in the script. After a few tests, we think that this fix works around the POLICY-486 issue, and seems that updates the resourceID correctly, by ensuring that at there is only 0 or 1 versions of the policy at a given time. Change-Id: Ibcd20869d13dc115d57db5bc79b56513547324f7 Issue-ID: POLICY-486 Signed-off-by: Jorge Hernandez <jh1730@att.com> (cherry picked from commit 5b35c140c63bb737f65077f96b5c3253c74643ea)
-rwxr-xr-xvnfs/vFW/scripts/update-vfw-op-policy.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/vnfs/vFW/scripts/update-vfw-op-policy.sh b/vnfs/vFW/scripts/update-vfw-op-policy.sh
index 839250dc..04a36176 100755
--- a/vnfs/vFW/scripts/update-vfw-op-policy.sh
+++ b/vnfs/vFW/scripts/update-vfw-op-policy.sh
@@ -9,6 +9,22 @@ POLICY_HOST=$1
RESOURCE_ID=$2
PATH_TO_PRIVATE_KEY=$3
+echo
+echo
+echo "Removing the vFW Policy from PDP.."
+echo
+echo
+
+curl -v -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyComponent" : "PDP",
+ "policyName": "com.BRMSParamvFirewall",
+ "policyType": "BRMS_Param"
+}' http://${POLICY_HOST}:8081/pdp/api/deletePolicy
+
+sleep 20
+
+echo
echo
echo "Updating vFW Operational Policy .."
echo