diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2017-10-10 16:18:27 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-10-11 09:42:57 -0400 |
commit | ca15b920b57259eccc7dbaea5200f393d3f8bfe6 (patch) | |
tree | 9fef7238c992bcb75e0f1cc897ebd9cc98ac7d6e /config/pe/push-policies.sh | |
parent | 31fb6c55623e8655b5c29b8848020bb84397ef1e (diff) |
Add ability to turn off policy preload
You can now set environment variable to override whether or not the
policies are pre-loaded by the engines during docker image startup.
The README.md is updated with instructions. Each docker-compose has
a different default set.
The .env file is set to load policies by default to true. You can override
by either changing this file or setting the environment:
export PRELOAD_POLICIES=false
Issue-ID: POLICY-304
Change-Id: Ia96788ac3b8d47814eea1046d96c4e3e4a0b9664
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'config/pe/push-policies.sh')
-rwxr-xr-x[-rw-r--r--] | config/pe/push-policies.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/pe/push-policies.sh b/config/pe/push-policies.sh index 77f94c0f..d50706de 100644..100755 --- a/config/pe/push-policies.sh +++ b/config/pe/push-policies.sh @@ -12,6 +12,12 @@ sleep 2 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' +echo "PRELOAD_POLICIES is $PRELOAD_POLICIES" + +if [ "$PRELOAD_POLICIES" == "false" ]; then + exit 0 +fi + #########################################Create BRMS Param policies########################################## echo "Create BRMSParam Operational Policies" |