diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2021-05-27 14:41:11 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2021-06-01 18:40:43 -0500 |
commit | bf715b07b8b3e4381b31ec46fc17a9d4b0c7047f (patch) | |
tree | a8c8c4ee389f2d82318ff9f68b74a3c6e1b54570 /packages/policy-pap-docker/src/main/docker | |
parent | 3c86cf520f0a928750676dbd3e6c7f3bd52327af (diff) |
support external configuration of pdp groups
- modify policy-pap.sh to optionally provision
a custom group if such a file is present.
Issue-ID: POLICY-3331
Change-Id: Ib53bc14ee6b9471ab48f5a792b4283db3ed53b93
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/policy-pap-docker/src/main/docker')
-rw-r--r-- | packages/policy-pap-docker/src/main/docker/policy-pap.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh index 70dc7bde..7b5d44d4 100644 --- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh +++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh @@ -2,7 +2,7 @@ # # ============LICENSE_START======================================================= # Copyright (C) 2019-2020 Nordix Foundation. -# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. +# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,4 +53,20 @@ if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/ fi -$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" -Djavax.net.ssl.keyStore="${KEYSTORE}" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" -Djavax.net.ssl.trustStore="${TRUSTSTORE}" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" org.onap.policy.pap.main.startstop.Main -c "${CONFIG_FILE}" +# provide and external PDP group configuration if a groups.json +# file is present in the data directory. If none is present, +# the PAP will use the PapDb.json resource in the classpath +# to load a default group. + +if [ -f "${POLICY_HOME}/etc/mounted/groups.json" ]; then + CUSTOM_GROUPS="-g ${POLICY_HOME}/etc/mounted/groups.json" +fi + +$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" \ + -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" \ + -Djavax.net.ssl.keyStore="${KEYSTORE}" \ + -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \ + -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \ + -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \ + org.onap.policy.pap.main.startstop.Main \ + -c "${CONFIG_FILE}" "${CUSTOM_GROUPS}" |