aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/policy
diff options
context:
space:
mode:
authorBilal A <bilal@research.att.com>2020-01-16 16:12:19 +0000
committerBilal A <bilal@research.att.com>2020-01-20 16:59:53 +0000
commit9f54c00e36c66ffbd232f443a0a56114d06361dc (patch)
tree99d1e15c6a3f8e4fd3f727d31043281b230b048f /scripts/policy
parentb3b620885747a9147e3575f8567904575500f88e (diff)
Updating the jdk version from jdk8 to jdk11 for CSITs
Removes JAVA_HOME for drools pdp Updates Policy API tests Updates XACML-PDP database connection Downloads dmaap simulator instead of compiling it for xacml-pdp,apex-pdp and distribution Changes from Jim, Jorge and Chenfei Issue-ID: POLICY-2325 Change-Id: I28ff3384f9ae9b7d1ce6940eb62aa87278e7a9c5 Signed-off-by: Bilal A <bilal@research.att.com>
Diffstat (limited to 'scripts/policy')
-rw-r--r--scripts/policy/config/drools/base.conf3
-rw-r--r--scripts/policy/config/policy-csit.conf1
-rw-r--r--scripts/policy/policy-models-dmaap-sim.sh35
-rwxr-xr-x[-rw-r--r--]scripts/policy/policy-xacml-pdp/config/db/db.sh6
4 files changed, 40 insertions, 5 deletions
diff --git a/scripts/policy/config/drools/base.conf b/scripts/policy/config/drools/base.conf
index d3164cb5..1e57226a 100644
--- a/scripts/policy/config/drools/base.conf
+++ b/scripts/policy/config/drools/base.conf
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ JVM_OPTIONS=-server -Xms512m -Xmx512m
POLICY_HOME=/opt/app/policy
POLICY_LOGS=/var/log/onap/policy/pdpd
-JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
KEYSTORE_PASSWD=Pol1cy_0nap
TRUSTSTORE_PASSWD=Pol1cy_0nap
diff --git a/scripts/policy/config/policy-csit.conf b/scripts/policy/config/policy-csit.conf
index aa5f9396..1858698a 100644
--- a/scripts/policy/config/policy-csit.conf
+++ b/scripts/policy/config/policy-csit.conf
@@ -1,2 +1,3 @@
GERRIT_BRANCH=master
POLICY_MARIADB_VER=10.2.25
+NEXUS_URL=https://nexus.onap.org/content/repositories/snapshots
diff --git a/scripts/policy/policy-models-dmaap-sim.sh b/scripts/policy/policy-models-dmaap-sim.sh
new file mode 100644
index 00000000..0abd9f94
--- /dev/null
+++ b/scripts/policy/policy-models-dmaap-sim.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+source ${SCRIPTS}/policy/config/policy-csit.conf
+
+POLICY_MODELS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_MODELS_VERSION="${POLICY_MODELS_VERSION_EXTRACT}"
+echo ${POLICY_MODELS_VERSION}
+
+# download dmaap tarball and build docker image
+git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
+cd models/models-sim/models-sim-dmaap
+item=`curl --silent -L ${NEXUS_URL}/org/onap/policy/models/sim/policy-models-sim-dmaap/${POLICY_MODELS_VERSION} | egrep 'policy-models-sim-dmaap-.*tarball' | cut '-d"' -f2 | egrep 'gz$' | sort | tail -1`
+mkdir target
+curl -L $item -o target/policy-models-sim-dmaap-${POLICY_MODELS_VERSION}-tarball.tar.gz
+bash ./src/main/package/docker/docker_build.sh
+cd ${WORKSPACE}
+rm -rf ${WORK_DIR}
+
diff --git a/scripts/policy/policy-xacml-pdp/config/db/db.sh b/scripts/policy/policy-xacml-pdp/config/db/db.sh
index ac150a03..499764df 100644..100755
--- a/scripts/policy/policy-xacml-pdp/config/db/db.sh
+++ b/scripts/policy/policy-xacml-pdp/config/db/db.sh
@@ -1,6 +1,6 @@
#!/bin/bash -xv
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,10 +17,10 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-for db in policyadmin
+for db in policyadmin operationshistory
do
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
done
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" \ No newline at end of file
+mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"