Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 1 | #! /bin/bash |
Pamela Dragosh | bed17e5 | 2018-04-16 14:15:46 -0400 | [diff] [blame^] | 2 | # Copyright 2018 AT&T Intellectual Property. All rights reserved |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 15 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 16 | #########################################Upload BRMS Param Template########################################## |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 17 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 18 | echo "Upload BRMS Param Template" |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 19 | |
Jorge Hernandez | 54c5a68 | 2017-10-03 18:40:43 -0500 | [diff] [blame] | 20 | sleep 2 |
| 21 | |
Jorge Hernandez | 0fe9e2f | 2017-10-02 16:26:13 -0500 | [diff] [blame] | 22 | wget -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 |
| 23 | |
Jorge Hernandez | 54c5a68 | 2017-10-03 18:40:43 -0500 | [diff] [blame] | 24 | sleep 2 |
| 25 | |
rb7147 | 85e8694 | 2017-10-03 13:37:05 -0400 | [diff] [blame] | 26 | curl -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 Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 27 | |
Pamela Dragosh | ca15b92 | 2017-10-10 16:18:27 -0400 | [diff] [blame] | 28 | echo "PRELOAD_POLICIES is $PRELOAD_POLICIES" |
| 29 | |
| 30 | if [ "$PRELOAD_POLICIES" == "false" ]; then |
| 31 | exit 0 |
| 32 | fi |
| 33 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 34 | #########################################Create BRMS Param policies########################################## |
| 35 | |
| 36 | echo "Create BRMSParam Operational Policies" |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 37 | |
| 38 | sleep 2 |
| 39 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 40 | echo "Create BRMSParamvFirewall Policy" |
| 41 | curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 42 | "policyConfigType": "BRMS_PARAM", |
| 43 | "policyName": "com.BRMSParamvFirewall", |
| 44 | "policyDescription": "BRMS Param vFirewall policy", |
| 45 | "policyScope": "com", |
| 46 | "attributes": { |
| 47 | "MATCHING": { |
| 48 | "controller" : "amsterdam" |
| 49 | }, |
| 50 | "RULE": { |
| 51 | "templateName": "ClosedLoopControlName", |
| 52 | "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", |
rb7147 | e9c3f63 | 2017-10-17 09:29:49 -0400 | [diff] [blame] | 53 | "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%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++++++%23+TBD+-+Cannot+be+known+until+instantiation+is+done%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" |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 54 | } |
| 55 | } |
| 56 | }' 'http://pdp:8081/pdp/api/createPolicy' |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 57 | |
| 58 | sleep 2 |
Jorge Hernandez | 0eab4f2 | 2017-06-20 17:32:25 -0500 | [diff] [blame] | 59 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 60 | echo "Create BRMSParamvDNS Policy" |
| 61 | curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 62 | "policyConfigType": "BRMS_PARAM", |
| 63 | "policyName": "com.BRMSParamvDNS", |
| 64 | "policyDescription": "BRMS Param vDNS policy", |
| 65 | "policyScope": "com", |
| 66 | "attributes": { |
| 67 | "MATCHING": { |
| 68 | "controller" : "amsterdam" |
| 69 | }, |
| 70 | "RULE": { |
| 71 | "templateName": "ClosedLoopControlName", |
| 72 | "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", |
rb7147 | e9c3f63 | 2017-10-17 09:29:49 -0400 | [diff] [blame] | 73 | "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%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" |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 74 | } |
| 75 | } |
| 76 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 77 | |
| 78 | sleep 2 |
| 79 | |
| 80 | echo "Create BRMSParamVOLTE Policy" |
| 81 | curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 82 | "policyConfigType": "BRMS_PARAM", |
| 83 | "policyName": "com.BRMSParamVOLTE", |
| 84 | "policyDescription": "BRMS Param VOLTE policy", |
| 85 | "policyScope": "com", |
| 86 | "attributes": { |
| 87 | "MATCHING": { |
| 88 | "controller" : "amsterdam" |
| 89 | }, |
| 90 | "RULE": { |
| 91 | "templateName": "ClosedLoopControlName", |
| 92 | "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b", |
rb7147 | e9c3f63 | 2017-10-17 09:29:49 -0400 | [diff] [blame] | 93 | "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++abatement%3A+false%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" |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 94 | } |
| 95 | } |
| 96 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 97 | |
| 98 | sleep 2 |
| 99 | |
| 100 | echo "Create BRMSParamvCPE Policy" |
| 101 | curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 102 | "policyConfigType": "BRMS_PARAM", |
| 103 | "policyName": "com.BRMSParamvCPE", |
| 104 | "policyDescription": "BRMS Param vCPE policy", |
| 105 | "policyScope": "com", |
| 106 | "attributes": { |
| 107 | "MATCHING": { |
| 108 | "controller" : "amsterdam" |
| 109 | }, |
| 110 | "RULE": { |
| 111 | "templateName": "ClosedLoopControlName", |
| 112 | "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", |
rb7147 | e9c3f63 | 2017-10-17 09:29:49 -0400 | [diff] [blame] | 113 | "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++abatement%3A+true%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" |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 114 | } |
| 115 | } |
| 116 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 117 | |
| 118 | #########################################Create Micro Service Config policies########################################## |
| 119 | |
| 120 | echo "Create MicroService Config Policies" |
| 121 | |
| 122 | sleep 2 |
| 123 | |
| 124 | echo "Create MicroServicevFirewall Policy" |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 125 | 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 '{ |
rb7147 | 079c029 | 2017-10-26 14:42:29 -0400 | [diff] [blame] | 126 | "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 127 | "policyConfigType": "MicroService", |
| 128 | "policyName": "com.MicroServicevFirewall", |
| 129 | "onapName": "DCAE" |
| 130 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 131 | |
| 132 | |
| 133 | sleep 2 |
| 134 | |
| 135 | echo "Create MicroServicevDNS Policy" |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 136 | 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 '{ |
rb7147 | 079c029 | 2017-10-26 14:42:29 -0400 | [diff] [blame] | 137 | "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevDNS\", \"description\": \"MicroService vDNS Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vLoadBalancer\", \"controlLoopSchemaType\": \"VM\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 138 | "policyConfigType": "MicroService", |
| 139 | "policyName": "com.MicroServicevDNS", |
| 140 | "onapName": "DCAE" |
| 141 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 142 | |
| 143 | |
| 144 | sleep 2 |
| 145 | |
| 146 | echo "Create MicroServicevCPE Policy" |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 147 | 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 '{ |
rb7147 | 079c029 | 2017-10-26 14:42:29 -0400 | [diff] [blame] | 148 | "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"Measurement_vGMUX\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ABATED\" }, { \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"GREATER\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 149 | "policyConfigType": "MicroService", |
| 150 | "policyName": "com.MicroServicevCPE", |
| 151 | "onapName": "DCAE" |
| 152 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 153 | |
| 154 | |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 155 | #########################################Creating Decision Guard policy######################################### |
| 156 | |
| 157 | sleep 2 |
| 158 | |
| 159 | echo "Creating Decision Guard policy" |
| 160 | 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 '{ |
| 161 | "policyClass": "Decision", |
| 162 | "policyName": "com.AllPermitGuard", |
| 163 | "policyDescription": "Testing all Permit YAML Guard Policy", |
| 164 | "ecompName": "PDPD", |
| 165 | "ruleProvider": "GUARD_YAML", |
| 166 | "attributes": { |
| 167 | "MATCHING": { |
| 168 | "actor": ".*", |
| 169 | "recipe": ".*", |
| 170 | "targets": ".*", |
| 171 | "clname": ".*", |
| 172 | "limit": "10", |
| 173 | "timeWindow": "1", |
| 174 | "timeUnits": "minute", |
Tej, Tarun | 77a1ea9 | 2017-10-10 13:18:39 -0400 | [diff] [blame] | 175 | "guardActiveStart": "00:00:01-05:00", |
| 176 | "guardActiveEnd": "00:00:00-05:00" |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 177 | } |
| 178 | } |
| 179 | }' 'http://pdp:8081/pdp/api/createPolicy' |
| 180 | |
| 181 | #########################################Push Decision policy######################################### |
| 182 | |
| 183 | sleep 2 |
| 184 | |
| 185 | echo "Push Decision policy" |
| 186 | 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 '{ |
| 187 | "pdpGroup": "default", |
| 188 | "policyName": "com.AllPermitGuard", |
| 189 | "policyType": "DECISION" |
| 190 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 191 | |
| 192 | #########################################Pushing BRMS Param policies########################################## |
| 193 | |
| 194 | echo "Pushing BRMSParam Operational policies" |
| 195 | |
| 196 | sleep 2 |
| 197 | |
| 198 | echo "pushPolicy : PUT : com.BRMSParamvFirewall" |
Jorge Hernandez | dc8bdd5 | 2017-06-19 23:02:43 -0500 | [diff] [blame] | 199 | 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 '{ |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 200 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 201 | "policyName": "com.BRMSParamvFirewall", |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 202 | "policyType": "BRMS_Param" |
ITSERVICES\rb7147 | b150eba | 2017-05-09 13:54:45 -0400 | [diff] [blame] | 203 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 204 | |
| 205 | sleep 2 |
| 206 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 207 | echo "pushPolicy : PUT : com.BRMSParamvDNS" |
Jorge Hernandez | dc8bdd5 | 2017-06-19 23:02:43 -0500 | [diff] [blame] | 208 | 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 '{ |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 209 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 210 | "policyName": "com.BRMSParamvDNS", |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 211 | "policyType": "BRMS_Param" |
ITSERVICES\rb7147 | b150eba | 2017-05-09 13:54:45 -0400 | [diff] [blame] | 212 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 213 | |
| 214 | sleep 2 |
| 215 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 216 | echo "pushPolicy : PUT : com.BRMSParamVOLTE" |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 217 | 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 '{ |
| 218 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 219 | "policyName": "com.BRMSParamVOLTE", |
| 220 | "policyType": "BRMS_Param" |
| 221 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
| 222 | |
| 223 | sleep 2 |
| 224 | |
| 225 | echo "pushPolicy : PUT : com.BRMSParamvCPE" |
| 226 | 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 '{ |
| 227 | "pdpGroup": "default", |
| 228 | "policyName": "com.BRMSParamvCPE", |
| 229 | "policyType": "BRMS_Param" |
| 230 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
| 231 | |
| 232 | #########################################Pushing MicroService Config policies########################################## |
| 233 | |
| 234 | echo "Pushing MicroService Config policies" |
| 235 | |
| 236 | sleep 2 |
| 237 | |
| 238 | echo "pushPolicy : PUT : com.MicroServicevFirewall" |
| 239 | 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 '{ |
| 240 | "pdpGroup": "default", |
| 241 | "policyName": "com.MicroServicevFirewall", |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 242 | "policyType": "MicroService" |
| 243 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
| 244 | |
Jorge Hernandez | 887bb7e | 2017-11-09 11:20:06 -0600 | [diff] [blame] | 245 | sleep 10 |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 246 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 247 | echo "pushPolicy : PUT : com.MicroServicevDNS" |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 248 | 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 '{ |
| 249 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 250 | "policyName": "com.MicroServicevDNS", |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 251 | "policyType": "MicroService" |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 252 | }' 'http://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 253 | |
Jorge Hernandez | 887bb7e | 2017-11-09 11:20:06 -0600 | [diff] [blame] | 254 | sleep 10 |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 255 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 256 | echo "pushPolicy : PUT : com.MicroServicevCPE" |
Jorge Hernandez | dc8bdd5 | 2017-06-19 23:02:43 -0500 | [diff] [blame] | 257 | 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 '{ |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 258 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 259 | "policyName": "com.MicroServicevCPE", |
| 260 | "policyType": "MicroService" |
Jorge Hernandez | 0fe9e2f | 2017-10-02 16:26:13 -0500 | [diff] [blame] | 261 | }' 'http://pdp:8081/pdp/api/pushPolicy' |