diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2021-05-27 14:41:11 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2021-05-27 17:19:46 -0500 |
commit | 9e627229dad4b56fd626f0b2813eb5b63e9a27a2 (patch) | |
tree | 08e862ce8132d4cf2aa1ef1519711b2448a24aa7 /packages/policy-pap-docker/src/main/docker | |
parent | 47c4b4bf0940aa56bbf43b1ff7edc018b538019e (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
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
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 | 18 |
1 files changed, 17 insertions, 1 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 2b49affc..469d95e7 100644 --- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh +++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh @@ -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}" |