blob: d50706dee3bf3ed5a65e6e519bf9e50756d3337e [file] [log] [blame]
Pamela Dragoshd1728dc2017-02-14 19:57:17 -05001#! /bin/bash
2
rb7147227bd092017-09-27 16:13:50 -04003#########################################Upload BRMS Param Template##########################################
Pamela Dragoshd1728dc2017-02-14 19:57:17 -05004
rb7147227bd092017-09-27 16:13:50 -04005echo "Upload BRMS Param Template"
Pamela Dragoshd1728dc2017-02-14 19:57:17 -05006
Jorge Hernandez54c5a682017-10-03 18:40:43 -05007sleep 2
8
Jorge Hernandez0fe9e2f2017-10-02 16:26:13 -05009wget -O cl-amsterdam-template.drl https://git.onap.org/policy/drools-applications/plain/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
10
Jorge Hernandez54c5a682017-10-03 18:40:43 -050011sleep 2
12
rb714785e86942017-10-03 13:37:05 -040013curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://pdp:8081/pdp/api/policyEngineImport'
Pamela Dragoshd1728dc2017-02-14 19:57:17 -050014
Pamela Dragoshca15b922017-10-10 16:18:27 -040015echo "PRELOAD_POLICIES is $PRELOAD_POLICIES"
16
17if [ "$PRELOAD_POLICIES" == "false" ]; then
18 exit 0
19fi
20
rb7147227bd092017-09-27 16:13:50 -040021#########################################Create BRMS Param policies##########################################
22
23echo "Create BRMSParam Operational Policies"
Pamela Dragoshd1728dc2017-02-14 19:57:17 -050024
25sleep 2
26
rb7147227bd092017-09-27 16:13:50 -040027echo "Create BRMSParamvFirewall Policy"
28curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
29 "policyConfigType": "BRMS_PARAM",
30 "policyName": "com.BRMSParamvFirewall",
31 "policyDescription": "BRMS Param vFirewall policy",
32 "policyScope": "com",
33 "attributes": {
34 "MATCHING": {
35 "controller" : "amsterdam"
36 },
37 "RULE": {
38 "templateName": "ClosedLoopControlName",
39 "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
40 "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++services%3A%0D%0A++++-+serviceInvariantUUID%3A+5cfe6f4a-41bc-4247-8674-ebd4b98e35cc%0D%0A++++++serviceUUID%3A+0f40bba5-986e-4b3c-803f-ddd1b7b25f24%0D%0A++++++serviceName%3A+57e66ea7-0ed6-45c7-970f%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
41 }
42 }
43}' 'http://pdp:8081/pdp/api/createPolicy'
Pamela Dragoshd1728dc2017-02-14 19:57:17 -050044
45sleep 2
Jorge Hernandez0eab4f22017-06-20 17:32:25 -050046
rb7147227bd092017-09-27 16:13:50 -040047echo "Create BRMSParamvDNS Policy"
48curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
49 "policyConfigType": "BRMS_PARAM",
50 "policyName": "com.BRMSParamvDNS",
51 "policyDescription": "BRMS Param vDNS policy",
52 "policyScope": "com",
53 "attributes": {
54 "MATCHING": {
55 "controller" : "amsterdam"
56 },
57 "RULE": {
58 "templateName": "ClosedLoopControlName",
59 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
Hockla, Ali (ah999m)0f8e15a2017-10-10 13:32:30 -050060 "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++services%3A%0D%0A++++-+serviceName%3A+d4738992-6497-4dca-9db9%0D%0A++++++serviceInvariantUUID%3A+dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f%0D%0A++++++serviceUUID%3A+2eea06c6-e1d3-4c3a-b9c4-478c506eeedf%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
rb7147227bd092017-09-27 16:13:50 -040061 }
62 }
63}' 'http://pdp:8081/pdp/api/createPolicy'
64
65sleep 2
66
67echo "Create BRMSParamVOLTE Policy"
68curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
69 "policyConfigType": "BRMS_PARAM",
70 "policyName": "com.BRMSParamVOLTE",
71 "policyDescription": "BRMS Param VOLTE policy",
72 "policyScope": "com",
73 "attributes": {
74 "MATCHING": {
75 "controller" : "amsterdam"
76 },
77 "RULE": {
78 "templateName": "ClosedLoopControlName",
79 "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
80 "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
81 }
82 }
83}' 'http://pdp:8081/pdp/api/createPolicy'
84
85sleep 2
86
87echo "Create BRMSParamvCPE Policy"
88curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
89 "policyConfigType": "BRMS_PARAM",
90 "policyName": "com.BRMSParamvCPE",
91 "policyDescription": "BRMS Param vCPE policy",
92 "policyScope": "com",
93 "attributes": {
94 "MATCHING": {
95 "controller" : "amsterdam"
96 },
97 "RULE": {
98 "templateName": "ClosedLoopControlName",
99 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
100 "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
101 }
102 }
103}' 'http://pdp:8081/pdp/api/createPolicy'
104
105#########################################Create Micro Service Config policies##########################################
106
107echo "Create MicroService Config Policies"
108
109sleep 2
110
111echo "Create MicroServicevFirewall Policy"
rb714743f490a2017-09-28 16:30:47 -0400112curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
rb7147227bd092017-09-27 16:13:50 -0400113 "configBody": "{\"service\": \"policy_tosca_tca\",\"location\": \"SampleServiceLocation\",\"uuid\": \"test\",\"policyName\": \"MicroServicevFirewall\",\"description\": \"MicroService vFirewall Policy\",\"configName\": \"SampleConfigName\",\"templateVersion\": \"OpenSource.version.1\",\"version\": \"1.0.0\",\"priority\": \"1\",\"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop\",\"riskType\": \"SampleRiskType\",\"riskLevel\": \"1\",\"guard\": \"False\",\"content\": {\"policyVersion\": \"v0.0.1\",\"threshholds\": [{\"severity\": \"MAJOR\",\"fieldPath\": \"$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\": \"4000\",\"closedLoopEventStatus\": \"ONSET\",\"closedLoopControlName\": \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"version\": \"1.0.2\",\"direction\": \"LESS_OR_EQUAL\"}, {\"severity\": \"CRITICAL\",\"fieldPath\": \"$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\": \"20000\",\"closedLoopEventStatus\": \"ONSET\",\"closedLoopControlName\": \"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"version\": \"1.0.2\",\"direction\": \"GREATER_OR_EQUAL\"}],\"policyName\": \"DCAE.Config_tca-hi-lo\",\"controlLoopSchemaType\": \"VNF\",\"policyScope\": \"DCAE\",\"eventName\": \"vFirewallBroadcastPackets\"}}",
114 "policyConfigType": "MicroService",
115 "policyName": "com.MicroServicevFirewall",
116 "onapName": "DCAE"
117}' 'http://pdp:8081/pdp/api/createPolicy'
118
119
120sleep 2
121
122echo "Create MicroServicevDNS Policy"
rb714743f490a2017-09-28 16:30:47 -0400123curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
rb7147227bd092017-09-27 16:13:50 -0400124 "configBody": "{ \"service\": \"policy_tosca_tca\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevDNS\", \"description\": \"MicroService vDNS Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.0.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"policyVersion\": \"v0.0.1\", \"threshholds\": [{ \"severity\": \"MAJOR\", \"fieldPath\": \"$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\", \"thresholdValue\": \"500\", \"closedLoopEventStatus\": \"ONSET\", \"closedLoopControlName\": \"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\", \"version\": \"1.0.2\", \"direction\": \"LESS_OR_EQUAL\" }, { \"severity\": \"CRITICAL\", \"fieldPath\": \"$$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\", \"thresholdValue\": \"5000\", \"closedLoopEventStatus\": \"ONSET\", \"closedLoopControlName\": \"CL-LBAL-HIGH-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\", \"version\": \"1.0.2\", \"direction\": \"GREATER_OR_EQUAL\" }], \"policyName\": \"DCAE.Config_tca-hi-lo\", \"controlLoopSchemaType\": \"VM\", \"policyScope\": \"DCAE\", \"eventName\": \"vLoadBalancer\" } }",
125 "policyConfigType": "MicroService",
126 "policyName": "com.MicroServicevDNS",
127 "onapName": "DCAE"
128}' 'http://pdp:8081/pdp/api/createPolicy'
129
130
131sleep 2
132
133echo "Create MicroServicevCPE Policy"
rb714743f490a2017-09-28 16:30:47 -0400134curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
rb7147227bd092017-09-27 16:13:50 -0400135 "configBody": "{ \"service\": \"policy_tosca_tca\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.0.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"policyVersion\": \"v0.0.1\", \"threshholds\": [{ \"severity\": \"MAJOR\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\", \"thresholdValue\": \"0\", \"closedLoopEventStatus\": \"ABATED\", \"closedLoopControlName\": \"CL-vCPEvGMUX-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241ABA1\", \"version\": \"1.0.2\", \"direction\": \"EQUAL\" }, { \"severity\": \"CRITICAL\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\", \"thresholdValue\": \"1000\", \"closedLoopEventStatus\": \"ONSET\", \"closedLoopControlName\": \"CL-vCPEvGMUX-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241ABA1\", \"version\": \"1.0.2\", \"direction\": \"GREATER_OR_EQUAL\" }], \"policyName\": \"DCAE.Config_tca-hi-lo\", \"controlLoopSchemaType\": \"VM\", \"policyScope\": \"DCAE\", \"eventName\": \"vCPEvGMUXPacketLoss\" } }",
136 "policyConfigType": "MicroService",
137 "policyName": "com.MicroServicevCPE",
138 "onapName": "DCAE"
139}' 'http://pdp:8081/pdp/api/createPolicy'
140
141
rb714743f490a2017-09-28 16:30:47 -0400142#########################################Creating Decision Guard policy#########################################
143
144sleep 2
145
146echo "Creating Decision Guard policy"
147curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
148 "policyClass": "Decision",
149 "policyName": "com.AllPermitGuard",
150 "policyDescription": "Testing all Permit YAML Guard Policy",
151 "ecompName": "PDPD",
152 "ruleProvider": "GUARD_YAML",
153 "attributes": {
154 "MATCHING": {
155 "actor": ".*",
156 "recipe": ".*",
157 "targets": ".*",
158 "clname": ".*",
159 "limit": "10",
160 "timeWindow": "1",
161 "timeUnits": "minute",
Tej, Tarun77a1ea92017-10-10 13:18:39 -0400162 "guardActiveStart": "00:00:01-05:00",
163 "guardActiveEnd": "00:00:00-05:00"
rb714743f490a2017-09-28 16:30:47 -0400164 }
165 }
166}' 'http://pdp:8081/pdp/api/createPolicy'
167
168#########################################Push Decision policy#########################################
169
170sleep 2
171
172echo "Push Decision policy"
173curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
174 "pdpGroup": "default",
175 "policyName": "com.AllPermitGuard",
176 "policyType": "DECISION"
177}' 'http://pdp:8081/pdp/api/pushPolicy'
rb7147227bd092017-09-27 16:13:50 -0400178
179#########################################Pushing BRMS Param policies##########################################
180
181echo "Pushing BRMSParam Operational policies"
182
183sleep 2
184
185echo "pushPolicy : PUT : com.BRMSParamvFirewall"
Jorge Hernandezdc8bdd52017-06-19 23:02:43 -0500186curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500187 "pdpGroup": "default",
rb7147227bd092017-09-27 16:13:50 -0400188 "policyName": "com.BRMSParamvFirewall",
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500189 "policyType": "BRMS_Param"
ITSERVICES\rb7147b150eba2017-05-09 13:54:45 -0400190}' 'http://pdp:8081/pdp/api/pushPolicy'
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500191
192sleep 2
193
rb7147227bd092017-09-27 16:13:50 -0400194echo "pushPolicy : PUT : com.BRMSParamvDNS"
Jorge Hernandezdc8bdd52017-06-19 23:02:43 -0500195curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500196 "pdpGroup": "default",
rb7147227bd092017-09-27 16:13:50 -0400197 "policyName": "com.BRMSParamvDNS",
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500198 "policyType": "BRMS_Param"
ITSERVICES\rb7147b150eba2017-05-09 13:54:45 -0400199}' 'http://pdp:8081/pdp/api/pushPolicy'
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500200
201sleep 2
202
rb7147227bd092017-09-27 16:13:50 -0400203echo "pushPolicy : PUT : com.BRMSParamVOLTE"
rb714716ca5982017-06-23 15:03:19 -0400204curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
205 "pdpGroup": "default",
rb7147227bd092017-09-27 16:13:50 -0400206 "policyName": "com.BRMSParamVOLTE",
207 "policyType": "BRMS_Param"
208}' 'http://pdp:8081/pdp/api/pushPolicy'
209
210sleep 2
211
212echo "pushPolicy : PUT : com.BRMSParamvCPE"
213curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
214 "pdpGroup": "default",
215 "policyName": "com.BRMSParamvCPE",
216 "policyType": "BRMS_Param"
217}' 'http://pdp:8081/pdp/api/pushPolicy'
218
219#########################################Pushing MicroService Config policies##########################################
220
221echo "Pushing MicroService Config policies"
222
223sleep 2
224
225echo "pushPolicy : PUT : com.MicroServicevFirewall"
226curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
227 "pdpGroup": "default",
228 "policyName": "com.MicroServicevFirewall",
rb714716ca5982017-06-23 15:03:19 -0400229 "policyType": "MicroService"
230}' 'http://pdp:8081/pdp/api/pushPolicy'
231
232sleep 2
233
rb7147227bd092017-09-27 16:13:50 -0400234echo "pushPolicy : PUT : com.MicroServicevDNS"
rb714716ca5982017-06-23 15:03:19 -0400235curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
236 "pdpGroup": "default",
rb7147227bd092017-09-27 16:13:50 -0400237 "policyName": "com.MicroServicevDNS",
rb714716ca5982017-06-23 15:03:19 -0400238 "policyType": "MicroService"
rb714743f490a2017-09-28 16:30:47 -0400239}' 'http://pdp:8081/pdp/api/pushPolicy'
rb714716ca5982017-06-23 15:03:19 -0400240
241sleep 2
242
rb7147227bd092017-09-27 16:13:50 -0400243echo "pushPolicy : PUT : com.MicroServicevCPE"
Jorge Hernandezdc8bdd52017-06-19 23:02:43 -0500244curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
Pamela Dragoshd1728dc2017-02-14 19:57:17 -0500245 "pdpGroup": "default",
rb7147227bd092017-09-27 16:13:50 -0400246 "policyName": "com.MicroServicevCPE",
247 "policyType": "MicroService"
Jorge Hernandez0fe9e2f2017-10-02 16:26:13 -0500248}' 'http://pdp:8081/pdp/api/pushPolicy'