diff options
author | Mandeep Khinda <Mandeep.Khinda@amdocs.com> | 2017-06-24 11:49:37 -0400 |
---|---|---|
committer | Mandeep Khinda <Mandeep.Khinda@amdocs.com> | 2017-06-24 11:49:37 -0400 |
commit | d6ea987caed84a9f36030a5a1516df7c6186362d (patch) | |
tree | 265dda9cfb43a78542e4b2ccac382a8a5583bc56 /kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh | |
parent | 43d96ac929c93d0aa2a55d860e0425a39118f7b4 (diff) |
onap on kubernetes source files
Change-Id: I4de34baf90979651223a28323010deb7aef21946
Signed-off-by: Mandeep Khinda <Mandeep.Khinda@amdocs.com>
Diffstat (limited to 'kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh')
-rwxr-xr-x | kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh new file mode 100755 index 0000000000..957156edb8 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/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' + |