summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2017-06-23 15:03:19 -0400
committerrb7147 <rb7147@att.com>2017-06-23 15:05:41 -0400
commit16ca598e3456e3532ab1f55b27c1ac12f88ba4be (patch)
tree74a47d897b32e3e1c0c4e24f4ea2e4d82c31111f
parent12d9a3203a962d12e07ae95b411261e3618c793c (diff)
[Policy-23,Policy-24] tweaks to push policy script
Updated the BRMSGW CLIENT_KEY Added tweaks to push script on push->delete->push policy similar to brms. Change-Id: I52faaccf9af7958554b79c8be533303e53dd5c80 Signed-off-by: rb7147 <rb7147@att.com>
-rw-r--r--config/pe/brmsgw.conf2
-rw-r--r--config/pe/push-policies.sh43
2 files changed, 42 insertions, 3 deletions
diff --git a/config/pe/brmsgw.conf b/config/pe/brmsgw.conf
index a14a03d6..01e59822 100644
--- a/config/pe/brmsgw.conf
+++ b/config/pe/brmsgw.conf
@@ -47,7 +47,7 @@ BRMS_UEB_URL=
BRMS_UEB_TOPIC=
BRMS_UEB_DELAY=
BRMS_CLIENT_ID=python
-BRMS_CLIENT_KEY=test
+BRMS_CLIENT_KEY=dGVzdA==
BRMS_UEB_API_KEY=
BRMS_UEB_API_SECRET=
diff --git a/config/pe/push-policies.sh b/config/pe/push-policies.sh
index bd841f15..02d1f254 100644
--- a/config/pe/push-policies.sh
+++ b/config/pe/push-policies.sh
@@ -43,7 +43,28 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
sleep 2
-echo "pushPolicy : DELETE : com.BRMSParamvFWDemoPolicy.1.xml"
+echo "deletePolicy : DELETE : com.vFirewall"
+curl -v --silent -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.vFirewall",
+"policyType": "MicroService"
+}' 'http://pdp:8081/pdp/api/deletePolicy'
+
+
+sleep 2
+
+echo "deletePolicy : DELETE : com.vLoadBalancer"
+curl -v --silent -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.vLoadBalancer",
+"policyType": "MicroService"
+}' 'http://pdp:8081/pdp/api/deletePolicy'
+
+sleep 2
+
+echo "deletePolicy : DELETE : com.BRMSParamvFWDemoPolicy"
curl -v --silent -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",
@@ -54,7 +75,7 @@ curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'A
sleep 2
-echo "pushPolicy : DELETE : com.BRMSParamvLBDemoPolicy.1.xml"
+echo "deletePolicy : DELETE : com.BRMSParamvLBDemoPolicy"
curl -v --silent -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",
@@ -64,6 +85,24 @@ curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'A
sleep 2
+echo "pushPolicy : PUT : com.vFirewall"
+curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "com.vFirewall",
+ "policyType": "MicroService"
+}' 'http://pdp:8081/pdp/api/pushPolicy'
+
+sleep 2
+
+echo "pushPolicy : PUT : com.vLoadBalancer"
+curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
+ "pdpGroup": "default",
+ "policyName": "com.vLoadBalancer",
+ "policyType": "MicroService"
+}' 'http://pdp:8081/pdp/api/pushPolicy'
+
+sleep 2
+
echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",