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 | |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 26 | curl -k -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\"}" 'https://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" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 41 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 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", |
| 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" |
| 54 | } |
| 55 | } |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 56 | }' 'https://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" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 61 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 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", |
| 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" |
| 74 | } |
| 75 | } |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 76 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 77 | |
| 78 | sleep 2 |
| 79 | |
| 80 | echo "Create BRMSParamVOLTE Policy" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 81 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 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", |
| 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" |
| 94 | } |
| 95 | } |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 96 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 97 | |
| 98 | sleep 2 |
| 99 | |
| 100 | echo "Create BRMSParamvCPE Policy" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 101 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 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", |
| 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" |
| 114 | } |
| 115 | } |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 116 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 117 | |
Saravanan A | 62490d0 | 2018-09-18 14:53:45 +0530 | [diff] [blame] | 118 | sleep 2 |
| 119 | |
| 120 | echo "Create BRMSParamvPCI Policy" |
| 121 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 122 | "policyConfigType": "BRMS_PARAM", |
| 123 | "policyName": "com.BRMSParamvPCI", |
| 124 | "policyDescription": "BRMS Param vPCI policy", |
| 125 | "policyScope": "com", |
| 126 | "attributes": { |
| 127 | "MATCHING": { |
| 128 | "controller" : "casablanca" |
| 129 | }, |
| 130 | "RULE": { |
| 131 | "templateName": "ClosedLoopControlName", |
| 132 | "closedLoopControlName": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459", |
| 133 | "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+3.0.0%0D%0A++controlLoopName%3A+ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459%0D%0A++trigger_policy%3A+unique-policy-id-123-modifyconfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-123-modifyconfig%0D%0A++++name%3A+modify+PCI+config%0D%0A++++description%3A%0D%0A++++actor%3A+SDNR%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+These+fields+are+not+used%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" |
| 134 | } |
| 135 | } |
Saravanan A | 62490d0 | 2018-09-18 14:53:45 +0530 | [diff] [blame] | 136 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 137 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 138 | #########################################Create Micro Service Config policies########################################## |
| 139 | |
| 140 | echo "Create MicroService Config Policies" |
| 141 | |
| 142 | sleep 2 |
| 143 | |
| 144 | echo "Create MicroServicevFirewall Policy" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 145 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 146 | "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\" } ] }] } } }", |
| 147 | "policyConfigType": "MicroService", |
| 148 | "policyName": "com.MicroServicevFirewall", |
| 149 | "onapName": "DCAE" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 150 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 151 | |
| 152 | |
| 153 | sleep 2 |
| 154 | |
| 155 | echo "Create MicroServicevDNS Policy" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 156 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 157 | "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\" }] }] } } }", |
| 158 | "policyConfigType": "MicroService", |
| 159 | "policyName": "com.MicroServicevDNS", |
| 160 | "onapName": "DCAE" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 161 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 162 | |
| 163 | |
| 164 | sleep 2 |
| 165 | |
| 166 | echo "Create MicroServicevCPE Policy" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 167 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 168 | "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\" }] }] } } }", |
| 169 | "policyConfigType": "MicroService", |
| 170 | "policyName": "com.MicroServicevCPE", |
| 171 | "onapName": "DCAE" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 172 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 173 | |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 174 | #########################################Create SDNC Naming Policies########################################## |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 175 | |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 176 | echo "Create SDNC Naming Policies" |
| 177 | |
| 178 | sleep 2 |
| 179 | |
| 180 | echo "Create SDNC vFW Naming Policy" |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 181 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 182 | "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VFW_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vFW\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}", |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 183 | "policyName": "SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP", |
| 184 | "policyConfigType": "MicroService", |
| 185 | "onapName": "SDNC", |
| 186 | "riskLevel": "4", |
| 187 | "riskType": "test", |
| 188 | "guard": "false", |
| 189 | "priority": "4", |
| 190 | "description": "ONAP_VFW_NAMING_TIMESTAMP" |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 191 | }' 'https://pdp:8081/pdp/api/createPolicy' |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 192 | |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 193 | sleep 2 |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 194 | |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 195 | echo "Create SDNC vPG Naming Policy" |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 196 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 197 | "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VPG_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vPG\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}", |
| 198 | "policyName": "SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP", |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 199 | "policyConfigType": "MicroService", |
| 200 | "onapName": "SDNC", |
| 201 | "riskLevel": "4", |
| 202 | "riskType": "test", |
| 203 | "guard": "false", |
| 204 | "priority": "4", |
| 205 | "description": "ONAP_VPG_NAMING_TIMESTAMP" |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 206 | }' 'https://pdp:8081/pdp/api/createPolicy' |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 207 | |
Saravanan A | bcf5b15 | 2018-09-18 14:53:45 +0530 | [diff] [blame] | 208 | #########################################Creating OOF PCI Policies########################################## |
| 209 | sleep 2 |
| 210 | |
| 211 | echo "Create MicroServicevPCI Policy" |
| 212 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 213 | "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation_pci\", \"uuid\": \"test_pci\", \"policyName\": \"MicroServicevPCI\", \"description\": \"MicroService vPCI Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"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-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.executePolicy\", \"thresholdValue\": 1, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }", |
| 214 | "policyConfigType": "MicroService", |
| 215 | "policyName": "com.MicroServicevPCI", |
| 216 | "onapName": "DCAE" |
| 217 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 218 | |
| 219 | sleep 2 |
| 220 | |
| 221 | echo "Create PCI MS Config Policy" |
| 222 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 223 | "policyName": "com.PCIMS_CONFIG_POLICY", |
| 224 | "configBody": "{ \"PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS\":60, \"PCI_MODCONFIG_POLICY_NAME\":\"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF\":\"OOF-PCI-OPTIMIZATION\", \"PCI_SDNR_TARGET_NAME\":\"SDNR\" }", |
| 225 | "policyType": "Config", |
| 226 | "attributes" : { "matching" : { "key1" : "value1" } }, |
| 227 | "policyConfigType": "Base", |
| 228 | "onapName": "DCAE", |
| 229 | "configName": "PCIMS_CONFIG_POLICY", |
| 230 | "configBodyType": "JSON" |
| 231 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 232 | |
| 233 | sleep 2 |
| 234 | |
| 235 | echo "Create OOF Config Policy" |
| 236 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 237 | "policyName": "com.OOF_PCI_CONFIG_POLICY", |
| 238 | "configBody": "{ \"ALGO_CATEGORY\":\"OOF-PCI-OPTIMIZATION\", \"PCI_OPTMIZATION_ALGO_NAME\":\"OOF-PCI-OPTIMIZATION-LEVEL1\", \"PCI_OPTIMIZATION_NW_CONSTRAINT\":\"MAX5PCICHANGESONLY\", \"PCI_OPTIMIZATION_PRIORITY\": 2, \"PCI_OPTIMIZATION_TIME_CONSTRAINT\":\"ONLYATNIGHT\" }", |
| 239 | "attributes" : { "matching" : { "key1" : "value1" } }, |
| 240 | "policyType": "Config", |
| 241 | "policyConfigType": "Base", |
| 242 | "onapName": "DCAE", |
| 243 | "configName": "OOF_PCI_CONFIG_POLICY", |
| 244 | "configBodyType": "JSON" |
| 245 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 246 | |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 247 | #########################################Creating Decision Guard policies######################################### |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 248 | |
| 249 | sleep 2 |
| 250 | |
| 251 | echo "Creating Decision Guard policy" |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 252 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 253 | "policyClass": "Decision", |
| 254 | "policyName": "com.AllPermitGuard", |
| 255 | "policyDescription": "Testing all Permit YAML Guard Policy", |
| 256 | "ecompName": "PDPD", |
| 257 | "ruleProvider": "GUARD_YAML", |
| 258 | "attributes": { |
| 259 | "MATCHING": { |
| 260 | "actor": ".*", |
| 261 | "recipe": ".*", |
| 262 | "targets": ".*", |
| 263 | "clname": ".*", |
| 264 | "limit": "10", |
| 265 | "timeWindow": "1", |
| 266 | "timeUnits": "minute", |
| 267 | "guardActiveStart": "00:00:01-05:00", |
| 268 | "guardActiveEnd": "00:00:00-05:00" |
| 269 | } |
| 270 | } |
| 271 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 272 | |
| 273 | sleep 2 |
| 274 | |
| 275 | echo "Creating Decision vDNS Guard - Frequency Limiter policy" |
| 276 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 277 | "policyClass": "Decision", |
| 278 | "policyName": "com.vDNS_Frequency", |
| 279 | "policyDescription": "Limit vDNS Scale Up over time period", |
| 280 | "ecompName": "PDPD", |
| 281 | "ruleProvider": "GUARD_YAML", |
| 282 | "attributes": { |
| 283 | "MATCHING": { |
| 284 | "actor": "SO", |
| 285 | "recipe": "scaleOut", |
| 286 | "targets": ".*", |
| 287 | "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", |
| 288 | "limit": "1", |
| 289 | "timeWindow": "10", |
| 290 | "timeUnits": "minute", |
| 291 | "guardActiveStart": "00:00:01-05:00", |
| 292 | "guardActiveEnd": "00:00:00-05:00" |
| 293 | } |
| 294 | } |
| 295 | }' 'https://pdp:8081/pdp/api/createPolicy' |
| 296 | |
| 297 | sleep 2 |
| 298 | |
| 299 | echo "Creating Decision vDNS Guard - Min/Max policy" |
| 300 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 301 | "policyClass": "Decision", |
| 302 | "policyName": "com.vDNS_MinMax", |
| 303 | "policyDescription": "Ensure number of instances within a range", |
| 304 | "ecompName": "PDPD", |
| 305 | "ruleProvider": "GUARD_MIN_MAX", |
| 306 | "attributes": { |
| 307 | "MATCHING": { |
| 308 | "actor": "SO", |
| 309 | "recipe": "scaleOut", |
| 310 | "targets": ".*", |
| 311 | "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", |
| 312 | "min": "1", |
| 313 | "max": "5", |
| 314 | "guardActiveStart": "00:00:01-05:00", |
| 315 | "guardActiveEnd": "00:00:00-05:00" |
| 316 | } |
| 317 | } |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 318 | }' 'https://pdp:8081/pdp/api/createPolicy' |
rb7147 | 43f490a | 2017-09-28 16:30:47 -0400 | [diff] [blame] | 319 | |
| 320 | #########################################Push Decision policy######################################### |
| 321 | |
| 322 | sleep 2 |
| 323 | |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 324 | echo "Push Decision policy" |
| 325 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 326 | "pdpGroup": "default", |
| 327 | "policyName": "com.AllPermitGuard", |
| 328 | "policyType": "DECISION" |
| 329 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 330 | |
| 331 | sleep 2 |
| 332 | |
| 333 | echo "Push Decision policy" |
| 334 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 335 | "pdpGroup": "default", |
| 336 | "policyName": "com.vDNS_Frequency", |
| 337 | "policyType": "DECISION" |
| 338 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 339 | |
| 340 | sleep 2 |
| 341 | |
| 342 | echo "Push Decision policy" |
| 343 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 344 | "pdpGroup": "default", |
| 345 | "policyName": "com.vDNS_MinMax", |
| 346 | "policyType": "DECISION" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 347 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 348 | |
| 349 | #########################################Pushing BRMS Param policies########################################## |
| 350 | |
| 351 | echo "Pushing BRMSParam Operational policies" |
| 352 | |
| 353 | sleep 2 |
| 354 | |
| 355 | echo "pushPolicy : PUT : com.BRMSParamvFirewall" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 356 | curl -k -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] | 357 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 358 | "policyName": "com.BRMSParamvFirewall", |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 359 | "policyType": "BRMS_Param" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 360 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 361 | |
| 362 | sleep 2 |
| 363 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 364 | echo "pushPolicy : PUT : com.BRMSParamvDNS" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 365 | curl -k -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] | 366 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 367 | "policyName": "com.BRMSParamvDNS", |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 368 | "policyType": "BRMS_Param" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 369 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 370 | |
| 371 | sleep 2 |
| 372 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 373 | echo "pushPolicy : PUT : com.BRMSParamVOLTE" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 374 | curl -k -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 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 375 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 376 | "policyName": "com.BRMSParamVOLTE", |
| 377 | "policyType": "BRMS_Param" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 378 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 379 | |
| 380 | sleep 2 |
| 381 | |
| 382 | echo "pushPolicy : PUT : com.BRMSParamvCPE" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 383 | curl -k -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 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 384 | "pdpGroup": "default", |
| 385 | "policyName": "com.BRMSParamvCPE", |
| 386 | "policyType": "BRMS_Param" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 387 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 388 | |
Saravanan A | 62490d0 | 2018-09-18 14:53:45 +0530 | [diff] [blame] | 389 | sleep 2 |
| 390 | |
| 391 | echo "pushPolicy : PUT : com.BRMSParamvPCI" |
| 392 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 393 | "pdpGroup": "default", |
| 394 | "policyName": "com.BRMSParamvPCI", |
| 395 | "policyType": "BRMS_Param" |
| 396 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 397 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 398 | #########################################Pushing MicroService Config policies########################################## |
| 399 | |
| 400 | echo "Pushing MicroService Config policies" |
| 401 | |
| 402 | sleep 2 |
| 403 | |
| 404 | echo "pushPolicy : PUT : com.MicroServicevFirewall" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 405 | curl -k -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 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 406 | "pdpGroup": "default", |
| 407 | "policyName": "com.MicroServicevFirewall", |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 408 | "policyType": "MicroService" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 409 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 410 | |
Jorge Hernandez | 887bb7e | 2017-11-09 11:20:06 -0600 | [diff] [blame] | 411 | sleep 10 |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 412 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 413 | echo "pushPolicy : PUT : com.MicroServicevDNS" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 414 | curl -k -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 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 415 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 416 | "policyName": "com.MicroServicevDNS", |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 417 | "policyType": "MicroService" |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 418 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 419 | |
Jorge Hernandez | 887bb7e | 2017-11-09 11:20:06 -0600 | [diff] [blame] | 420 | sleep 10 |
rb7147 | 16ca598 | 2017-06-23 15:03:19 -0400 | [diff] [blame] | 421 | |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 422 | echo "pushPolicy : PUT : com.MicroServicevCPE" |
Michael Mokry | 2054f7b | 2018-08-29 16:43:17 -0500 | [diff] [blame] | 423 | curl -k -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] | 424 | "pdpGroup": "default", |
rb7147 | 227bd09 | 2017-09-27 16:13:50 -0400 | [diff] [blame] | 425 | "policyName": "com.MicroServicevCPE", |
| 426 | "policyType": "MicroService" |
Michael Mokry | 18426fe | 2018-08-22 10:39:12 -0500 | [diff] [blame] | 427 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
Michael Mokry | 4959db7 | 2018-09-13 11:03:24 -0500 | [diff] [blame] | 428 | |
| 429 | #########################################Pushing SDNC Naming Policies########################################## |
| 430 | echo "Pushing SDNC Naming Policies" |
| 431 | |
| 432 | sleep 2 |
| 433 | |
| 434 | echo "pushPolicy : PUT : SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP" |
| 435 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 436 | "pdpGroup": "default", |
| 437 | "policyName": "SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP", |
| 438 | "policyType": "MicroService" |
| 439 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 440 | |
| 441 | sleep 10 |
| 442 | |
| 443 | echo "pushPolicy : PUT : SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP" |
| 444 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 445 | "pdpGroup": "default", |
| 446 | "policyName": "SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP", |
| 447 | "policyType": "MicroService" |
Michael Mokry | db3b74d | 2018-09-19 11:28:27 -0500 | [diff] [blame] | 448 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
Saravanan A | bcf5b15 | 2018-09-18 14:53:45 +0530 | [diff] [blame] | 449 | |
| 450 | |
| 451 | #########################################Pushing OOF PCI Policies########################################## |
| 452 | sleep 10 |
| 453 | |
| 454 | echo "pushPolicy : PUT : com.MicroServicevPCI" |
| 455 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 456 | "pdpGroup": "default", |
| 457 | "policyName": "com.MicroServicevPCI", |
| 458 | "policyType": "MicroService" |
| 459 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 460 | |
| 461 | sleep 10 |
| 462 | |
| 463 | echo "pushPolicy : PUT : com.PCIMS_CONFIG_POLICY" |
| 464 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 465 | "pdpGroup": "default", |
| 466 | "policyName": "com.PCIMS_CONFIG_POLICY", |
| 467 | "policyType": "Base" |
| 468 | }' 'https://pdp:8081/pdp/api/pushPolicy' |
| 469 | |
| 470 | sleep 10 |
| 471 | |
| 472 | echo "pushPolicy : PUT : com.OOF_PCI_CONFIG_POLICY" |
| 473 | curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ |
| 474 | "pdpGroup": "default", |
| 475 | "policyName": "com.OOF_PCI_CONFIG_POLICY", |
| 476 | "policyType": "Base" |
| 477 | }' 'https://pdp:8081/pdp/api/pushPolicy' |