aboutsummaryrefslogtreecommitdiffstats
path: root/config/pe/push-policies.sh
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:57:17 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:57:34 -0500
commitd1728dcd6de36778e6ec0bb99ea9e37ac2f56645 (patch)
tree8c3df0cbb52b7d90131101f20841d9e3b5b87ba4 /config/pe/push-policies.sh
parent35607b20f059053e77a2a9355b26a8dd9a7b9c31 (diff)
Initial OpenECOMP policy/docker commit
Change-Id: Ib37c3693614ee21a78f838e63eb40319cc85bdc6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'config/pe/push-policies.sh')
-rw-r--r--config/pe/push-policies.sh75
1 files changed, 75 insertions, 0 deletions
diff --git a/config/pe/push-policies.sh b/config/pe/push-policies.sh
new file mode 100644
index 00000000..957156ed
--- /dev/null
+++ b/config/pe/push-policies.sh
@@ -0,0 +1,75 @@
+#! /bin/bash
+
+
+echo "Pushing default policies"
+
+# Sometimes brmsgw gets an error when trying to retrieve the policies on initial push,
+# so for the BRMS policies we will do a push, then delete from the pdp group, then push again.
+# Second push should be successful.
+
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "vFirewall",
+ "policyScope": "com",
+ "policyType": "MicroService"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+
+sleep 2
+
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "vLoadBalancer",
+ "policyScope": "com",
+ "policyType": "MicroService"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+
+sleep 2
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "BRMSParamvLBDemoPolicy",
+ "policyScope": "com",
+ "policyType": "BRMS_Param"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+
+sleep 2
+
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "BRMSParamvFWDemoPolicy",
+ "policyScope": "com",
+ "policyType": "BRMS_Param"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+
+sleep 2
+
+curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+"pdpGroup": "default",
+"policyComponent": "PDP",
+"policyName": "com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml"
+}' 'http://pypdp:8480/PyPDPServer/deletePolicy'
+
+
+
+curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+"pdpGroup": "default",
+"policyComponent": "PDP",
+"policyName": "com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml"
+}' 'http://pypdp:8480/PyPDPServer/deletePolicy'
+
+sleep 2
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "BRMSParamvLBDemoPolicy",
+ "policyScope": "com",
+ "policyType": "BRMS_Param"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+
+sleep 2
+
+curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "BRMSParamvFWDemoPolicy",
+ "policyScope": "com",
+ "policyType": "BRMS_Param"
+}' 'http://pypdp:8480/PyPDPServer/pushPolicy'
+