aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:00 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:32 -0500
commit91d04c64771832a0b8815ffbe1f0f9920320d94d (patch)
treefb02d5e1c84a3d91def9a7ee95bc87f9c046cc96 /packages
parentb9d4caa40ef8e3566ac475968bce17b9b64b6939 (diff)
Initial OpenECOMP policy/engine commit
Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/base/pom.xml251
-rw-r--r--packages/base/src/assembly/zip.xml84
-rw-r--r--packages/base/src/files/bin/backup.sh151
-rw-r--r--packages/base/src/files/bin/certtool.sh207
-rw-r--r--packages/base/src/files/bin/java/log4j.properties31
-rw-r--r--packages/base/src/files/bin/monitor.sh139
-rw-r--r--packages/base/src/files/bin/policy.sh275
-rw-r--r--packages/base/src/files/etc/cron.d/logrotate.cron1
-rw-r--r--packages/base/src/files/etc/cron.d/monitor.cron1
-rw-r--r--packages/base/src/files/etc/logrotate.d/monitor.conf7
-rw-r--r--packages/base/src/files/etc/monitor/monitor.cfg16
-rw-r--r--packages/base/src/files/etc/profile.d/env.sh27
-rw-r--r--packages/base/src/files/etc/profile.d/su.cfg1
-rw-r--r--packages/base/src/files/install/mysql/bin/cleanup_policy.sh92
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup.sh84
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup_data.sh84
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup_remote.sh88
-rw-r--r--packages/base/src/files/install/mysql/bin/db_restore.sh97
-rw-r--r--packages/base/src/files/install/mysql/bin/db_restore_data.sh103
-rw-r--r--packages/base/src/files/install/mysql/bin/db_upgrade.sh150
-rw-r--r--packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh173
-rw-r--r--packages/base/src/files/install/mysql/data/161000_upgrade_script.sql6443
-rw-r--r--packages/base/src/files/install/servers/brmsgw/client.properties22
-rw-r--r--packages/base/src/files/install/servers/brmsgw/config.properties87
-rw-r--r--packages/base/src/files/install/servers/brmsgw/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/install/servers/brmsgw/init.d/brmsgw134
-rwxr-xr-xpackages/base/src/files/install/servers/common/logparser/init.d/logparserd131
-rw-r--r--packages/base/src/files/install/servers/common/tomcat/bin/setenv.sh31
-rw-r--r--packages/base/src/files/install/servers/common/tomcat/conf/server.xml167
-rw-r--r--packages/base/src/files/install/servers/common/tomcat/init.d/tomcatd91
-rw-r--r--packages/base/src/files/install/servers/configs/conf/server.xml169
-rw-r--r--packages/base/src/files/install/servers/console/bin/JSONConfig.json132
-rw-r--r--packages/base/src/files/install/servers/console/bin/Policy-Admin.xml565
-rw-r--r--packages/base/src/files/install/servers/console/bin/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/install/servers/console/bin/model.properties22
-rw-r--r--packages/base/src/files/install/servers/console/bin/sql/log.h2.dbbin0 -> 2127872 bytes
-rw-r--r--packages/base/src/files/install/servers/console/bin/sql/xacml.h2.dbbin0 -> 292864 bytes
-rw-r--r--packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml93
-rw-r--r--packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml93
-rw-r--r--packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vFirewall.1.xml114
-rw-r--r--packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vLoadBalancer.1.xml114
-rw-r--r--packages/base/src/files/install/servers/console/bin/xacml.admin.properties203
-rw-r--r--packages/base/src/files/install/servers/console/conf/server.xml172
-rw-r--r--packages/base/src/files/install/servers/ecomp/WEB-INF/classes/portal.properties73
-rw-r--r--packages/base/src/files/install/servers/ecomp/WEB-INF/conf/system.properties84
-rw-r--r--packages/base/src/files/install/servers/ecomp/app/policyApp/Properties/config.json3
-rw-r--r--packages/base/src/files/install/servers/pap/bin/autopush.properties22
-rw-r--r--packages/base/src/files/install/servers/pap/bin/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/install/servers/pap/bin/test.properties21
-rw-r--r--packages/base/src/files/install/servers/pap/bin/xacml.pap.properties132
-rw-r--r--packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt1116
-rw-r--r--packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt1116
-rw-r--r--packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vFirewall.1.json1
-rw-r--r--packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vLoadBalancer.1.json1
-rw-r--r--packages/base/src/files/install/servers/paplp/bin/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/install/servers/paplp/bin/parserlog.properties57
-rw-r--r--packages/base/src/files/install/servers/pdp/bin/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties125
-rw-r--r--packages/base/src/files/install/servers/pdplp/bin/config/policyLogger.properties44
-rwxr-xr-xpackages/base/src/files/install/servers/pdplp/bin/parserlog.properties57
-rw-r--r--packages/base/src/files/install/servers/pypdp/bin/client.properties22
-rw-r--r--packages/base/src/files/install/servers/pypdp/bin/config.properties51
-rw-r--r--packages/base/src/files/install/servers/pypdp/bin/config/policyLogger.properties44
-rw-r--r--packages/base/src/files/m2/settings.xml82
-rw-r--r--packages/install/pom.xml71
-rw-r--r--packages/install/src/assembly/zip.xml42
-rw-r--r--packages/install/src/files/base.conf19
-rw-r--r--packages/install/src/files/brmsgw.conf42
-rw-r--r--packages/install/src/files/console.conf134
-rwxr-xr-xpackages/install/src/files/mysql.conf5
-rw-r--r--packages/install/src/files/pap.conf52
-rwxr-xr-xpackages/install/src/files/paplp.conf12
-rw-r--r--packages/install/src/files/pdp.conf36
-rwxr-xr-xpackages/install/src/files/pdplp.conf12
-rw-r--r--packages/install/src/files/pypdp.conf25
-rw-r--r--packages/pom.xml66
76 files changed, 14632 insertions, 0 deletions
diff --git a/packages/base/pom.xml b/packages/base/pom.xml
new file mode 100755
index 000000000..f5f13c0e2
--- /dev/null
+++ b/packages/base/pom.xml
@@ -0,0 +1,251 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>packages</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>base</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Base Package</name>
+ <description>D2 ECOMP Policy Base Packaging</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-pypdp</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/pypdp/webapps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>PyPDPServer</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <destFileName>PyPDPServer.war</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-pdp</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/pdp/webapps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>ECOMP-PDP-REST</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <destFileName>pdp.war</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-pap</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/pap/webapps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>ECOMP-PAP-REST</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <destFileName>pap.war</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-ecomp</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/console/webapps</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>ecomp-sdk-app</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <destFileName>ecomp.war</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-tomcat-binary</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/install/3rdparty/</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat</artifactId>
+ <version>8.0.23</version>
+ <type>tar.gz</type>
+ <destFileName>apache-tomcat-8.0.23.tar.gz</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-brmsgw</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/brmsgw</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>BRMSGateway</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <classifier>jar-with-dependencies</classifier>
+ <destFileName>BRMSGateway.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-logparser</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/logparser</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>LogParser</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <classifier>jar-with-dependencies</classifier>
+ <destFileName>logparser.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/zip.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>unix_pe_version</id>
+ <activation>
+ <os>
+ <family>!windows</family>
+ </os>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-version-file</id>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <executable>/bin/bash</executable>
+ <arguments>
+ <argument>-c</argument>
+ <argument>mkdir -p target ; echo -e 'version="${project.version}"\ndescription="Open ECOMP Policy Engine"\nbuildTag="'"${BUILD_TAG}"'"\ncommit="'"${GIT_COMMIT}"'"\ntimestamp="${maven.build.timestamp}"' >target/build.info</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/packages/base/src/assembly/zip.xml b/packages/base/src/assembly/zip.xml
new file mode 100644
index 000000000..60731cb98
--- /dev/null
+++ b/packages/base/src/assembly/zip.xml
@@ -0,0 +1,84 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<assembly>
+ <id>base</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory>etc</outputDirectory>
+ <includes><include>build.info</include></includes>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>src/files</directory>
+ <outputDirectory>.</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/install/3rdparty/</directory>
+ <outputDirectory>install/3rdparty/</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/pypdp/webapps</directory>
+ <outputDirectory>install/servers/pypdp/webapps</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/pdp/webapps</directory>
+ <outputDirectory>install/servers/pdp/webapps</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/pap/webapps</directory>
+ <outputDirectory>install/servers/pap/webapps</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/console/webapps</directory>
+ <outputDirectory>install/servers/console/webapps</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/logparser</directory>
+ <outputDirectory>install/servers/common/logparser/bin</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/brmsgw</directory>
+ <outputDirectory>install/servers/brmsgw</outputDirectory>
+ <fileMode>700</fileMode>
+ <directoryMode>700</directoryMode>
+ </fileSet>
+ </fileSets>
+</assembly>
diff --git a/packages/base/src/files/bin/backup.sh b/packages/base/src/files/bin/backup.sh
new file mode 100644
index 000000000..75cca7388
--- /dev/null
+++ b/packages/base/src/files/bin/backup.sh
@@ -0,0 +1,151 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#!/bin/bash
+
+#########################################################################
+##
+## Functions
+##
+#########################################################################
+
+function usage() {
+ echo -n "syntax: $(basename $0) "
+ echo -n "--debug ("
+ echo -n "[--backup <backup-dir-location>] | "
+ echo -n "[--restore <backup-dir-location>])"
+}
+
+function backup() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} $@ --"
+ set -x
+ fi
+
+ if [[ -z ${POLICY_HOME} ]]; then
+ echo "error: ${POLICY_HOME} is not set"
+ exit 1
+ fi
+
+ BACKUP_DIR=$1
+ if [[ -z ${BACKUP_DIR} ]]; then
+ echo "error: a backup directory must be provided"
+ usage
+ exit 1
+ fi
+
+ /bin/mkdir -p ${BACKUP_DIR} > /dev/null 2>&1
+ if [[ ! -d ${BACKUP_DIR} ]]; then
+ echo "error: ${BACKUP_DIR} is not a directory"
+ exit 1
+ fi
+
+ if [[ ! -w ${BACKUP_DIR} ]] ; then
+ echo "error: ${BACKUP_DIR} is not writable"
+ exit 1
+ fi
+
+ if [ "$(ls -A ${BACKUP_DIR})" ]; then
+ echo "error: ${BACKUP_DIR} must be empty"
+ exit 1
+ fi
+
+ echo "backing up ${POLICY_HOME} to ${BACKUP_DIR} to.."
+ rsync -a --delete \
+ --exclude logs \
+ --exclude tmp \
+ --exclude backup \
+ --exclude servers/pap/webapps/pap \
+ --exclude servers/pdp/webapps/pdp \
+ --exclude servers/pypdp/webapps/PyPDPServer \
+ --exclude servers/console/webapps/policy \
+ ${POLICY_HOME}/* \
+ ${BACKUP_DIR}
+}
+
+function restore() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} $@ --"
+ set -x
+ fi
+
+ if [[ -z ${POLICY_HOME} ]]; then
+ echo "error: ${POLICY_HOME} is not set"
+ exit 1
+ fi
+
+ BACKUP_DIR=$1
+ if [[ -z ${BACKUP_DIR} ]]; then
+ echo "error: a backup directory must be provided"
+ usage
+ exit 1
+ fi
+
+ if [[ ! -d ${BACKUP_DIR} ]]; then
+ echo "error: ${BACKUP_DIR} is not a directory"
+ exit 1
+ fi
+
+ if [ "$(ls -A ${BACKUP_DIR})" ]; then
+ echo "OK: ${BACKUP_DIR} has content"
+ else
+ echo "error: ${BACKUP_DIR} is empty"
+ exit 1
+ fi
+
+ echo "restoring from ${BACKUP_DIR} to ${POLICY_HOME} .."
+ rsync -a ${BACKUP_DIR}/* ${POLICY_HOME}
+}
+
+OPERATION=none
+DEBUG=n
+
+# command line options parsing
+until [[ -z "$1" ]]; do
+ case $1 in
+ -d|--debug) DEBUG=y
+ set -x
+ ;;
+ -b|--backup) OPERATION=backup
+ shift
+ DIR=$1
+ ;;
+ -r|--restore) OPERATION=restore
+ shift
+ DIR=$1
+ ;;
+ *) usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+# operation validation
+case $OPERATION in
+ backup) backup $DIR
+ ;;
+ restore) restore $DIR
+ ;;
+ *) echo "invalid operation (${OPERATION}): must be in {backup|restore}";
+ usage
+ exit 1
+ ;;
+esac \ No newline at end of file
diff --git a/packages/base/src/files/bin/certtool.sh b/packages/base/src/files/bin/certtool.sh
new file mode 100644
index 000000000..02899f17b
--- /dev/null
+++ b/packages/base/src/files/bin/certtool.sh
@@ -0,0 +1,207 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#!/bin/bash
+#
+# certtool [ init fqdn | importcert cert.cer.txt | exportcsr ]
+#
+
+KEYPASS=${KEYSTORE_PASSWD}
+STOREPASS=${KEYSTORE_PASSWD}
+DIR=${POLICY_HOME}/etc/ssl
+
+KSFILE=policy-keystore
+ID=`id -n -u`
+GRP=`id -n -g`
+
+if [ ! -d $DIR ]
+then
+ echo "Policy Engine application software must be installed before using certtool"
+ exit 1
+fi
+
+TZ=GMT0
+umask 0077
+cd $DIR
+
+MODE="$1"
+shift
+if [ "$MODE" = init ]
+then
+ if [ -f $KSFILE ]
+ then
+ echo "File \"$KSFILE\" already exists - did you already initialize?"
+ echo 'Remove it before initializing'
+ exit 1
+ fi
+
+ if [ -f $KSFILE.tmp ]
+ then
+ echo "File \"$KSFILE.tmp\" already exists - did you already initialize?"
+ echo 'Remove it before initializing'
+ exit 1
+ fi
+
+ rm -f $KSFILE.csr
+ FQDN="$1"
+ shift
+ if [ "$FQDN" = "" ]
+ then
+ echo 'FQDN of server required for certtool init'
+ exit 1
+ fi
+
+ $JAVA_HOME/bin/keytool -genkey -alias $FQDN -keyalg RSA -keystore $KSFILE.tmp -keysize 2048 -storepass "$STOREPASS" -keypass "$KEYPASS" -dname "CN=$FQDN,OU=Information Technology,O=AT&T Services\, Inc.,L=Southfield,S=Michigan,C=US"
+ $JAVA_HOME/bin/keytool -certreq -alias $FQDN -keystore $KSFILE.tmp -file $KSFILE.csr -storepass "$STOREPASS" -keypass "$KEYPASS"
+ echo cat $DIR/$KSFILE.csr
+ cat $KSFILE.csr
+ echo Keystore initialized. Use the above certificate signing request.
+ exit 0
+fi
+
+if [ "$MODE" != "importcert" -a "$MODE" != "exportcsr" ]
+then
+ echo "Improper arguments. Usage is:"
+ echo "First time - to create key pair:"
+ echo " certtool init <fqdn>"
+ echo "Install certificate file:"
+ echo " certtool importcert <cert.cer.txt>"
+ echo "Generate certificate signing request when old certificate nears expiry:"
+ echo " certtool exportcsr"
+ exit 1
+fi
+
+KS=$KSFILE
+if [ ! -f $KSFILE ]
+then
+ KS=$KSFILE.tmp
+ if [ ! -f $KSFILE.tmp ]
+ then
+ echo "Keystore not initialized."
+ exit 1
+ fi
+fi
+
+$JAVA_HOME/bin/keytool -list -keystore $KS -storepass "$STOREPASS" | grep ', PrivateKeyEntry, $'
+FQDN=`$JAVA_HOME/bin/keytool -list -keystore $KS -storepass "$STOREPASS" | grep ', PrivateKeyEntry, $' | sed 's/,.*//'`
+if [ "$FQDN" = "" ]
+then
+ echo "Unable to read keystore file $KS."
+ exit 1
+fi
+
+if [ "$MODE" = exportcsr ]
+then
+ if [ ! -f $KSFILE ]
+ then
+ echo "Cannot export new signing request before initial certificate imported"
+ exit 1
+ fi
+ rm -f $KSFILE.csr
+ $JAVA_HOME/bin/keytool -certreq -alias $FQDN -keystore $KS -file $KSFILE.csr -storepass "$STOREPASS" -keypass "$KEYPASS"
+ echo cat $DIR/$KSFILE.csr
+ cat $KSFILE.csr
+ echo Use the above certificate signing request.
+ exit 1
+fi
+
+FN="$1"
+shift
+cd -
+
+if [ ! -f "$FN" ]
+then
+ echo "Certificate file $FN not found."
+ exit 1
+fi
+XFN=$DIR/$$.cer
+cp "$FN" $XFN
+cat <<!EOF >> $XFN
+-----BEGIN CERTIFICATE-----
+MIIFODCCBCCgAwIBAgIQUT+5dDhwtzRAQY0wkwaZ/zANBgkqhkiG9w0BAQsFADCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
+ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
+U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
+ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5IC0gRzUwHhcNMTMxMDMxMDAwMDAwWhcNMjMxMDMwMjM1OTU5WjB+MQsw
+CQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNV
+BAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVjIENs
+YXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAstgFyhx0LbUXVjnFSlIJluhL2AzxaJ+aQihiw6UwU35VEYJb
+A3oNL+F5BMm0lncZgQGUWfm893qZJ4Itt4PdWid/sgN6nFMl6UgfRk/InSn4vnlW
+9vf92Tpo2otLgjNBEsPIPMzWlnqEIRoiBAMnF4scaGGTDw5RgDMdtLXO637QYqzu
+s3sBdO9pNevK1T2p7peYyo2qRA4lmUoVlqTObQJUHypqJuIGOmNIrLRM0XWTUP8T
+L9ba4cYY9Z/JJV3zADreJk20KQnNDz0jbxZKgRb78oMQw7jW2FUyPfG9D72MUpVK
+Fpd6UiFjdS8W+cRmvvW1Cdj/JwDNRHxvSz+w9wIDAQABo4IBYzCCAV8wEgYDVR0T
+AQH/BAgwBgEB/wIBADAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vczEuc3ltY2Iu
+Y29tL3BjYTMtZzUuY3JsMA4GA1UdDwEB/wQEAwIBBjAvBggrBgEFBQcBAQQjMCEw
+HwYIKwYBBQUHMAGGE2h0dHA6Ly9zMi5zeW1jYi5jb20wawYDVR0gBGQwYjBgBgpg
+hkgBhvhFAQc2MFIwJgYIKwYBBQUHAgEWGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20v
+Y3BzMCgGCCsGAQUFBwICMBwaGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20vcnBhMCkG
+A1UdEQQiMCCkHjAcMRowGAYDVQQDExFTeW1hbnRlY1BLSS0xLTUzNDAdBgNVHQ4E
+FgQUX2DPYZBV34RDFIpgKrL1evRDGO8wHwYDVR0jBBgwFoAUf9Nlp8Ld7LvwMAnz
+Qzn6Aq8zMTMwDQYJKoZIhvcNAQELBQADggEBAF6UVkndji1l9cE2UbYD49qecxny
+H1mrWH5sJgUs+oHXXCMXIiw3k/eG7IXmsKP9H+IyqEVv4dn7ua/ScKAyQmW/hP4W
+Ko8/xabWo5N9Q+l0IZE1KPRj6S7t9/Vcf0uatSDpCr3gRRAMFJSaXaXjS5HoJJtG
+QGX0InLNmfiIEfXzf+YzguaoxX7+0AjiJVgIcWjmzaLmFN5OUiQt/eV5E1PnXi8t
+TRttQBVSK/eHiXgSgW7ZTaoteNTCLD0IX4eRnh8OsN4wUmSGiaqdZpwOdgyA8nTY
+Kvi4Os7X1g8RvmurFPW9QaAiY4nxug9vKWNmLT+sjHLF+8fk1A/yO0+MKcc=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIE0DCCBDmgAwIBAgIQJQzo4DBhLp8rifcFTXz4/TANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT
+LkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
+HhcNMDYxMTA4MDAwMDAwWhcNMjExMTA3MjM1OTU5WjCByjELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZv
+ciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8
+RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbext0uz/o9+B1fs70Pb
+ZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhDY2pSS9KP6HBR
+TdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNH
+iDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMB
+AAGjggGbMIIBlzAPBgNVHRMBAf8EBTADAQH/MDEGA1UdHwQqMCgwJqAkoCKGIGh0
+dHA6Ly9jcmwudmVyaXNpZ24uY29tL3BjYTMuY3JsMA4GA1UdDwEB/wQEAwIBBjA9
+BgNVHSAENjA0MDIGBFUdIAAwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVy
+aXNpZ24uY29tL2NwczAdBgNVHQ4EFgQUf9Nlp8Ld7LvwMAnzQzn6Aq8zMTMwbQYI
+KwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQU
+j+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24uY29t
+L3ZzbG9nby5naWYwNAYIKwYBBQUHAQEEKDAmMCQGCCsGAQUFBzABhhhodHRwOi8v
+b2NzcC52ZXJpc2lnbi5jb20wPgYDVR0lBDcwNQYIKwYBBQUHAwEGCCsGAQUFBwMC
+BggrBgEFBQcDAwYJYIZIAYb4QgQBBgpghkgBhvhFAQgBMA0GCSqGSIb3DQEBBQUA
+A4GBABMC3fjohgDyWvj4IAxZiGIHzs73Tvm7WaGY5eE43U68ZhjTresY8g3JbT5K
+lCDDPLq9ZVTGr0SzEK0saz6r1we2uIFjxfleLuUqZ87NMwwq14lWAyMfs77oOghZ
+tOxFNfeKW/9mz1Cvxm1XjRl4t7mi0VfqH5pLr7rJjhJ+xr3/
+-----END CERTIFICATE-----
+!EOF
+cd $DIR
+$JAVA_HOME/bin/keytool -import -trustcacerts -alias $FQDN -keystore $KS -storepass "$STOREPASS" -keypass "$KEYPASS" -file $XFN
+rm -f $XFN
+
+if [ "$KS" = "$KSFILE.tmp" ]
+then
+ mv $KSFILE.tmp $KSFILE
+fi
+
+rm -f $KSFILE.csr
+echo Certificate imported.
+exit 0
diff --git a/packages/base/src/files/bin/java/log4j.properties b/packages/base/src/files/bin/java/log4j.properties
new file mode 100644
index 000000000..3d1f50790
--- /dev/null
+++ b/packages/base/src/files/bin/java/log4j.properties
@@ -0,0 +1,31 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# Use this properties for deployments.
+#
+#
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=ERROR, CONSOLE
+
+# for Developments and Debugging
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy_MM_dd_HH_mm_ss_SSS} [%t] %-5p %l- %m%n
diff --git a/packages/base/src/files/bin/monitor.sh b/packages/base/src/files/bin/monitor.sh
new file mode 100644
index 000000000..fb311bc04
--- /dev/null
+++ b/packages/base/src/files/bin/monitor.sh
@@ -0,0 +1,139 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#!/bin/bash
+
+function usage() {
+ echo -n "syntax: $(basename $0) "
+ echo "[--debug]"
+}
+
+function log() {
+ echo "$(date +"%Y-%m-%d_%H-%M-%S") $1" >> ${POLICY_HOME}/logs/monitor.log
+}
+
+function monitor() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ COMPONENT=$1
+ STATUS=$2
+
+ if [[ -z ${COMPONENT} ]]; then
+ log "WARNING: invalid invocation: no component provided"
+ return
+ fi
+
+ if [[ -z ${STATUS} ]]; then
+ log "WARNING: invalid invocation: no on/off/uninstalled switch provided for ${COMPONENT}"
+ return
+ fi
+
+ if [[ "${STATUS}" == "off" ]]; then
+ off ${COMPONENT}
+ else
+ if [[ "${STATUS}" == "on" ]]; then
+ on ${COMPONENT}
+ fi
+ fi
+}
+
+function on() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ COMPONENT=$1
+
+ ${POLICY_HOME}/etc/init.d/${COMPONENT} status
+ if [[ $? != 0 ]]; then
+ log "starting ${COMPONENT}"
+
+ ${POLICY_HOME}/etc/init.d/${COMPONENT} umstart
+ else
+ log "OK: ${COMPONENT} (UP)"
+ fi
+}
+
+function off() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ COMPONENT=$1
+
+ ${POLICY_HOME}/etc/init.d/${COMPONENT} status
+ if [[ $? != 0 ]]; then
+ log "OK: ${COMPONENT} (DOWN)"
+
+ else
+ log "stopping ${COMPONENT}"
+ ${POLICY_HOME}/etc/init.d/${COMPONENT} umstop
+ fi
+}
+
+function config() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ CONF_FILE=${POLICY_HOME}/etc/monitor/monitor.cfg
+ while read line || [ -n "${line}" ]; do
+ if [[ -n ${line} ]] && [[ ${line} != *#* ]]; then
+ component=$(echo "${line}" | awk -F = '{print $1;}')
+ status=$(echo "${line}" | awk -F = '{print $2;}')
+ if [[ -n ${component} ]] && [[ -n ${status} ]]; then
+ monitor ${component} ${status}
+ fi
+ fi
+ done < "${CONF_FILE}"
+ return 0
+}
+
+log "Enter monitor"
+
+DEBUG=n
+until [[ -z "$1" ]]; do
+ case $1 in
+ -d|--debug|debug) DEBUG=y
+ set -x
+ ;;
+ *) usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if pidof -o %PPID -x $(basename $0) > /dev/null 2>&1; then
+ log "WARNING: $(basename $0) from the previous iteration still running. Exiting."
+ exit 1
+fi
+
+. ${POLICY_HOME}/etc/profile.d/env.sh
+
+
+config
+
diff --git a/packages/base/src/files/bin/policy.sh b/packages/base/src/files/bin/policy.sh
new file mode 100644
index 000000000..0b061a46e
--- /dev/null
+++ b/packages/base/src/files/bin/policy.sh
@@ -0,0 +1,275 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#!/bin/bash
+
+function usage() {
+ echo -n "syntax: $(basename $0) "
+ echo -n "[--debug] "
+ echo "status|start|stop"
+}
+
+function check_r_file() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ FILE=$1
+ if [[ ! -f ${FILE} || ! -r ${FILE} ]]; then
+ return 1
+ fi
+
+ return 0
+}
+
+function check_x_file() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ FILE=$1
+ if [[ ! -f ${FILE} || ! -x ${FILE} ]]; then
+ return 1
+ fi
+
+ return 0
+}
+
+function component_status() {
+ COMPONENT=$1
+ output=$("${POLICY_HOME}"/etc/init.d/"${COMPONENT}" status)
+ if [[ $? == 0 ]]; then
+ echo " ${COMPONENT}: UP: ${output}"
+ else
+ echo " ${COMPONENT}: DOWN"
+ fi
+}
+
+function component_start() {
+ COMPONENT=$1
+ "${POLICY_HOME}"/etc/init.d/"${COMPONENT}" status > /dev/null 2>&1
+ if [[ $? == 0 ]]; then
+ echo " ${COMPONENT}: UP: already running .."
+ else
+ "${POLICY_HOME}"/etc/init.d/"${COMPONENT}" start > /dev/null 2>&1
+ echo " ${COMPONENT}: STARTING .."
+ fi
+}
+
+function component_stop() {
+ COMPONENT=$1
+ "${POLICY_HOME}"/etc/init.d/"${COMPONENT}" status > /dev/null 2>&1
+ if [[ $? != 0 ]]; then
+ echo " ${COMPONENT}: DOWN: already stopped .."
+ else
+ "${POLICY_HOME}"/etc/init.d/"${COMPONENT}" stop > /dev/null 2>&1
+ echo " ${COMPONENT}: STOPPING .."
+ fi
+}
+
+function policy_status() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pap"; then
+ component_status pap
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdp"; then
+ component_status pdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/configs"; then
+ component_status configs
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pypdp"; then
+ component_status pypdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/console"; then
+ component_status console
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/brmsgw"; then
+ component_status brmsgw
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/paplp"; then
+ component_status paplp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdplp"; then
+ component_status pdplp
+ fi
+
+ NUM_CRONS=$(crontab -l 2> /dev/null | wc -l)
+ echo " ${NUM_CRONS} cron jobs installed."
+
+}
+
+function policy_start() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pap"; then
+ component_start pap
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdp"; then
+ component_start pdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/configs"; then
+ component_start configs
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pypdp"; then
+ component_start pypdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/console"; then
+ component_start console
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/brmsgw"; then
+ component_start brmsgw
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/paplp"; then
+ component_start paplp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdplp"; then
+ component_start pdplp
+ fi
+
+ cat "${POLICY_HOME}"/etc/cron.d/*.cron | crontab
+}
+
+function policy_stop() {
+ if [[ $DEBUG == y ]]; then
+ echo "-- ${FUNCNAME[0]} --"
+ set -x
+ fi
+
+ pkill -f "/bin/bash ${POLICY_HOME}/bin/monitor.sh"
+ crontab -r > /dev/null 2>&1
+ sleep 2
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/paplp"; then
+ component_stop paplp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdplp"; then
+ component_stop pdplp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/brmsgw"; then
+ component_stop brmsgw
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/console"; then
+ component_stop console
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pypdp"; then
+ component_stop pypdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/configs"; then
+ component_stop configs
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pdp"; then
+ component_stop pdp
+ fi
+
+ if check_x_file "${POLICY_HOME}/etc/init.d/pap"; then
+ component_stop pap
+ fi
+
+}
+
+#########################################################################
+##
+## script execution body
+##
+#########################################################################
+
+DEBUG=n
+OPERATION=none
+
+until [[ -z "$1" ]]; do
+ case $1 in
+ -d|--debug|debug) DEBUG=y
+ set -x
+ ;;
+ -i|--status|status) OPERATION=status
+ ;;
+ -s|--start|start) OPERATION=start
+ ;;
+ -h|--stop|stop|--halt|halt) OPERATION=halt
+ ;;
+ *) usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+# operation validation
+case $OPERATION in
+ status) ;;
+ start) ;;
+ halt) ;;
+ *) echo "invalid operation \(${OPERATION}\): must be in {status|start|stop}";
+ usage
+ exit 1
+ ;;
+esac
+
+if [[ -z ${POLICY_HOME} ]]; then
+ echo "error: POLICY_HOME is unset."
+ exit 1
+fi
+
+# operation validation
+case $OPERATION in
+ status)
+ policy_status
+ ;;
+ start)
+ policy_start
+ ;;
+ halt)
+ policy_stop
+ ;;
+ *) echo "invalid operation \(${OPERATION}\): must be in {status|start|stop}";
+ usage
+ exit 1
+ ;;
+esac
diff --git a/packages/base/src/files/etc/cron.d/logrotate.cron b/packages/base/src/files/etc/cron.d/logrotate.cron
new file mode 100644
index 000000000..aa78eed24
--- /dev/null
+++ b/packages/base/src/files/etc/cron.d/logrotate.cron
@@ -0,0 +1 @@
+5 1 * * * /usr/sbin/logrotate -s ${{POLICY_HOME}}/var/logrotate.status ${{POLICY_HOME}}/etc/logrotate.d/monitor.conf
diff --git a/packages/base/src/files/etc/cron.d/monitor.cron b/packages/base/src/files/etc/cron.d/monitor.cron
new file mode 100644
index 000000000..4272bf487
--- /dev/null
+++ b/packages/base/src/files/etc/cron.d/monitor.cron
@@ -0,0 +1 @@
+* * * * * . ${{POLICY_HOME}}/etc/profile.d/env.sh; monitor.sh </dev/null > /dev/null 2>&1
diff --git a/packages/base/src/files/etc/logrotate.d/monitor.conf b/packages/base/src/files/etc/logrotate.d/monitor.conf
new file mode 100644
index 000000000..98971f753
--- /dev/null
+++ b/packages/base/src/files/etc/logrotate.d/monitor.conf
@@ -0,0 +1,7 @@
+${{POLICY_HOME}}/logs/monitor.log {
+ daily
+ rotate 10
+ compress
+ missingok
+ copytruncate
+}
diff --git a/packages/base/src/files/etc/monitor/monitor.cfg b/packages/base/src/files/etc/monitor/monitor.cfg
new file mode 100644
index 000000000..5314839e1
--- /dev/null
+++ b/packages/base/src/files/etc/monitor/monitor.cfg
@@ -0,0 +1,16 @@
+# Line Format: component=status where
+# component=pap|pdp|pypdp|configs|console|paplp|pdplp and
+# status=on|off|uninstalled where
+# on: component is to be monitored and should started
+# off: component is to be monitored and should stopped
+# uninstalled: component is NOT to be monitored
+# There should be no component duplicate lines
+
+pap=uninstalled
+pdp=uninstalled
+configs=uninstalled
+pypdp=uninstalled
+console=uninstalled
+paplp=uninstalled
+pdplp=uninstalled
+brmsgw=uninstalled
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh
new file mode 100644
index 000000000..4d9fcf9a7
--- /dev/null
+++ b/packages/base/src/files/etc/profile.d/env.sh
@@ -0,0 +1,27 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+export POLICY_HOME=${{POLICY_HOME}}
+export POLICY_USER=${{POLICY_USER}}
+export POLICY_GROUP=${{POLICY_GROUP}}
+export KEYSTORE_PASSWD=${{KEYSTORE_PASSWD}}
+
+export JAVA_HOME=${{JAVA_HOME}}
+export PATH=${PATH}:${{POLICY_HOME}}/bin
diff --git a/packages/base/src/files/etc/profile.d/su.cfg b/packages/base/src/files/etc/profile.d/su.cfg
new file mode 100644
index 000000000..8ba4edd19
--- /dev/null
+++ b/packages/base/src/files/etc/profile.d/su.cfg
@@ -0,0 +1 @@
+#name=value pairs for su purposes
diff --git a/packages/base/src/files/install/mysql/bin/cleanup_policy.sh b/packages/base/src/files/install/mysql/bin/cleanup_policy.sh
new file mode 100644
index 000000000..1eec53f96
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/cleanup_policy.sh
@@ -0,0 +1,92 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# cleanup_policy.sh: Run this script to delete policy record marked as 'deleted'
+#
+# Usage : cleanup_policy.sh db_user db_user_password retention_period
+# Example: cleanup_policy.sh policy_user password 90
+#
+#
+#
+
+. $HOME/.profile
+
+DB_USER=""
+DB_PASSWORD=""
+RETENTION_PERIOD=""
+DATE=`date +"%Y%m%d"`
+DATETIME=`date +"%Y%m%d%H%M%S"`
+LOG=""
+ERR=""
+
+function cleanup_deleted_policy
+{
+ # 1
+ echo "1- cleanup_deleted_policy [policyGroupEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} -e "delete from xacml.policyGroupEntity where policyId in ( select policyId from xacml.policyEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY)) and groupKey in ( select groupKey from xacml.groupEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY)); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+
+ # 2
+ echo "2- cleanup_deleted_policy [pdpEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} -e "delete from xacml.pdpEntity where groupKey in ( select groupKey from xacml.groupEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY)); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+
+ # 3
+ echo "3- cleanup_deleted_policy [groupEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} -e "delete from xacml.groupEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+
+ # 4
+ echo "4- cleanup_deleted_policy [policyEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} -e "delete from xacml.policyEntity where configurationDataId in ( select configurationDataId from xacml.configurationDataEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY)) and actionBodyId in ( select actionBodyId from xacml.actionBodyEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY)); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+
+ # 5
+ echo "5- cleanup_deleted_policy [configurationDataEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} -e "delete from xacml.configurationDataEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+
+ # 6
+ echo "6- cleanup_deleted_policy [actionBodyEntity] ... `date`" | tee -a $LOG
+ ${MYSQL} mysql --verbose -u${DB_USER} -p${DB_PASSWORD} -e "delete from xacml.actionBodyEntity where deleted = true and modified_date < (current_date - INTERVAL $RETENTION_PERIOD DAY); " 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+}
+
+# MAIN
+LOG=$POLICY_HOME/logs/cleanup_policy_$DATE.log
+ERR=$POLICY_HOME/logs/cleanup_policy_$DATE.err
+echo "cleanup_policy.sh started ... `date`" | tee -a $LOG
+if [ $# -eq 3 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ RETENTION_PERIOD="${3}"
+ echo "DB_USER: $DB_USER" | tee -a $LOG
+
+ typeset -r MYSQL="mysql -u${DB_USER} -p${DB_PASSWORD} --verbose ";
+
+ cleanup_deleted_policy
+
+ echo "cleanup_policy.sh completed ... `date`" | tee -a $LOG
+else
+ echo "Usage : cleanup_policy.sh db_user_id db_user_password retention_period"
+ echo "Example: cleanup_policy.sh policy_user password 90"
+fi
+
diff --git a/packages/base/src/files/install/mysql/bin/db_backup.sh b/packages/base/src/files/install/mysql/bin/db_backup.sh
new file mode 100644
index 000000000..896c4ff2d
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_backup.sh
@@ -0,0 +1,84 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# db_backup.sh: Run this script to back database to a file
+#
+# Usage : db_backup.sh db_user db_user_password database
+# Example: db_backup.sh policy_user password ecomp_sdk
+#
+# Note: mysqldump requires at least the SELECT privilege for dumped tables
+#
+#
+
+. $HOME/.profile
+
+DB_USER=""
+DB_PASSWORD=""
+DATABASE=""
+DATE=`date +"%Y%m%d"`
+DATETIME=`date +"%Y%m%d%H%M%S"`
+DAILY_BACKUP_DIR=""
+LOG=""
+ERR=""
+
+function create_backup_dir
+{
+ if [ ! -d $DAILY_BACKUP_DIR ]; then
+ echo "Create DAILY_BACKUP_DIR [$DAILY_BACKUP_DIR] ..."
+ mkdir -p $DAILY_BACKUP_DIR 2>&1
+ fi
+}
+
+function backup_database
+{
+ echo "backup_database [$DATABASE] started ...@`date`" | tee -a $LOG
+
+ BACKUP_FILE=$DAILY_BACKUP_DIR/backup_${DATABASE}_${DATETIME}.sql
+ echo $BACKUP_FILE
+ mysqldump --user=${DB_USER} --password=${DB_PASSWORD} --databases ${DATABASE} > $BACKUP_FILE
+ echo "" | tee -a $LOG
+ echo "database backup file --> $BACKUP_FILE" | tee -a $LOG
+ echo "" | tee -a $LOG
+ echo "backup_database [$DATABASE] completed ...@`date`" | tee -a $LOG
+}
+
+
+# MAIN
+echo "db_backup.sh started ... `date`" | tee -a $LOG
+if [ $# -eq 3 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ DATABASE="${3}"
+ echo "DB_USER: $DB_USER" | tee -a $LOG
+
+ DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE
+ LOG=$POLICY_HOME/logs/db_backup_$DATE.log
+ ERR=$POLICY_HOME/logs/db_backup_$DATE.err
+ create_backup_dir
+
+ backup_database
+ echo "db_backup.sh completed ... `date`" | tee -a $LOG
+else
+ echo "Usage : db_backup.sh db_user_id db_user_password database"
+ echo "Example: db_backup.sh policy_user password ecomp_sdk"
+fi
+
diff --git a/packages/base/src/files/install/mysql/bin/db_backup_data.sh b/packages/base/src/files/install/mysql/bin/db_backup_data.sh
new file mode 100644
index 000000000..39df9e272
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_backup_data.sh
@@ -0,0 +1,84 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# db_backup_data.sh: Run this script to backup database DATA only
+#
+# Usage : db_backup_data.sh db_user db_user_password database
+# Example: db_backup_data.sh policy_user password xacml
+#
+# Note: mysqldump requires at least the SELECT privilege for dumped tables
+#
+#
+
+. $HOME/.profile
+
+DB_USER=""
+DB_PASSWORD=""
+DATABASE=""
+DATE=`date +"%Y%m%d"`
+DATETIME=`date +"%Y%m%d%H%M%S"`
+DAILY_BACKUP_DIR=""
+LOG=""
+ERR=""
+
+function create_backup_dir
+{
+ if [ ! -d $DAILY_BACKUP_DIR ]; then
+ echo "Create DAILY_BACKUP_DIR [$DAILY_BACKUP_DIR] ..."
+ mkdir -p $DAILY_BACKUP_DIR 2>&1
+ fi
+}
+
+function backup_database
+{
+ echo "backup_database [$DATABASE] started ...@`date`" | tee -a $LOG
+
+ BACKUP_FILE=$DAILY_BACKUP_DIR/backup_${DATABASE}_data_${DATETIME}.sql
+ echo $BACKUP_FILE
+ mysqldump --no-create-info --no-create-db --user=${DB_USER} --password=${DB_PASSWORD} --databases ${DATABASE} > $BACKUP_FILE
+ echo "" | tee -a $LOG
+ echo "database backup file --> $BACKUP_FILE" | tee -a $LOG
+ echo "" | tee -a $LOG
+ echo "backup_database [$DATABASE] completed ...@`date`" | tee -a $LOG
+}
+
+
+# MAIN
+LOG=$POLICY_HOME/logs/db_backup_data_$DATE.log
+ERR=$POLICY_HOME/logs/db_backup_data_$DATE.err
+echo "db_backup_data.sh started ... `date`" | tee -a $LOG
+if [ $# -eq 3 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ DATABASE="${3}"
+ echo "DB_USER: $DB_USER" | tee -a $LOG
+
+ DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE
+ create_backup_dir
+
+ backup_database
+ echo "db_backup_data.sh completed ... `date`" | tee -a $LOG
+else
+ echo "Usage : db_backup_data.sh db_user_id db_user_password database"
+ echo "Example: db_backup_data.sh policy_user password xacml"
+fi
+
diff --git a/packages/base/src/files/install/mysql/bin/db_backup_remote.sh b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh
new file mode 100644
index 000000000..00ee95269
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+
+###
+#
+# db_backup_remote.sh: Perform database backup from remote
+#
+# Usage : db_backup_remote.sh db_user db_user_password database db_hostname
+# Example: db_backup_remote.sh policy_user password ecomp_sdk localhost.com
+#
+# Note: 1. mysqldump utility must be available in the env where this script intend to run
+# 2. db_user requires at least the SELECT privilege for dumped tables
+#
+#
+
+. $HOME/.profile
+
+DB_USER=""
+DB_PASSWORD=""
+DATABASE=""
+DB_HOSTNAME=""
+DATE=`date +"%Y%m%d"`
+DATETIME=`date +"%Y%m%d%H%M%S"`
+DAILY_BACKUP_DIR=""
+LOG=""
+ERR=""
+
+function create_backup_dir
+{
+ if [ ! -d $DAILY_BACKUP_DIR ]; then
+ echo "Create DAILY_BACKUP_DIR [$DAILY_BACKUP_DIR] ..."
+ mkdir -p $DAILY_BACKUP_DIR 2>&1
+ fi
+}
+
+function backup_database
+{
+ echo "backup database [$DATABASE]@[${DB_HOSTNAME}] started ...@`date`" | tee -a $LOG
+
+ BACKUP_FILE=$DAILY_BACKUP_DIR/backup_${DATABASE}_${DB_HOSTNAME}_${DATETIME}.sql
+ #echo $BACKUP_FILE
+ mysqldump --user=${DB_USER} --password=${DB_PASSWORD} --databases ${DATABASE} -h ${DB_HOSTNAME} > $BACKUP_FILE
+ echo "" | tee -a $LOG
+ echo "database backup file --> $BACKUP_FILE" | tee -a $LOG
+ echo "" | tee -a $LOG
+ echo "backup database [$DATABASE]@[${DB_HOSTNAME}] completed ...@`date`" | tee -a $LOG
+}
+
+
+# MAIN
+if [ $# -eq 4 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ DATABASE="${3}"
+ DB_HOSTNAME="${4}"
+ echo "db_backup_remote.sh for [$DATABASE]@[${DB_HOSTNAME}] started ... `date`" | tee -a $LOG
+ echo "DB_USER : $DB_USER" | tee -a $LOG
+ echo "DATABASE : $DATABASE" | tee -a $LOG
+ echo "DB_HOSTNAME: $DB_HOSTNAME" | tee -a $LOG
+
+ DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE
+ LOG=$POLICY_HOME/logs/db_backup_remote_$DATE.log
+ ERR=$POLICY_HOME/logs/db_backup_remote_$DATE.err
+ create_backup_dir
+
+ backup_database
+ echo "db_backup_remote.sh for [$DATABASE]@[${DB_HOSTNAME}] completed ... `date`" | tee -a $LOG
+else
+ echo "Usage : db_backup_remote.sh db_user_id db_user_password database db_hostname"
+ echo "Example: db_backup_remote.sh policy_user password ecomp_sdk localhost.com"
+fi
diff --git a/packages/base/src/files/install/mysql/bin/db_restore.sh b/packages/base/src/files/install/mysql/bin/db_restore.sh
new file mode 100644
index 000000000..b0e32dac3
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_restore.sh
@@ -0,0 +1,97 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# db_restore.sh: Restore database table(s) from database backup file
+#
+# Usage : db_restore.sh db_user db_password backup_file database table_name
+# Example: db_restore.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_ecomp_sdk_20150910102030.sql ecomp_sdk attribute
+# db_restore.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_ecomp_sdk_20150910102030.sql ecomp_sdk all
+#
+# Assumption: Database backup_file is created from mysqldump utility
+#
+# Note: use lower case table name
+#
+#
+
+DB_USER=""
+DB_PASSWORD=""
+BACKUP_FILE=""
+DATABASE=""
+TABLE=""
+TEMP_FILE=/tmp/db_restore_$$.sql
+
+function restore_all
+{
+ echo "restore_all started ...@`date`"
+ echo "Before restore table ..."
+ echo "--"
+ mysql -u${DB_USER} -p${DB_PASSWORD} < $BACKUP_FILE
+ echo "--"
+
+ echo "restore_all completed ...@`date`"
+}
+
+function restore_table
+{
+ database="${1}"
+ table="${2}"
+ echo "restore_table [$database] [$table] started ...@`date`"
+ # extract sql statement from backup file
+ echo "use $database;" > $TEMP_FILE
+ echo "set foreign_key_checks=0; " >> $TEMP_FILE
+ sed -n -e '/DROP TABLE IF EXISTS `'$table'`;/,/UNLOCK TABLES;/p' $BACKUP_FILE >> $TEMP_FILE
+ echo "set foreign_key_checks=1; " >> $TEMP_FILE
+ echo "--"
+ cat $TEMP_FILE
+ echo "--"
+ echo "Before restore table ..."
+ mysql -u${DB_USER} -p${DB_PASSWORD} < $TEMP_FILE
+ echo "--"
+ echo "restore_table [$database] [$table] completed ...@`date`"
+}
+
+
+# MAIN
+echo "db_restore.sh started ... `date`"
+if [ $# -eq 5 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ BACKUP_FILE="${3}"
+ typeset -l DATABASE="${4}"
+ typeset -l TABLE="${5}"
+ echo "DB_USER: $DB_USER"
+ if [ -f $BACKUP_FILE ]; then
+ if [ "${TABLE}" != "all" ]; then
+ restore_table ${DATABASE} ${TABLE}
+ else
+ restore_all
+ fi
+ else
+ echo "BACKUP FILE NOT FOUND: $BACKUP_FILE"
+ fi
+else
+ echo "Usage : db_restore.sh db_user_id db_password backup_file database table_name"
+ echo "Example: db_restore.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_ecomp_sdk_20150901102030.sql ecomp_sdk attribute"
+fi
+
+rm -f $TEMP_FILE
+echo "db_restore.sh completed ... `date`"
diff --git a/packages/base/src/files/install/mysql/bin/db_restore_data.sh b/packages/base/src/files/install/mysql/bin/db_restore_data.sh
new file mode 100644
index 000000000..926755996
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_restore_data.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# db_restore_data.sh: Restore only data for database table(s) from database backup file
+#
+# Usage : db_restore_data.sh db_user db_password backup_file database table_name
+# Example: db_restore_data.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_xacml_data_20150910102030.sql xacml attribute
+# db_restore_data.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_xacml_data_20150910102030.sql xacml all
+#
+# Assumption:
+# 1. Database backup_file is created from db_backup_data.sh (contains only data)
+# 2. Data in table(s) will be wiped out and loaded from backup file
+#
+# Note: use lower case table name
+#
+#
+
+DB_USER=""
+DB_PASSWORD=""
+BACKUP_FILE=""
+DATABASE=""
+TABLE=""
+TEMP_FILE=/tmp/db_restore_data_$$.sql
+
+function restore_all
+{
+ echo "restore_all started ...@`date`"
+ echo "set foreign_key_checks=0;" > $TEMP_FILE
+ sed -e 's/LOCK TABLES \(.*\) WRITE;/delete from \1; LOCK TABLES \1 WRITE;/g' $BACKUP_FILE >> $TEMP_FILE
+ echo "set foreign_key_checks=1;" >> $TEMP_FILE
+ #cat $TEMP_FILE
+ echo "Before restore table ..." | tee -a $LOG
+ echo "--" | tee -a $LOG
+ mysql -u${DB_USER} -p${DB_PASSWORD} --verbose < $BACKUP_FILE 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+ echo "restore_all completed ...@`date`"
+}
+
+function restore_table
+{
+ database="${1}"
+ table="${2}"
+ echo "restore_table [$database] [$table] started ...@`date`"
+ # extract sql statement from backup file
+ echo "use $database;" > $TEMP_FILE
+ echo "set sql_safe_updates=0;" >> $TEMP_FILE
+ echo "delete from $table;" >> $TEMP_FILE
+ sed -n -e '/LOCK TABLES `'$table'` WRITE;/,/UNLOCK TABLES;/p' $BACKUP_FILE >> $TEMP_FILE
+ echo "set sql_safe_updates=1;" >> $TEMP_FILE
+ #echo "--"
+ #cat $TEMP_FILE
+ echo "Before restore table ..." 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+ mysql -u${DB_USER} -p${DB_PASSWORD} --verbose < $TEMP_FILE 2>&1 | tee -a $LOG
+ echo "--" | tee -a $LOG
+ echo "restore_table [$database] [$table] completed ...@`date`"
+}
+
+
+# MAIN
+echo "db_restore_data.sh started ... `date`"
+if [ $# -eq 5 ]; then
+ DB_USER="${1}"
+ DB_PASSWORD="${2}"
+ BACKUP_FILE="${3}"
+ typeset -l DATABASE="${4}"
+ typeset -l TABLE="${5}"
+ echo "DB_USER: $DB_USER"
+ if [ -f $BACKUP_FILE ]; then
+ if [ "${TABLE}" != "all" ]; then
+ restore_table ${DATABASE} ${TABLE}
+ else
+ restore_all
+ fi
+ else
+ echo "BACKUP FILE NOT FOUND: $BACKUP_FILE"
+ fi
+else
+ echo "Usage : db_restore_data.sh db_user_id db_password backup_file database table_name"
+ echo "Example: db_restore_data.sh policy_user password /opt/app/policy/data/mysql/20150901/backup_xacml_data_20150901102030.sql xacml attribute"
+fi
+
+rm -f $TEMP_FILE
+echo "db_restore_data.sh completed ... `date`"
diff --git a/packages/base/src/files/install/mysql/bin/db_upgrade.sh b/packages/base/src/files/install/mysql/bin/db_upgrade.sh
new file mode 100644
index 000000000..41b79e1ef
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_upgrade.sh
@@ -0,0 +1,150 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+#
+# db_upgrade.sh: Run this script to upgrade database to a given release level, it is recommanded switch to policy user to run this script
+#
+# Usage : db_upgrade.sh target_db_release_level db_user_id db_user_password
+# Example: db_upgrade.sh 151000 policy_user password
+#
+# Assumption: 1. DB upgrade sql script in $POLICY_HOME/data/mysql folder with read permission
+# 2. DB user has privilege to create/drop/alter database table
+#
+# Note: The default location for db release script is $POLICY_HOME/data/mysql
+# The release level is represented as Two-digit-Year+Two-digit-Month+two-digit-Sub-release (151000, 151001)
+#
+#
+
+TARGET_RELEASE=""
+CURRENT_RELEASE=""
+DB_UPGRADE_USER=""
+DB_UPGRADE_PASSWORD=""
+DB_UPGRADE_DIR=$POLICY_HOME/data/mysql
+DATE=`date +"%Y%m%d%H%M%S"`
+LOG=""
+ERR=""
+
+function get_current_release_level
+{
+ echo "Get current release level started ...@`date`" | tee -a $LOG
+ # display output vertical
+ query="select version from support.db_version where the_key = 'VERSION' \G"
+ CURRENT_RELEASE=`${MYSQL} --skip-column-names --execute "${query}" 2>$ERR | grep -v "*"`
+ echo "CURRENT_RELEASE: [$CURRENT_RELEASE]" | tee -a $LOG
+ echo "Get current release level completed ...@`date`" | tee -a $LOG
+}
+
+function evaluate_upgrade_downgrade
+{
+ echo "CURRENT_RELEASE --> [$CURRENT_RELEASE]" | tee -a $LOG
+ echo "TARGET_RELEASE --> [$TARGET_RELEASE] " | tee -a $LOG
+ if [[ "${CURRENT_RELEASE}" < "${TARGET_RELEASE}" ]]; then
+ # perform db upgrade
+ UPGRADE_LIST=/tmp/db_upgrade_list.$$
+ find ${DB_UPGRADE_DIR} -name "*_upgrade_script.sql" 2>/dev/null | grep -v "droolspdp" | sort > $UPGRADE_LIST
+ while read -r file
+ do
+ RELEASE=`basename $file | cut -d'_' -f1`
+ #echo "[$RELEASE] [$TARGET_RELEASE]" | tee -a $LOG
+ if [ "${RELEASE}" -gt "${CURRENT_RELEASE}" ] && [ "${RELEASE}" -le "${TARGET_RELEASE}" ]; then
+ run_script "UPGRADE" "${file}" 2>&1 | tee -a $LOG
+ fi
+ done < $UPGRADE_LIST
+ rm -f $UPGRADE_LIST
+ set_current_release_level $TARGET_RELEASE
+ elif [[ "${CURRENT_RELEASE}" > "${TARGET_RELEASE}" ]]; then
+ # perform db downgrade
+ DOWNGRADE_LIST=/tmp/db_downgrade_list.$$
+ find ${DB_UPGRADE_DIR} -name "*_downgrade_script.sql" 2>/dev/null | grep -v "droolspdp" | sort -r > $DOWNGRADE_LIST
+ while read -r file
+ do
+ RELEASE=`basename $file | cut -d'_' -f1`
+ #echo "[$RELEASE] [$TARGET_RELEASE]" | tee -a $LOG
+ if [ "${RELEASE}" -le "${CURRENT_RELEASE}" ] && [ "${RELEASE}" -gt "${TARGET_RELEASE}" ]; then
+ run_script "DOWNGRADE" "${file}"
+ fi
+ done < $DOWNGRADE_LIST
+ rm -f $DOWNGRADE_LIST
+ set_current_release_level $TARGET_RELEASE
+ else
+ echo "CURRENT DB RELEASE LEVEL THE SAME AS TARGET RELEASE LEVEL, NO ACTION TAKEN ..." | tee -a $LOG
+ fi
+}
+
+function run_script
+{
+ action="${1}"
+ script="${2}"
+ echo "Perform DB $action use $script ..." | tee -a $LOG
+ echo "--" | tee -a $LOG
+ ${MYSQL} --verbose < "${script}" 2>$ERR | tee -a $LOG
+ echo "--" | tee -a $LOG
+}
+
+function set_current_release_level
+{
+ RELEASE="${1}"
+ echo "Set current release level to [$RELEASE] started ...@`date`" | tee -a $LOG
+ update_statement="insert into support.db_version (the_key, version) values ('VERSION', '${RELEASE}') on duplicate key update version='${RELEASE}';"
+ ${MYSQL} --execute "${update_statement}"
+
+ echo "" | tee -a $LOG
+ echo "CURRENT_RELEASE set to: [$RELEASE]" | tee -a $LOG
+ echo "" | tee -a $LOG
+ echo "Set current release level completed ...@`date`" | tee -a $LOG
+}
+
+function check_directory
+{
+ if [ ! -d $DB_UPGRADE_DIR ]; then
+ echo "ERROR, DIRECTORY NOT EXIST: $DB_UPGRADE_DIR, PROCESS EXIT ..."
+ exit;
+ else
+ if [ ! -d $DB_UPGRADE_DIR/logs ]; then
+ mkdir $DB_UPGRADE_DIR/logs
+ fi
+ fi
+}
+
+# MAIN
+#check_directory
+LOG=$POLICY_HOME/logs/db_upgrade_$DATE.log
+ERR=$POLICY_HOME/logs/db_upgrade_$DATE.err
+echo "db_upgrade.sh started ..." | tee -a $LOG
+if [ $# -eq 3 ]; then
+ TARGET_RELEASE="${1}"
+ DB_UPGRADE_USER="${2}"
+ DB_UPGRADE_PASSWORD="${3}"
+ echo "TARGET_RELEASE : $TARGET_RELEASE" | tee -a $LOG
+ echo "DB_UPGRADE_USER: $DB_UPGRADE_USER" | tee -a $LOG
+ echo "DB_UPGRADE_DIR : $DB_UPGRADE_DIR" | tee -a $LOG
+ #
+ if [ ${#TARGET_RELEASE} -ne 6 ]; then
+ echo "ERROR, TARGET_RELEASE MUST BE 6 DIGITS: $TARGET_RELEASE" | tee -a $LOG | tee -a $ERR
+ else
+ typeset -r MYSQL="mysql -u${DB_UPGRADE_USER} -p${DB_UPGRADE_PASSWORD} ";
+ get_current_release_level
+ evaluate_upgrade_downgrade
+ fi
+else
+ echo "Usage : db_upgrade.sh target_release_level db_user_id db_user_password" | tee -a $LOG
+ echo "Example: db_upgrade.sh 151000 policy_user password" | tee -a $LOG
+fi
+
+echo "db_upgrade.sh completed ..." | tee -a $LOG
diff --git a/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh b/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh
new file mode 100644
index 000000000..a5b6e77da
--- /dev/null
+++ b/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh
@@ -0,0 +1,173 @@
+#!/bin/bash
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+
+###
+#
+# db_upgrade_remote.sh: This script is to perform database schema upgrade on remote db,
+# no shecma downgrade will be performed in case db_version is higher then target_version
+#
+# Logic: 1. Get target schema version from db scripts in $POLICY_HOME/data/mysql
+# 2. Get current db schema version from support.db_version table (of target system)
+# 3. Apply db upgrade script in order if target_version is HIGHER than db_version
+# 4. Print out warning message if target_version is LOWER than db_version
+# 4. Print out message if target_version is EQUAL to db_version
+#
+#
+# Usage : db_upgrade_remote.sh db_user_id db_user_password hostname
+# Example: db_upgrade_remote.sh policy_user password localhost.com
+#
+# Assumption: 1. DB schema upgrade script in $POLICY_HOME/data/mysql folder with read permission
+# 2. DB user has privilege to create/drop/alter database table
+#
+# Note: The default location for db schema upgrade script is $POLICY_HOME/data/mysql
+# The release level is represented as Two-digit-Year+Two-digit-Month+two-digit-Sub-release (151000, 151001)
+#
+#
+
+TARGET_SCHEMA_VERSION=""
+CURRENT_SCHEMA_VERSION=""
+DB_UPGRADE_USER=""
+DB_UPGRADE_PASSWORD=""
+DB_HOSTNAME=""
+DB_UPGRADE_DIR=$POLICY_HOME/data/mysql
+DATE=`date +"%Y%m%d%H%M%S"`
+LOG=""
+ERR=""
+
+function get_current_schema_version
+{
+ echo "Get current schema version from [${DB_HOSTNAME}] started ...@`date`" | tee -a $LOG
+ # display output vertical
+ query="select version from support.db_version where the_key = 'VERSION' \G"
+ CURRENT_SCHEMA_VERSION=`${MYSQL} --skip-column-names --execute "${query}" 2>$ERR | grep -v "*"`
+ error_msg=`cat $ERR | grep "doesn't exist"`
+ if [ "${error_msg}" != "" ]; then
+ echo "Create support.db_version table ..." | tee -a $LOG
+ sql="create database if not exists support;"
+ ${MYSQL} --execute "${sql}"
+ sql="create table support.db_version(the_key varchar(20) not null, version varchar(20), primary key(the_key));"
+ ${MYSQL} --execute "${sql}"
+ CURRENT_SCHEMA_VERSION="00"
+ fi
+ echo "CURRENT_SCHEMA_VERSION: [$CURRENT_SCHEMA_VERSION]" | tee -a $LOG
+ echo "Get current schema version from [${DB_HOSTNAME}] completed ...@`date`" | tee -a $LOG
+}
+
+function get_target_schema_version
+{
+ UPGRADE_LIST=/tmp/db_upgrade_list.$$
+ find ${DB_UPGRADE_DIR} -name "*_upgrade_script.sql" 2>/dev/null | grep -v "droolspdp" | sort -r | head -1 > $UPGRADE_LIST
+ while read -r file
+ do
+ TARGET_SCHEMA_VERSION=`basename $file | cut -d'_' -f1`
+ echo "TARGET_SCHEMA_VERSION: [$TARGET_SCHEMA_VERSION]" | tee -a $LOG
+ break
+ done < $UPGRADE_LIST
+ rm -f $UPGRADE_LIST
+}
+
+function evaluate_upgrade_downgrade
+{
+ echo "CURRENT_SCHEMA_VERSION --> [$CURRENT_SCHEMA_VERSION]" | tee -a $LOG
+ echo "TARGET_SCHEMA_VERSION --> [$TARGET_SCHEMA_VERSION] " | tee -a $LOG
+ if [[ "${CURRENT_SCHEMA_VERSION}" < "${TARGET_SCHEMA_VERSION}" ]]; then
+ # perform db upgrade
+ UPGRADE_LIST=/tmp/db_upgrade_list.$$
+ find ${DB_UPGRADE_DIR} -name "*_upgrade_script.sql" 2>/dev/null | grep -v "droolspdp" | sort > $UPGRADE_LIST
+ while read -r file
+ do
+ DB_VERSION=`basename $file | cut -d'_' -f1`
+ #echo "[$DB_VERSION] [$TARGET_SCHEMA_VERSION]" | tee -a $LOG
+ if [ "${DB_VERSION}" -gt "${CURRENT_SCHEMA_VERSION}" ] && [ "${DB_VERSION}" -le "${TARGET_SCHEMA_VERSION}" ]; then
+ run_script "UPGRADE" "${file}" 2>&1 | tee -a $LOG
+ fi
+ done < $UPGRADE_LIST
+ rm -f $UPGRADE_LIST
+ set_current_release_level $TARGET_SCHEMA_VERSION
+ elif [[ "${CURRENT_SCHEMA_VERSION}" > "${TARGET_SCHEMA_VERSION}" ]]; then
+ # db downgrade
+ echo "WARNING: Target db schema version is LOWER than current db scema version, please run downgrade script manually." | tee -a $LOG | tee -a $ERR
+ else
+ echo "CURRENT SCHEMA VERSION THE SAME AS TARGET SCHEMA VERSION, NO ACTION TAKEN ..." | tee -a $LOG
+ fi
+}
+
+function run_script
+{
+ action="${1}"
+ script="${2}"
+ echo "Perform DB $action on [${DB_HOSTNAME}] use $script ..." | tee -a $LOG
+ echo "--" | tee -a $LOG
+ ${MYSQL} --verbose < "${script}" 2>$ERR | tee -a $LOG
+ echo "--" | tee -a $LOG
+}
+
+function set_current_release_level
+{
+ DB_VERSION="${1}"
+ echo "Set current release level on [${DB_HOSTNAME}] to [$DB_VERSION] started ...@`date`" | tee -a $LOG
+ update_statement="insert into support.db_version (the_key, version) values ('VERSION', '${DB_VERSION}') on duplicate key update version='${DB_VERSION}';"
+ ${MYSQL} --execute "${update_statement}"
+
+ echo "" | tee -a $LOG
+ echo "CURRENT_SCHEMA_VERSION set to: [$DB_VERSION]" | tee -a $LOG
+ echo "" | tee -a $LOG
+ echo "Set current release level on [${DB_HOSTNAME}] to [$DB_VERSION] completed ...@`date`" | tee -a $LOG
+}
+
+function check_directory
+{
+ if [ ! -d $DB_UPGRADE_DIR ]; then
+ echo "ERROR, DIRECTORY NOT EXIST: $DB_UPGRADE_DIR, PROCESS EXIT ..."
+ exit;
+ else
+ if [ ! -d $DB_UPGRADE_DIR/logs ]; then
+ mkdir $DB_UPGRADE_DIR/logs
+ fi
+ fi
+}
+
+# MAIN
+#check_directory
+LOG=$POLICY_HOME/logs/db_upgrade_remote_$DATE.log
+ERR=$POLICY_HOME/logs/db_upgrade_remote_$DATE.err
+echo "db_upgrade_remote.sh started ..." | tee -a $LOG
+if [ $# -eq 3 ]; then
+ DB_UPGRADE_USER="${1}"
+ DB_UPGRADE_PASSWORD="${2}"
+ DB_HOSTNAME="${3}"
+ echo "DB_UPGRADE_USER: $DB_UPGRADE_USER" | tee -a $LOG
+ echo "DB_UPGRADE_DIR : $DB_UPGRADE_DIR" | tee -a $LOG
+ echo "DB_HOSTNAME : $DB_HOSTNAME" | tee -a $LOG
+ #
+ typeset -r MYSQL="mysql -u${DB_UPGRADE_USER} -p${DB_UPGRADE_PASSWORD} -h ${DB_HOSTNAME}";
+ get_target_schema_version
+ if [ ${#TARGET_SCHEMA_VERSION} -ne 6 ]; then
+ echo "ERROR, TARGET_SCHEMA_VERSION MUST BE 6 DIGITS: $TARGET_SCHEMA_VERSION" | tee -a $LOG | tee -a $ERR
+ else
+ get_current_schema_version
+ evaluate_upgrade_downgrade
+ fi
+else
+ echo "Usage : db_upgrade_remote.sh db_user_id db_user_password db_hostname" | tee -a $LOG
+ echo "Example: db_upgrade_remote.sh policy_user password localhost.com" | tee -a $LOG
+fi
+
+echo "db_upgrade_remote.sh completed ..." | tee -a $LOG
diff --git a/packages/base/src/files/install/mysql/data/161000_upgrade_script.sql b/packages/base/src/files/install/mysql/data/161000_upgrade_script.sql
new file mode 100644
index 000000000..94e371649
--- /dev/null
+++ b/packages/base/src/files/install/mysql/data/161000_upgrade_script.sql
@@ -0,0 +1,6443 @@
+/*-
+* ============LICENSE_START=======================================================
+* ECOMP Policy Engine
+* ================================================================================
+* Copyright (C) 2017 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.
+* ============LICENSE_END=========================================================
+*/
+-- ---------------------------------------------------------------------------------------------------------------
+-- This is for the 1610 Version of SDK database called ecomp_sdk for Open Source
+
+-- Note to : Database Admin, set the MySQL system variable called lower_case_table_names
+
+-- It can be set 3 different ways:
+-- command-line options (Cmd-line),
+-- options valid in configuration files (Option file), or
+-- server system variables (System Var).
+
+-- It needs to be set to 1, then table names are stored in lowercase on disk and comparisons are not case sensitive.
+
+-- MySql/MariaDB Version compatibility information
+-- $ mysql --version
+-- mysql Ver 15.1 Distrib 5.5.35-MariaDB, for Linux (x86_64) using readline 5.1
+
+-- bash-4.2$ mysql --version – cluster version
+-- mysql Ver 15.1 Distrib 10.1.17-MariaDB, for Linux (x86_64) using readline 5.1
+
+-- All versions newer or older than these DO NOT necessarily mean they are compatible.
+-- ------------------------------------------------------------------------------------------------------------------
+
+CREATE DATABASE IF NOT EXISTS `ecomp_sdk`;
+
+USE `ecomp_sdk`;
+set foreign_key_checks=0;
+
+--
+-- Table structure for table `actionbodyentity`
+--
+
+drop table if exists `actionbodyentity`;
+create table `actionbodyentity` (
+`actionbodyid` bigint(20) not null auto_increment,
+`actionbody` text,
+`actionbodyname` varchar(255) not null,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`deleted` tinyint(1) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`version` int(11) default null,
+primary key (`actionbodyid`)
+);
+
+--
+-- Table structure for table `actionlist`
+--
+
+drop table if exists `actionlist`;
+create table `actionlist` (
+`id` int(11) not null auto_increment,
+`actionname` TEXT not null,
+`description` TEXT default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `actionpolicydict`
+--
+
+drop table if exists `actionpolicydict`;
+create table `actionpolicydict` (
+`id` int(11) not null auto_increment,
+`type` varchar(45) not null,
+`url` TEXT not null,
+`method` varchar(45) not null,
+`headers` varchar(1024) not null,
+`body` TEXT not null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+`attribute_name` varchar(255) not null,
+`description` TEXT default null,
+primary key (`id`),
+unique key `actionpolicydict_unique` (`attribute_name`)
+);
+
+--
+-- Table structure for table `addressgroup`
+--
+
+drop table if exists `addressgroup`;
+create table `addressgroup` (
+`id` int(11) not null auto_increment,
+`name` TEXT default null,
+`description` TEXT default null,
+`prefixlist` TEXT default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `attribute`
+--
+
+drop table if exists `attribute`;
+create table `attribute` (
+`id` int(11) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`description` varchar(2048) default null,
+`is_designator` char(1) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`selector_path` varchar(2048) default null,
+`xacml_id` varchar(500) not null,
+`category` int(11) default null,
+`constraint_type` int(11) default null,
+`datatype` int(11) default null,
+`priority` varchar(45) default null,
+`attribute_value` varchar(255) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `attributeassignment`
+--
+
+drop table if exists `attributeassignment`;
+create table `attributeassignment` (
+`id` int(11) not null,
+`attribute_id` int(11) default null,
+`expression` varchar(5000) not null,
+`obadvice_id` int(11) default null,
+primary key (`id`),
+key `fk_attributeassignment_obadvice_id` (`obadvice_id`),
+constraint `fk_attributeassignment_obadvice_id` foreign key (`obadvice_id`) references `obadvice` (`id`)
+);
+
+--
+-- Table structure for table `backupmonitorentity`
+--
+
+drop table if exists `backupmonitorentity`;
+create table `backupmonitorentity` (
+`id` int(11) not null auto_increment,
+`node_name` varchar(45) not null,
+`resource_name` varchar(75) not null,
+`flag` varchar(45) not null,
+`notification_record` longtext,
+`last_seen` timestamp not null default current_timestamp on update current_timestamp,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `brmsparamtemplate`
+--
+
+drop table if exists `brmsparamtemplate`;
+create table `brmsparamtemplate` (
+`id` int(11) not null auto_increment,
+`param_template_name` varchar(255) not null,
+`description` varchar(2048) default null,
+`rule` longtext not null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `category`
+--
+
+drop table if exists `category`;
+create table `category` (
+`id` int(11) not null,
+`grouping` varchar(64) not null,
+`is_standard` char(1) not null,
+`short_name` varchar(64) not null,
+`xacml_id` varchar(255) not null,
+primary key (`id`),
+unique key `xacml_id` (`xacml_id`)
+);
+
+--
+-- Table structure for table `closedloopd2services`
+--
+
+drop table if exists `closedloopd2services`;
+create table `closedloopd2services` (
+`id` int(11) not null auto_increment,
+`service_name` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `closedloopsite`
+--
+
+drop table if exists `closedloopsite`;
+create table `closedloopsite` (
+`id` int(11) not null auto_increment,
+`site_name` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `configurationdataentity`
+--
+
+drop table if exists `configurationdataentity`;
+create table `configurationdataentity` (
+`configurationdataid` bigint(20) not null auto_increment,
+`configbody` text,
+`configtype` varchar(255) not null,
+`configurationname` varchar(255) not null,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`deleted` tinyint(1) not null,
+`description` varchar(2048) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`version` int(11) default null,
+primary key (`configurationdataid`)
+);
+
+--
+-- Table structure for table `constrainttype`
+--
+
+drop table if exists `constrainttype`;
+create table `constrainttype` (
+`id` int(11) not null,
+`constraint_type` varchar(64) not null,
+`description` varchar(255) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `constraintvalues`
+--
+
+drop table if exists `constraintvalues`;
+create table `constraintvalues` (
+`id` int(11) not null,
+`property` varchar(1000) default null,
+`value` varchar(1000) default null,
+`attribute_id` int(11) default null,
+primary key (`id`),
+key `fk_constraintvalues_attribute_id` (`attribute_id`),
+constraint `fk_constraintvalues_attribute_id` foreign key (`attribute_id`) references `attribute` (`id`)
+);
+
+--
+-- Table structure for table `cr_favorite_reports`
+--
+
+drop table if exists `cr_favorite_reports`;
+create table `cr_favorite_reports` (
+`user_id` int(11) not null,
+`rep_id` int(11) not null,
+primary key (`user_id`,`rep_id`)
+);
+
+--
+-- Table structure for table `cr_filehist_log`
+--
+
+drop table if exists `cr_filehist_log`;
+create table `cr_filehist_log` (
+`schedule_id` decimal(11,0) not null,
+`url` varchar(4000) default null,
+`notes` varchar(3500) default null,
+`run_time` timestamp not null default current_timestamp on update current_timestamp
+);
+
+--
+-- Table structure for table `cr_folder`
+--
+
+drop table if exists `cr_folder`;
+create table `cr_folder` (
+`folder_id` int(11) not null,
+`folder_name` varchar(50) not null,
+`descr` varchar(500) default null,
+`create_id` int(11) not null,
+`create_date` timestamp not null default current_timestamp on update current_timestamp,
+`parent_folder_id` int(11) default null,
+`public_yn` varchar(1) not null default 'n',
+primary key (`folder_id`),
+key `fk_parent_key_cr_folder` (`parent_folder_id`),
+constraint `fk_parent_key_cr_folder` foreign key (`parent_folder_id`) references `cr_folder` (`folder_id`)
+);
+
+--
+-- Table structure for table `cr_folder_access`
+--
+
+drop table if exists `cr_folder_access`;
+create table `cr_folder_access` (
+`folder_access_id` decimal(11,0) not null,
+`folder_id` decimal(11,0) not null,
+`order_no` decimal(11,0) not null,
+`role_id` decimal(11,0) default null,
+`user_id` decimal(11,0) default null,
+`read_only_yn` varchar(1) not null default 'n',
+primary key (`folder_access_id`)
+);
+
+--
+-- Table structure for table `cr_hist_user_map`
+--
+
+drop table if exists `cr_hist_user_map`;
+create table `cr_hist_user_map` (
+`hist_id` int(11) not null,
+`user_id` int(11) not null,
+primary key (`hist_id`,`user_id`),
+key `sys_c0014617` (`user_id`),
+constraint `sys_c0014616` foreign key (`hist_id`) references `cr_report_file_history` (`hist_id`),
+constraint `sys_c0014617` foreign key (`user_id`) references `fn_user` (`user_id`)
+);
+
+--
+-- Table structure for table `cr_lu_file_type`
+--
+
+drop table if exists `cr_lu_file_type`;
+create table `cr_lu_file_type` (
+`lookup_id` decimal(2,0) not null,
+`lookup_descr` varchar(255) not null,
+`active_yn` char(1) default 'y',
+`error_code` decimal(11,0) default null,
+primary key (`lookup_id`)
+);
+
+--
+-- Table structure for table `cr_raptor_action_img`
+--
+
+drop table if exists `cr_raptor_action_img`;
+create table `cr_raptor_action_img` (
+`image_id` varchar(100) not null,
+`image_loc` varchar(400) default null,
+primary key (`image_id`)
+);
+
+--
+-- Table structure for table `cr_raptor_pdf_img`
+--
+
+drop table if exists `cr_raptor_pdf_img`;
+create table `cr_raptor_pdf_img` (
+`image_id` varchar(100) not null,
+`image_loc` varchar(400) default null,
+primary key (`image_id`)
+);
+
+--
+-- Table structure for table `cr_remote_schema_info`
+--
+
+drop table if exists `cr_remote_schema_info`;
+create table `cr_remote_schema_info` (
+`schema_prefix` varchar(5) not null,
+`schema_desc` varchar(75) not null,
+`datasource_type` varchar(100) default null,
+primary key (`schema_prefix`)
+);
+
+--
+-- Table structure for table `cr_report`
+--
+
+drop table if exists `cr_report`;
+create table `cr_report` (
+`rep_id` decimal(11,0) not null,
+`title` varchar(100) not null,
+`descr` varchar(255) default null,
+`public_yn` varchar(1) not null default 'n',
+`report_xml` text,
+`create_id` decimal(11,0) default null,
+`create_date` timestamp not null default current_timestamp,
+`maint_id` decimal(11,0) default null,
+`maint_date` timestamp not null default current_timestamp,
+`menu_id` varchar(500) default null,
+`menu_approved_yn` varchar(1) not null default 'n',
+`owner_id` decimal(11,0) default null,
+`folder_id` int(11) default '0',
+`dashboard_type_yn` varchar(1) default 'n',
+`dashboard_yn` varchar(1) default 'n',
+primary key (`rep_id`),
+key `cr_report_create_idpublic_yntitle` (`create_id`,`public_yn`,`title`) using btree
+);
+
+--
+-- Table structure for table `cr_report_access`
+--
+
+drop table if exists `cr_report_access`;
+create table `cr_report_access` (
+`rep_id` decimal(11,0) not null,
+`order_no` decimal(11,0) not null,
+`role_id` decimal(11,0) default null,
+`user_id` decimal(11,0) default null,
+`read_only_yn` varchar(1) not null default 'n',
+primary key (`rep_id`,`order_no`),
+constraint `fk_cr_repor_ref_8550_cr_repor` foreign key (`rep_id`) references `cr_report` (`rep_id`)
+);
+
+--
+-- Table structure for table `cr_report_dwnld_log`
+--
+
+drop table if exists `cr_report_dwnld_log`;
+create table `cr_report_dwnld_log` (
+`user_id` decimal(11,0) not null,
+`rep_id` int(11) not null,
+`file_name` varchar(100) not null,
+`dwnld_start_time` timestamp not null default current_timestamp,
+`record_ready_time` timestamp not null default current_timestamp,
+`filter_params` varchar(2000) default null
+);
+
+--
+-- Table structure for table `cr_report_email_sent_log`
+--
+
+drop table if exists `cr_report_email_sent_log`;
+create table `cr_report_email_sent_log` (
+`log_id` int(11) not null,
+`schedule_id` decimal(11,0) default null,
+`gen_key` varchar(25) not null,
+`rep_id` decimal(11,0) not null,
+`user_id` decimal(11,0) default null,
+`sent_date` timestamp not null default current_timestamp,
+`access_flag` varchar(1) not null default 'y',
+`touch_date` timestamp not null default current_timestamp,
+primary key (`log_id`),
+key `fk_cr_report_rep_id` (`rep_id`),
+constraint `fk_cr_report_rep_id` foreign key (`rep_id`) references `cr_report` (`rep_id`)
+);
+
+--
+-- Table structure for table `cr_report_file_history`
+--
+
+drop table if exists `cr_report_file_history`;
+create table `cr_report_file_history` (
+`hist_id` int(11) not null,
+`sched_user_id` decimal(11,0) not null,
+`schedule_id` decimal(11,0) not null,
+`user_id` decimal(11,0) not null,
+`rep_id` decimal(11,0) default null,
+`run_date` timestamp not null default current_timestamp on update current_timestamp,
+`recurrence` varchar(50) default null,
+`file_type_id` decimal(2,0) default null,
+`file_name` varchar(80) default null,
+`file_blob` blob,
+`file_size` decimal(11,0) default null,
+`raptor_url` varchar(4000) default null,
+`error_yn` char(1) default 'n',
+`error_code` decimal(11,0) default null,
+`deleted_yn` char(1) default 'n',
+`deleted_by` decimal(38,0) default null,
+primary key (`hist_id`),
+key `sys_c0014614` (`file_type_id`),
+key `sys_c0014615` (`rep_id`),
+constraint `sys_c0014614` foreign key (`file_type_id`) references `cr_lu_file_type` (`lookup_id`),
+constraint `sys_c0014615` foreign key (`rep_id`) references `cr_report` (`rep_id`)
+);
+
+--
+-- Table structure for table `cr_report_log`
+--
+
+drop table if exists `cr_report_log`;
+create table `cr_report_log` (
+`rep_id` decimal(11,0) not null,
+`log_time` timestamp not null default current_timestamp on update current_timestamp,
+`user_id` decimal(11,0) not null,
+`action` varchar(2000) not null,
+`action_value` varchar(50) default null,
+`form_fields` varchar(4000) default null,
+key `fk_cr_repor_ref_17645_cr_repor` (`rep_id`),
+constraint `fk_cr_repor_ref_17645_cr_repor` foreign key (`rep_id`) references `cr_report` (`rep_id`)
+);
+
+--
+-- Table structure for table `cr_report_schedule`
+--
+
+drop table if exists `cr_report_schedule`;
+create table `cr_report_schedule` (
+`schedule_id` decimal(11,0) not null,
+`sched_user_id` decimal(11,0) not null,
+`rep_id` decimal(11,0) not null,
+`enabled_yn` varchar(1) not null,
+`start_date` timestamp not null default current_timestamp,
+`end_date` timestamp not null default current_timestamp,
+`run_date` timestamp not null default current_timestamp,
+`recurrence` varchar(50) default null,
+`conditional_yn` varchar(1) not null,
+`condition_sql` varchar(4000) default null,
+`notify_type` int(11) default '0',
+`max_row` int(11) default '1000',
+`initial_formfields` varchar(3500) default null,
+`processed_formfields` varchar(3500) default null,
+`formfields` varchar(3500) default null,
+`condition_large_sql` text,
+`encrypt_yn` char(1) default 'n',
+`attachment_yn` char(1) default 'y',
+primary key (`schedule_id`),
+key `fk_cr_repor_ref_14707_cr_repor` (`rep_id`),
+constraint `fk_cr_repor_ref_14707_cr_repor` foreign key (`rep_id`) references `cr_report` (`rep_id`)
+);
+
+--
+-- Table structure for table `cr_report_schedule_users`
+--
+
+drop table if exists `cr_report_schedule_users`;
+create table `cr_report_schedule_users` (
+`schedule_id` decimal(11,0) not null,
+`rep_id` decimal(11,0) not null,
+`user_id` decimal(11,0) not null,
+`role_id` decimal(11,0) default null,
+`order_no` decimal(11,0) not null,
+primary key (`schedule_id`,`rep_id`,`user_id`,`order_no`),
+constraint `fk_cr_repor_ref_14716_cr_repor` foreign key (`schedule_id`) references `cr_report_schedule` (`schedule_id`)
+);
+
+--
+-- Table structure for table `cr_report_template_map`
+--
+
+drop table if exists `cr_report_template_map`;
+create table `cr_report_template_map` (
+`report_id` int(11) not null,
+`template_file` varchar(200) default null,
+primary key (`report_id`)
+);
+
+--
+-- Table structure for table `cr_schedule_activity_log`
+--
+
+drop table if exists `cr_schedule_activity_log`;
+create table `cr_schedule_activity_log` (
+`schedule_id` decimal(11,0) not null,
+`url` varchar(4000) default null,
+`notes` varchar(2000) default null,
+`run_time` timestamp not null default current_timestamp on update current_timestamp
+);
+
+--
+-- Table structure for table `cr_table_join`
+--
+
+drop table if exists `cr_table_join`;
+create table `cr_table_join` (
+`src_table_name` varchar(30) not null,
+`dest_table_name` varchar(30) not null,
+`join_expr` varchar(500) not null,
+key `cr_table_join_dest_table_name` (`dest_table_name`) using btree,
+key `cr_table_join_src_table_name` (`src_table_name`) using btree,
+constraint `fk_cr_table_ref_311_cr_tab` foreign key (`src_table_name`) references `cr_table_source` (`table_name`),
+constraint `fk_cr_table_ref_315_cr_tab` foreign key (`dest_table_name`) references `cr_table_source` (`table_name`)
+);
+
+--
+-- Table structure for table `cr_table_role`
+--
+
+drop table if exists `cr_table_role`;
+create table `cr_table_role` (
+`table_name` varchar(30) not null,
+`role_id` decimal(11,0) not null,
+primary key (`table_name`,`role_id`),
+constraint `fk_cr_table_ref_32384_cr_table` foreign key (`table_name`) references `cr_table_source` (`table_name`)
+);
+
+--
+-- Table structure for table `cr_table_source`
+--
+
+drop table if exists `cr_table_source`;
+create table `cr_table_source` (
+`table_name` varchar(30) not null,
+`display_name` varchar(30) not null,
+`pk_fields` varchar(200) default null,
+`web_view_action` varchar(50) default null,
+`large_data_source_yn` varchar(1) not null default 'n',
+`filter_sql` varchar(4000) default null,
+`source_db` varchar(50) default null,
+primary key (`table_name`)
+);
+
+--
+-- Table structure for table `databaselockentity`
+--
+
+drop table if exists `databaselockentity`;
+create table `databaselockentity` (
+`lock_key` int(11) not null,
+primary key (`lock_key`)
+);
+
+--
+-- Table structure for table `datatype`
+--
+
+drop table if exists `datatype`;
+create table `datatype` (
+`id` int(11) not null,
+`is_standard` char(1) not null,
+`short_name` varchar(64) not null,
+`xacml_id` varchar(255) not null,
+primary key (`id`),
+unique key `xacml_id` (`xacml_id`)
+);
+
+--
+-- Table structure for table `dcaeusers`
+--
+
+drop table if exists `dcaeusers`;
+create table `dcaeusers` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `dcaeuuid`
+--
+
+drop table if exists `dcaeuuid`;
+create table `dcaeuuid` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `decisionsettings`
+--
+
+drop table if exists `decisionsettings`;
+create table `decisionsettings` (
+`id` int(11) not null auto_increment,
+`xacml_id` varchar(1024) not null,
+`description` varchar(1024) default null,
+`datatype` varchar(45) not null,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default current_timestamp on update current_timestamp,
+`modified_by` varchar(45) not null,
+`priority` varchar(45) default null,
+`created_date` timestamp not null default current_timestamp,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `demo_bar_chart`
+--
+
+drop table if exists `demo_bar_chart`;
+create table `demo_bar_chart` (
+`label` varchar(20) default null,
+`value` decimal(25,15) default null
+);
+
+--
+-- Table structure for table `demo_bar_chart_inter`
+--
+
+drop table if exists `demo_bar_chart_inter`;
+create table `demo_bar_chart_inter` (
+`spam_date` date default null,
+`num_rpt_sources` decimal(10,0) default null,
+`num_det_sources` decimal(10,0) default null
+);
+
+--
+-- Table structure for table `demo_line_chart`
+--
+
+drop table if exists `demo_line_chart`;
+create table `demo_line_chart` (
+`series` varchar(20) default null,
+`log_date` date default null,
+`data_value` decimal(10,5) default null
+);
+
+--
+-- Table structure for table `demo_pie_chart`
+--
+
+drop table if exists `demo_pie_chart`;
+create table `demo_pie_chart` (
+`legend` varchar(20) default null,
+`data_value` decimal(10,5) default null
+);
+
+--
+-- Table structure for table `demo_scatter_chart`
+--
+
+drop table if exists `demo_scatter_chart`;
+create table `demo_scatter_chart` (
+`rainfall` decimal(10,2) default null,
+`key_value` varchar(20) default null,
+`measurements` decimal(10,2) default null
+);
+
+--
+-- Table structure for table `demo_scatter_plot`
+--
+
+drop table if exists `demo_scatter_plot`;
+create table `demo_scatter_plot` (
+`series` varchar(20) default null,
+`valuex` decimal(25,15) default null,
+`valuey` decimal(25,15) default null
+);
+
+--
+-- Table structure for table `demo_util_chart`
+--
+
+drop table if exists `demo_util_chart`;
+create table `demo_util_chart` (
+`traffic_date` date default null,
+`util_perc` decimal(10,5) default null
+);
+
+--
+-- Table structure for table `descriptivescope`
+--
+
+drop table if exists `descriptivescope`;
+create table `descriptivescope` (
+`id` int(11) not null auto_increment,
+`scopename` varchar(1024) not null,
+`description` varchar(1024) default null,
+`search` varchar(1024) not null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `ecompname`
+--
+
+drop table if exists `ecompname`;
+create table `ecompname` (
+`id` int(11) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`description` varchar(2048) default null,
+`ecomp_name` varchar(767) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+primary key (`id`),
+unique key `ecomp_name` (`ecomp_name`)
+);
+
+--
+-- Table structure for table `enforcingtype`
+--
+
+drop table if exists `enforcingtype`;
+create table `enforcingtype` (
+`id` int(11) not null auto_increment,
+`enforcingtype` varchar(1024) not null,
+`script` varchar(5000) not null,
+`connectionquery` varchar(1000) not null,
+`valuequery` varchar(1000) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `fn_app`
+--
+
+drop table if exists `fn_app`;
+create table `fn_app` (
+`app_id` int(11) not null auto_increment,
+`app_name` varchar(100) not null default '?',
+`app_image_url` varchar(256) default null,
+`app_description` varchar(512) default null,
+`app_notes` varchar(4096) default null,
+`app_url` varchar(256) default null,
+`app_alternate_url` varchar(256) default null,
+`app_rest_endpoint` varchar(2000) default null,
+`ml_app_name` varchar(50) not null default '?',
+`ml_app_admin_id` varchar(7) not null default '?',
+`mots_id` int(11) default null,
+`app_password` varchar(256) not null default '?',
+`open` char(1) default 'n',
+`enabled` char(1) default 'y',
+`thumbnail` mediumblob,
+`app_username` varchar(50) default null,
+`ueb_key` varchar(256) default null,
+`ueb_secret` varchar(256) default null,
+`ueb_topic_name` varchar(256) default null,
+primary key (`app_id`)
+);
+
+--
+-- Table structure for table `fn_audit_action`
+--
+
+drop table if exists `fn_audit_action`;
+create table `fn_audit_action` (
+`audit_action_id` int(11) not null,
+`class_name` varchar(500) not null,
+`method_name` varchar(50) not null,
+`audit_action_cd` varchar(20) not null,
+`audit_action_desc` varchar(200) default null,
+`active_yn` varchar(1) default null,
+primary key (`audit_action_id`)
+);
+
+--
+-- Table structure for table `fn_audit_action_log`
+--
+
+drop table if exists `fn_audit_action_log`;
+create table `fn_audit_action_log` (
+`audit_log_id` int(11) not null auto_increment,
+`audit_action_cd` varchar(200) default null,
+`action_time` timestamp not null default current_timestamp on update current_timestamp,
+`user_id` decimal(11,0) default null,
+`class_name` varchar(100) default null,
+`method_name` varchar(50) default null,
+`success_msg` varchar(20) default null,
+`error_msg` varchar(500) default null,
+primary key (`audit_log_id`)
+);
+
+--
+-- Table structure for table `fn_audit_log`
+--
+
+drop table if exists `fn_audit_log`;
+create table `fn_audit_log` (
+`log_id` int(11) not null auto_increment,
+`user_id` int(11) not null,
+`activity_cd` varchar(50) not null,
+`audit_date` timestamp not null default current_timestamp,
+`comments` varchar(1000) default null,
+`affected_record_id_bk` varchar(500) default null,
+`affected_record_id` varchar(4000) default null,
+primary key (`log_id`),
+key `fn_audit_log_activity_cd` (`activity_cd`) using btree,
+key `fn_audit_log_user_id` (`user_id`) using btree,
+constraint `fk_fn_audit_ref_209_fn_user` foreign key (`user_id`) references `fn_user` (`user_id`),
+constraint `fk_fn_audit_ref_205_fn_lu_ac` foreign key (`activity_cd`) references `fn_lu_activity` (`activity_cd`)
+);
+
+--
+-- Table structure for table `fn_broadcast_message`
+--
+
+drop table if exists `fn_broadcast_message`;
+create table `fn_broadcast_message` (
+`message_id` int(11) not null auto_increment,
+`message_text` varchar(1000) not null,
+`message_location_id` decimal(11,0) not null,
+`broadcast_start_date` timestamp not null default current_timestamp,
+`broadcast_end_date` timestamp not null default current_timestamp,
+`active_yn` char(1) not null default 'y',
+`sort_order` decimal(4,0) not null,
+`broadcast_site_cd` varchar(50) default null,
+primary key (`message_id`)
+);
+
+--
+-- Table structure for table `fn_chat_logs`
+--
+
+drop table if exists `fn_chat_logs`;
+create table `fn_chat_logs` (
+`chat_log_id` int(11) not null,
+`chat_room_id` int(11) default null,
+`user_id` int(11) default null,
+`message` varchar(1000) default null,
+`message_date_time` timestamp not null default current_timestamp on update current_timestamp,
+primary key (`chat_log_id`)
+);
+
+--
+-- Table structure for table `fn_chat_room`
+--
+
+drop table if exists `fn_chat_room`;
+create table `fn_chat_room` (
+`chat_room_id` int(11) not null,
+`name` varchar(50) not null,
+`description` varchar(500) default null,
+`owner_id` int(11) default null,
+`created_date` timestamp not null default current_timestamp,
+`updated_date` timestamp not null default current_timestamp,
+primary key (`chat_room_id`)
+);
+
+--
+-- Table structure for table `fn_chat_users`
+--
+
+drop table if exists `fn_chat_users`;
+create table `fn_chat_users` (
+`chat_room_id` int(11) default null,
+`user_id` int(11) default null,
+`last_activity_date_time` timestamp not null default current_timestamp on update current_timestamp,
+`chat_status` varchar(20) default null,
+`id` int(11) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `fn_datasource`
+--
+
+drop table if exists `fn_datasource`;
+create table `fn_datasource` (
+`id` int(11) not null auto_increment,
+`name` varchar(50) default null,
+`driver_name` varchar(256) default null,
+`server` varchar(256) default null,
+`port` int(11) default null,
+`user_name` varchar(256) default null,
+`password` varchar(256) default null,
+`url` varchar(256) default null,
+`min_pool_size` int(11) default null,
+`max_pool_size` int(11) default null,
+`adapter_id` int(11) default null,
+`ds_type` varchar(20) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `fn_function`
+--
+
+drop table if exists `fn_function`;
+create table `fn_function` (
+`function_cd` varchar(30) not null,
+`function_name` varchar(50) not null,
+primary key (`function_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_activity`
+--
+
+drop table if exists `fn_lu_activity`;
+create table `fn_lu_activity` (
+`activity_cd` varchar(50) not null,
+`activity` varchar(50) not null,
+primary key (`activity_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_alert_method`
+--
+
+drop table if exists `fn_lu_alert_method`;
+create table `fn_lu_alert_method` (
+`alert_method_cd` varchar(10) not null,
+`alert_method` varchar(50) not null,
+primary key (`alert_method_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_broadcast_site`
+--
+
+drop table if exists `fn_lu_broadcast_site`;
+create table `fn_lu_broadcast_site` (
+`broadcast_site_cd` varchar(50) not null,
+`broadcast_site_descr` varchar(100) default null,
+primary key (`broadcast_site_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_menu_set`
+--
+
+drop table if exists `fn_lu_menu_set`;
+create table `fn_lu_menu_set` (
+`menu_set_cd` varchar(10) not null,
+`menu_set_name` varchar(50) not null,
+primary key (`menu_set_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_message_location`
+--
+
+drop table if exists `fn_lu_message_location`;
+create table `fn_lu_message_location` (
+`message_location_id` decimal(11,0) not null,
+`message_location_descr` varchar(30) not null,
+primary key (`message_location_id`)
+);
+
+--
+-- Table structure for table `fn_lu_priority`
+--
+
+drop table if exists `fn_lu_priority`;
+create table `fn_lu_priority` (
+`priority_id` decimal(11,0) not null,
+`priority` varchar(50) not null,
+`active_yn` char(1) not null,
+`sort_order` decimal(5,0) default null,
+primary key (`priority_id`)
+);
+
+--
+-- Table structure for table `fn_lu_role_type`
+--
+
+drop table if exists `fn_lu_role_type`;
+create table `fn_lu_role_type` (
+`role_type_id` decimal(11,0) not null,
+`role_type` varchar(50) not null,
+primary key (`role_type_id`)
+);
+
+--
+-- Table structure for table `fn_lu_tab_set`
+--
+
+drop table if exists `fn_lu_tab_set`;
+create table `fn_lu_tab_set` (
+`tab_set_cd` varchar(30) not null,
+`tab_set_name` varchar(50) not null,
+primary key (`tab_set_cd`)
+);
+
+--
+-- Table structure for table `fn_lu_timezone`
+--
+
+drop table if exists `fn_lu_timezone`;
+create table `fn_lu_timezone` (
+`timezone_id` int(11) not null,
+`timezone_name` varchar(100) not null,
+`timezone_value` varchar(100) not null,
+primary key (`timezone_id`)
+);
+
+--
+-- Table structure for table `fn_menu`
+--
+
+drop table if exists `fn_menu`;
+create table `fn_menu` (
+`menu_id` int(11) not null auto_increment,
+`label` varchar(100) default null,
+`parent_id` int(11) default null,
+`sort_order` decimal(4,0) default null,
+`action` varchar(200) default null,
+`function_cd` varchar(30) default null,
+`active_yn` varchar(1) not null default 'y',
+`servlet` varchar(50) default null,
+`query_string` varchar(200) default null,
+`external_url` varchar(200) default null,
+`target` varchar(25) default null,
+`menu_set_cd` varchar(10) default 'app',
+`separator_yn` char(1) default 'n',
+`image_src` varchar(100) default null,
+primary key (`menu_id`),
+key `fk_fn_menu_ref_196_fn_menu` (`parent_id`),
+key `fk_fn_menu_menu_set_cd` (`menu_set_cd`),
+key `fn_menu_function_cd` (`function_cd`) using btree,
+constraint `fk_fn_menu_menu_set_cd` foreign key (`menu_set_cd`) references `fn_lu_menu_set` (`menu_set_cd`),
+constraint `fk_fn_menu_ref_196_fn_menu` foreign key (`parent_id`) references `fn_menu` (`menu_id`),
+constraint `fk_fn_menu_ref_223_fn_funct` foreign key (`function_cd`) references `fn_function` (`function_cd`)
+);
+
+--
+-- Table structure for table `fn_org`
+--
+
+drop table if exists `fn_org`;
+create table `fn_org` (
+`org_id` int(11) not null,
+`org_name` varchar(50) not null,
+`access_cd` varchar(10) default null,
+primary key (`org_id`),
+key `fn_org_access_cd` (`access_cd`) using btree
+);
+
+--
+-- Table structure for table `fn_qz_blob_triggers`
+--
+
+drop table if exists `fn_qz_blob_triggers`;
+create table `fn_qz_blob_triggers` (
+`sched_name` varchar(120) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`blob_data` blob,
+primary key (`sched_name`,`trigger_name`,`trigger_group`),
+key `sched_name` (`sched_name`,`trigger_name`,`trigger_group`),
+constraint `fn_qz_blob_triggers_ibfk_1` foreign key (`sched_name`, `trigger_name`, `trigger_group`) references `fn_qz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_calendars`
+--
+
+drop table if exists `fn_qz_calendars`;
+create table `fn_qz_calendars` (
+`sched_name` varchar(120) not null,
+`calendar_name` varchar(200) not null,
+`calendar` blob not null,
+primary key (`sched_name`,`calendar_name`)
+);
+
+--
+-- Table structure for table `fn_qz_cron_triggers`
+--
+
+drop table if exists `fn_qz_cron_triggers`;
+create table `fn_qz_cron_triggers` (
+`sched_name` varchar(120) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`cron_expression` varchar(120) not null,
+`time_zone_id` varchar(80) default null,
+primary key (`sched_name`,`trigger_name`,`trigger_group`),
+constraint `fn_qz_cron_triggers_ibfk_1` foreign key (`sched_name`, `trigger_name`, `trigger_group`) references `fn_qz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_fired_triggers`
+--
+
+drop table if exists `fn_qz_fired_triggers`;
+create table `fn_qz_fired_triggers` (
+`sched_name` varchar(120) not null,
+`entry_id` varchar(95) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`instance_name` varchar(200) not null,
+`fired_time` bigint(13) not null,
+`sched_time` bigint(13) not null,
+`priority` int(11) not null,
+`state` varchar(16) not null,
+`job_name` varchar(200) default null,
+`job_group` varchar(200) default null,
+`is_nonconcurrent` varchar(1) default null,
+`requests_recovery` varchar(1) default null,
+primary key (`sched_name`,`entry_id`),
+key `idx_fn_qz_ft_trig_inst_name` (`sched_name`,`instance_name`),
+key `idx_fn_qz_ft_inst_job_req_rcvry` (`sched_name`,`instance_name`,`requests_recovery`),
+key `idx_fn_qz_ft_j_g` (`sched_name`,`job_name`,`job_group`),
+key `idx_fn_qz_ft_jg` (`sched_name`,`job_group`),
+key `idx_fn_qz_ft_t_g` (`sched_name`,`trigger_name`,`trigger_group`),
+key `idx_fn_qz_ft_tg` (`sched_name`,`trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_job_details`
+--
+
+drop table if exists `fn_qz_job_details`;
+create table `fn_qz_job_details` (
+`sched_name` varchar(120) not null,
+`job_name` varchar(200) not null,
+`job_group` varchar(200) not null,
+`description` varchar(250) default null,
+`job_class_name` varchar(250) not null,
+`is_durable` varchar(1) not null,
+`is_nonconcurrent` varchar(1) not null,
+`is_update_data` varchar(1) not null,
+`requests_recovery` varchar(1) not null,
+`job_data` blob,
+primary key (`sched_name`,`job_name`,`job_group`),
+key `idx_fn_qz_j_req_recovery` (`sched_name`,`requests_recovery`),
+key `idx_fn_qz_j_grp` (`sched_name`,`job_group`)
+);
+
+--
+-- Table structure for table `fn_qz_locks`
+--
+
+drop table if exists `fn_qz_locks`;
+create table `fn_qz_locks` (
+`sched_name` varchar(120) not null,
+`lock_name` varchar(40) not null,
+primary key (`sched_name`,`lock_name`)
+);
+
+--
+-- Table structure for table `fn_qz_paused_trigger_grps`
+--
+
+drop table if exists `fn_qz_paused_trigger_grps`;
+create table `fn_qz_paused_trigger_grps` (
+`sched_name` varchar(120) not null,
+`trigger_group` varchar(200) not null,
+primary key (`sched_name`,`trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_scheduler_state`
+--
+
+drop table if exists `fn_qz_scheduler_state`;
+create table `fn_qz_scheduler_state` (
+`sched_name` varchar(120) not null,
+`instance_name` varchar(200) not null,
+`last_checkin_time` bigint(13) not null,
+`checkin_interval` bigint(13) not null,
+primary key (`sched_name`,`instance_name`)
+);
+
+--
+-- Table structure for table `fn_qz_simple_triggers`
+--
+
+drop table if exists `fn_qz_simple_triggers`;
+create table `fn_qz_simple_triggers` (
+`sched_name` varchar(120) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`repeat_count` bigint(7) not null,
+`repeat_interval` bigint(12) not null,
+`times_triggered` bigint(10) not null,
+primary key (`sched_name`,`trigger_name`,`trigger_group`),
+constraint `fn_qz_simple_triggers_ibfk_1` foreign key (`sched_name`, `trigger_name`, `trigger_group`) references `fn_qz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_simprop_triggers`
+--
+
+drop table if exists `fn_qz_simprop_triggers`;
+create table `fn_qz_simprop_triggers` (
+`sched_name` varchar(120) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`str_prop_1` varchar(512) default null,
+`str_prop_2` varchar(512) default null,
+`str_prop_3` varchar(512) default null,
+`int_prop_1` int(11) default null,
+`int_prop_2` int(11) default null,
+`long_prop_1` bigint(20) default null,
+`long_prop_2` bigint(20) default null,
+`dec_prop_1` decimal(13,4) default null,
+`dec_prop_2` decimal(13,4) default null,
+`bool_prop_1` varchar(1) default null,
+`bool_prop_2` varchar(1) default null,
+primary key (`sched_name`,`trigger_name`,`trigger_group`),
+constraint `fn_qz_simprop_triggers_ibfk_1` foreign key (`sched_name`, `trigger_name`, `trigger_group`) references `fn_qz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)
+);
+
+--
+-- Table structure for table `fn_qz_triggers`
+--
+
+drop table if exists `fn_qz_triggers`;
+create table `fn_qz_triggers` (
+`sched_name` varchar(120) not null,
+`trigger_name` varchar(200) not null,
+`trigger_group` varchar(200) not null,
+`job_name` varchar(200) not null,
+`job_group` varchar(200) not null,
+`description` varchar(250) default null,
+`next_fire_time` bigint(13) default null,
+`prev_fire_time` bigint(13) default null,
+`priority` int(11) default null,
+`trigger_state` varchar(16) not null,
+`trigger_type` varchar(8) not null,
+`start_time` bigint(13) not null,
+`end_time` bigint(13) default null,
+`calendar_name` varchar(200) default null,
+`misfire_instr` smallint(2) default null,
+`job_data` blob,
+primary key (`sched_name`,`trigger_name`,`trigger_group`),
+key `idx_fn_qz_t_j` (`sched_name`,`job_name`,`job_group`),
+key `idx_fn_qz_t_jg` (`sched_name`,`job_group`),
+key `idx_fn_qz_t_c` (`sched_name`,`calendar_name`),
+key `idx_fn_qz_t_g` (`sched_name`,`trigger_group`),
+key `idx_fn_qz_t_state` (`sched_name`,`trigger_state`),
+key `idx_fn_qz_t_n_state` (`sched_name`,`trigger_name`,`trigger_group`,`trigger_state`),
+key `idx_fn_qz_t_n_g_state` (`sched_name`,`trigger_group`,`trigger_state`),
+key `idx_fn_qz_t_next_fire_time` (`sched_name`,`next_fire_time`),
+key `idx_fn_qz_t_nft_st` (`sched_name`,`trigger_state`,`next_fire_time`),
+key `idx_fn_qz_t_nft_misfire` (`sched_name`,`misfire_instr`,`next_fire_time`),
+key `idx_fn_qz_t_nft_st_misfire` (`sched_name`,`misfire_instr`,`next_fire_time`,`trigger_state`),
+key `idx_fn_qz_t_nft_st_misfire_grp` (`sched_name`,`misfire_instr`,`next_fire_time`,`trigger_group`,`trigger_state`),
+constraint `fn_qz_triggers_ibfk_1` foreign key (`sched_name`, `job_name`, `job_group`) references `fn_qz_job_details` (`sched_name`, `job_name`, `job_group`)
+);
+
+--
+-- Table structure for table `fn_restricted_url`
+--
+
+drop table if exists `fn_restricted_url`;
+create table `fn_restricted_url` (
+`restricted_url` varchar(250) not null,
+`function_cd` varchar(30) not null,
+primary key (`restricted_url`,`function_cd`),
+key `fk_restricted_url_function_cd` (`function_cd`),
+constraint `fk_restricted_url_function_cd` foreign key (`function_cd`) references `fn_function` (`function_cd`)
+);
+
+--
+-- Table structure for table `fn_role`
+--
+
+drop table if exists `fn_role`;
+create table `fn_role` (
+`role_id` int(11) not null auto_increment,
+`role_name` varchar(50) not null,
+`active_yn` varchar(1) not null default 'y',
+`priority` decimal(4,0) default null,
+primary key (`role_id`)
+);
+
+--
+-- Table structure for table `fn_role_composite`
+--
+
+drop table if exists `fn_role_composite`;
+create table `fn_role_composite` (
+`parent_role_id` int(11) not null,
+`child_role_id` int(11) not null,
+primary key (`parent_role_id`,`child_role_id`),
+key `fk_fn_role_composite_child` (`child_role_id`),
+constraint `fk_fn_role_composite_child` foreign key (`child_role_id`) references `fn_role` (`role_id`),
+constraint `fk_fn_role_composite_parent` foreign key (`parent_role_id`) references `fn_role` (`role_id`)
+);
+
+--
+-- Table structure for table `fn_role_function`
+--
+
+drop table if exists `fn_role_function`;
+create table `fn_role_function` (
+`role_id` int(11) not null,
+`function_cd` varchar(30) not null,
+primary key (`role_id`,`function_cd`),
+key `fn_role_function_function_cd` (`function_cd`) using btree,
+key `fn_role_function_role_id` (`role_id`) using btree,
+constraint `fk_fn_role__ref_198_fn_role` foreign key (`role_id`) references `fn_role` (`role_id`),
+constraint `fk_fn_role__ref_201_fn_funct` foreign key (`function_cd`) references `fn_function` (`function_cd`)
+);
+
+--
+-- Table structure for table `fn_schedule_workflows`
+--
+
+drop table if exists `fn_schedule_workflows`;
+create table `fn_schedule_workflows` (
+`id_schedule_workflows` bigint(25) not null auto_increment,
+`workflow_server_url` varchar(45) default null,
+`workflow_key` varchar(45) not null,
+`workflow_arguments` varchar(45) default null,
+`startdatetimecron` varchar(45) default null,
+`enddatetime` timestamp not null default current_timestamp,
+`start_date_time` timestamp not null default current_timestamp,
+`recurrence` varchar(45) default null,
+primary key (`id_schedule_workflows`)
+);
+
+--
+-- Table structure for table `fn_tab`
+--
+
+drop table if exists `fn_tab`;
+create table `fn_tab` (
+`tab_cd` varchar(30) not null,
+`tab_name` varchar(50) not null,
+`tab_descr` varchar(100) default null,
+`action` varchar(100) not null,
+`function_cd` varchar(30) not null,
+`active_yn` char(1) not null,
+`sort_order` decimal(11,0) not null,
+`parent_tab_cd` varchar(30) default null,
+`tab_set_cd` varchar(30) default null,
+primary key (`tab_cd`),
+key `fk_fn_tab_function_cd` (`function_cd`),
+key `fk_fn_tab_set_cd` (`tab_set_cd`),
+constraint `fk_fn_tab_function_cd` foreign key (`function_cd`) references `fn_function` (`function_cd`),
+constraint `fk_fn_tab_set_cd` foreign key (`tab_set_cd`) references `fn_lu_tab_set` (`tab_set_cd`)
+);
+
+--
+-- Table structure for table `fn_tab_selected`
+--
+
+drop table if exists `fn_tab_selected`;
+create table `fn_tab_selected` (
+`selected_tab_cd` varchar(30) not null,
+`tab_uri` varchar(40) not null,
+primary key (`selected_tab_cd`,`tab_uri`),
+constraint `fk_fn_tab_selected_tab_cd` foreign key (`selected_tab_cd`) references `fn_tab` (`tab_cd`)
+);
+
+--
+-- Table structure for table `fn_user`
+--
+
+drop table if exists `fn_user`;
+create table `fn_user` (
+`user_id` int(11) not null auto_increment,
+`org_id` int(11) default null,
+`manager_id` int(11) default null,
+`first_name` varchar(25) default null,
+`middle_name` varchar(25) default null,
+`last_name` varchar(25) default null,
+`phone` varchar(25) default null,
+`fax` varchar(25) default null,
+`cellular` varchar(25) default null,
+`email` varchar(50) default null,
+`address_id` decimal(11,0) default null,
+`alert_method_cd` varchar(10) default null,
+`hrid` varchar(20) default null,
+`org_user_id` varchar(20) default null,
+`org_code` varchar(30) default null,
+`login_id` varchar(25) default null,
+`login_pwd` varchar(25) default null,
+`last_login_date` timestamp not null default current_timestamp on update current_timestamp,
+`active_yn` varchar(1) not null default 'y',
+`created_id` int(11) default null,
+`created_date` timestamp not null default current_timestamp,
+`modified_id` int(11) default null,
+`modified_date` timestamp not null default current_timestamp,
+`is_internal_yn` char(1) not null default 'n',
+`address_line_1` varchar(100) default null,
+`address_line_2` varchar(100) default null,
+`city` varchar(50) default null,
+`state_cd` varchar(3) default null,
+`zip_code` varchar(11) default null,
+`country_cd` varchar(3) default null,
+`location_clli` varchar(8) default null,
+`org_manager_userid` varchar(20) default null,
+`company` varchar(100) default null,
+`department_name` varchar(100) default null,
+`job_title` varchar(100) default null,
+`timezone` int(11) default null,
+`department` varchar(25) default null,
+`business_unit` varchar(25) default null,
+`business_unit_name` varchar(100) default null,
+`cost_center` varchar(25) default null,
+`fin_loc_code` varchar(10) default null,
+`silo_status` varchar(10) default null,
+primary key (`user_id`),
+unique key `fn_user_hrid` (`hrid`) using btree,
+unique key `fn_user_login_id` (`login_id`) using btree,
+key `fn_user_address_id` (`address_id`) using btree,
+key `fn_user_alert_method_cd` (`alert_method_cd`) using btree,
+key `fn_user_org_id` (`org_id`) using btree,
+key `fk_fn_user_ref_197_fn_user` (`manager_id`),
+key `fk_fn_user_ref_198_fn_user` (`created_id`),
+key `fk_fn_user_ref_199_fn_user` (`modified_id`),
+key `fk_timezone` (`timezone`),
+constraint `fk_fn_user_ref_110_fn_org` foreign key (`org_id`) references `fn_org` (`org_id`),
+constraint `fk_fn_user_ref_123_fn_lu_al` foreign key (`alert_method_cd`) references `fn_lu_alert_method` (`alert_method_cd`),
+constraint `fk_fn_user_ref_197_fn_user` foreign key (`manager_id`) references `fn_user` (`user_id`),
+constraint `fk_fn_user_ref_198_fn_user` foreign key (`created_id`) references `fn_user` (`user_id`),
+constraint `fk_fn_user_ref_199_fn_user` foreign key (`modified_id`) references `fn_user` (`user_id`),
+constraint `fk_timezone` foreign key (`timezone`) references `fn_lu_timezone` (`timezone_id`)
+);
+
+--
+-- Table structure for table `fn_user_pseudo_role`
+--
+
+drop table if exists `fn_user_pseudo_role`;
+create table `fn_user_pseudo_role` (
+`pseudo_role_id` int(11) not null,
+`user_id` int(11) not null,
+primary key (`pseudo_role_id`,`user_id`),
+key `fk_pseudo_role_user_id` (`user_id`),
+constraint `fk_pseudo_role_pseudo_role_id` foreign key (`pseudo_role_id`) references `fn_role` (`role_id`),
+constraint `fk_pseudo_role_user_id` foreign key (`user_id`) references `fn_user` (`user_id`)
+);
+
+--
+-- Table structure for table `fn_user_role`
+--
+
+drop table if exists `fn_user_role`;
+create table `fn_user_role` (
+`user_id` int(10) not null,
+`role_id` int(10) not null,
+`priority` decimal(4,0) default null,
+`app_id` int(11) not null default '1',
+primary key (`user_id`,`role_id`,`app_id`),
+key `fn_user_role_role_id` (`role_id`) using btree,
+key `fn_user_role_user_id` (`user_id`) using btree,
+key `fk_fn_user__ref_178_fn_app_idx` (`app_id`),
+constraint `fk_fn_user__ref_172_fn_user` foreign key (`user_id`) references `fn_user` (`user_id`),
+constraint `fk_fn_user__ref_175_fn_role` foreign key (`role_id`) references `fn_role` (`role_id`),
+constraint `fk_fn_user__ref_178_fn_app` foreign key (`app_id`) references `fn_app` (`app_id`)
+);
+
+--
+-- Table structure for table `fn_workflow`
+--
+
+drop table if exists `fn_workflow`;
+create table `fn_workflow` (
+`id` mediumint(9) not null auto_increment,
+`name` varchar(20) not null,
+`description` varchar(500) default null,
+`run_link` varchar(300) default null,
+`suspend_link` varchar(300) default null,
+`modified_link` varchar(300) default null,
+`active_yn` varchar(300) default null,
+`created` varchar(300) default null,
+`created_by` int(11) default null,
+`modified` varchar(300) default null,
+`modified_by` int(11) default null,
+`workflow_key` varchar(50) default null,
+primary key (`id`),
+unique key `name` (`name`)
+);
+
+--
+-- Table structure for table `forwardprogressentity`
+--
+
+drop table if exists `forwardprogressentity`;
+create table `forwardprogressentity` (
+`forwardprogressid` bigint(20) not null auto_increment,
+`resourcename` varchar(100) not null,
+`fpc_count` mediumtext not null,
+`created_date` timestamp not null default current_timestamp,
+`last_updated` timestamp not null default '0000-00-00 00:00:00',
+primary key (`forwardprogressid`),
+unique key `resource_key` (`resourcename`)
+);
+
+--
+-- Temporary table structure for view `function_flattener`
+--
+
+drop table if exists `function_flattener`;
+drop view if exists `function_flattener`;
+create table `function_flattener` (
+`id` tinyint not null,
+`shortname` tinyint not null,
+`return_datatype` tinyint not null,
+`is_bag_return` tinyint not null,
+`is_higher_order` tinyint not null,
+`arg_lb` tinyint not null,
+`arg_ub` tinyint not null,
+`arg1_isbag` tinyint not null,
+`arg1_datatype` tinyint not null,
+`arg2_isbag` tinyint not null,
+`arg2_datatype` tinyint not null,
+`arg3_isbag` tinyint not null,
+`arg3_datatype` tinyint not null
+);
+
+--
+-- Table structure for table `functionarguments`
+--
+
+drop table if exists `functionarguments`;
+create table `functionarguments` (
+`id` int(11) not null,
+`arg_index` int(11) not null,
+`is_bag` int(11) not null,
+`datatype_id` int(11) default null,
+`function_id` int(11) default null,
+primary key (`id`),
+key `fk_functionarguments_function_id` (`function_id`),
+key `fk_functionarguments_datatype_id` (`datatype_id`),
+constraint `fk_functionarguments_datatype_id` foreign key (`datatype_id`) references `datatype` (`id`),
+constraint `fk_functionarguments_function_id` foreign key (`function_id`) references `functiondefinition` (`id`)
+);
+
+--
+-- Table structure for table `functiondefinition`
+--
+
+drop table if exists `functiondefinition`;
+create table `functiondefinition` (
+`id` int(11) not null,
+`arg_lb` int(11) not null,
+`arg_ub` int(11) not null,
+`ho_arg_lb` int(11) default null,
+`ho_arg_ub` int(11) default null,
+`ho_primitive` char(1) default null,
+`is_bag_return` int(11) not null,
+`is_higher_order` int(11) not null,
+`short_name` varchar(64) not null,
+`xacml_id` varchar(255) not null,
+`return_datatype` int(11) default null,
+primary key (`id`),
+key `fk_functiondefinition_return_datatype` (`return_datatype`),
+constraint `fk_functiondefinition_return_datatype` foreign key (`return_datatype`) references `datatype` (`id`)
+);
+
+--
+-- Table structure for table `fwchildtoparent`
+--
+
+drop table if exists `fwchildtoparent`;
+create table `fwchildtoparent` (
+`id` int(11) not null auto_increment,
+`child` varchar(1024) default null,
+`parent` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `fwparent`
+--
+
+drop table if exists `fwparent`;
+create table `fwparent` (
+`id` int(11) not null auto_increment,
+`parent` varchar(1024) default null,
+`securityzone` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `fwparenttochild`
+--
+
+drop table if exists `fwparenttochild`;
+create table `fwparenttochild` (
+`id` int(11) not null auto_increment,
+`parent` varchar(1024) default null,
+`child` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `globalrolesettings`
+--
+
+drop table if exists `globalrolesettings`;
+create table `globalrolesettings` (
+`role` varchar(45) not null,
+`lockdown` tinyint(1) default null,
+primary key (`role`)
+);
+
+--
+-- Table structure for table `goceventalarm`
+--
+
+drop table if exists `goceventalarm`;
+create table `goceventalarm` (
+`id` int(11) not null auto_increment,
+`event` varchar(1024) not null,
+`description` varchar(1024) default null,
+`alarm` varchar(1024) not null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `gocrcalarm`
+--
+
+drop table if exists `gocrcalarm`;
+create table `gocrcalarm` (
+`id` int(11) not null auto_increment,
+`alarmname` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `gocserverscope`
+--
+
+drop table if exists `gocserverscope`;
+create table `gocserverscope` (
+`id` int(11) not null auto_increment,
+`serverscopename` varchar(1024) not null,
+`description` varchar(1024) default null,
+`serverscopeentry` varchar(1024) not null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `goctraversal`
+--
+
+drop table if exists `goctraversal`;
+create table `goctraversal` (
+`id` int(11) not null auto_increment,
+`traversal` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `gocvnftype`
+--
+
+drop table if exists `gocvnftype`;
+create table `gocvnftype` (
+`id` int(11) not null auto_increment,
+`vnfname` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `groupentity`
+--
+
+drop table if exists `groupentity`;
+create table `groupentity` (
+`groupkey` bigint(20) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`defaultgroup` tinyint(1) not null,
+`deleted` tinyint(1) not null,
+`description` varchar(2048) not null,
+`groupid` varchar(100) not null,
+`groupname` varchar(1024) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`version` int(11) default null,
+primary key (`groupkey`)
+);
+
+--
+-- Table structure for table `grouppolicyscopelist`
+--
+
+drop table if exists `grouppolicyscopelist`;
+create table `grouppolicyscopelist` (
+`id` int(11) not null auto_increment,
+`name` varchar(767) not null,
+`grouplist` varchar(767) default null,
+`description` varchar(1024) default null,
+primary key (`id`),
+unique key `name_uniq` (`name`),
+unique key `grouplist_unique` (`grouplist`)
+);
+
+--
+-- Table structure for table `groupservicelist`
+--
+
+drop table if exists `groupservicelist`;
+create table `groupservicelist` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) default null,
+`servicelist` varchar(1024) default null,
+primary key (`id`),
+key `idx_groupservicelist` (`id`)
+);
+
+--
+-- Temporary table structure for view `higherorder_bag_functions`
+--
+
+drop table if exists `higherorder_bag_functions`;
+drop view if exists `higherorder_bag_functions`;
+create table `higherorder_bag_functions` (
+`id` tinyint not null,
+`shortname` tinyint not null,
+`return_datatype` tinyint not null,
+`is_bag_return` tinyint not null,
+`is_higher_order` tinyint not null,
+`arg_lb` tinyint not null,
+`arg_ub` tinyint not null,
+`arg1_isbag` tinyint not null,
+`arg1_datatype` tinyint not null,
+`arg2_isbag` tinyint not null,
+`arg2_datatype` tinyint not null,
+`arg3_isbag` tinyint not null,
+`arg3_datatype` tinyint not null
+);
+
+--
+-- Table structure for table `hpeventsource`
+--
+
+drop table if exists `hpeventsource`;
+create table `hpeventsource` (
+`id` int(11) not null auto_increment,
+`eventsourcename` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `integrityauditentity`
+--
+
+drop table if exists `integrityauditentity`;
+create table `integrityauditentity` (
+`id` int(11) not null auto_increment,
+`persistenceunit` varchar(100) not null,
+`site` varchar(100) default null,
+`nodetype` varchar(100) default null,
+`resourcename` varchar(100) not null,
+`designated` tinyint(1) default '0',
+`jdbcdriver` varchar(100) not null,
+`jdbcurl` varchar(100) not null,
+`jdbcuser` varchar(30) not null,
+`jdbcpassword` varchar(30) not null,
+`createddate` timestamp not null default current_timestamp,
+`lastupdated` timestamp not null default '0000-00-00 00:00:00',
+primary key (`id`),
+unique key `resourcename_uniq` (`resourcename`)
+);
+
+--
+-- Temporary table structure for view `match_functions`
+--
+
+drop table if exists `match_functions`;
+drop view if exists `match_functions`;
+create table `match_functions` (
+`id` tinyint not null,
+`shortname` tinyint not null,
+`ecomp_sdkid` tinyint not null,
+`return_datatype` tinyint not null,
+`is_bag_return` tinyint not null,
+`arg_lb` tinyint not null,
+`arg_ub` tinyint not null,
+`arg1_isbag` tinyint not null,
+`arg1_datatype` tinyint not null,
+`arg2_isbag` tinyint not null,
+`arg2_datatype` tinyint not null
+);
+
+--
+-- Table structure for table `microserviceconfigname`
+--
+
+drop table if exists `microserviceconfigname`;
+create table `microserviceconfigname` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `microservicelocation`
+--
+
+drop table if exists `microservicelocation`;
+create table `microservicelocation` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `microservicemodels`
+--
+
+drop table if exists `microservicemodels`;
+create table `microservicemodels` (
+`id` int(11) not null auto_increment,
+`modelname` varchar(767) not null,
+`description` varchar(1024) default null,
+`dependency` varchar(1024) default null,
+`imported_by` varchar(45) not null,
+`attributes` longtext,
+`ref_attributes` longtext,
+`sub_attributes` longtext,
+`version` varchar(45) default null,
+primary key (`id`),
+unique key `microservicemodels_uniq` (`modelname`,`version`)
+);
+
+--
+-- Table structure for table `obadvice`
+--
+
+drop table if exists `obadvice`;
+create table `obadvice` (
+`id` int(11) not null,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`description` varchar(2048) default null,
+`fulfill_on` varchar(32) default null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`type` varchar(100) not null,
+`xacml_id` varchar(255) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `obadviceexpressions`
+--
+
+drop table if exists `obadviceexpressions`;
+create table `obadviceexpressions` (
+`id` int(11) not null,
+`type` varchar(100) not null,
+`obadvice_id` int(11) default null,
+`attribute_id` int(11) default null,
+primary key (`id`),
+key `fk_obadviceexpressions_obadvice_id` (`obadvice_id`),
+key `fk_obadviceexpressions_attribute_id` (`attribute_id`),
+constraint `fk_obadviceexpressions_attribute_id` foreign key (`attribute_id`) references `attribute` (`id`),
+constraint `fk_obadviceexpressions_obadvice_id` foreign key (`obadvice_id`) references `obadvice` (`id`)
+);
+
+--
+-- Table structure for table `parentdictionaryitems`
+--
+
+drop table if exists `parentdictionaryitems`;
+create table `parentdictionaryitems` (
+`id` int(11) not null auto_increment,
+`parentitemname` varchar(1024) default null,
+`description` varchar(1024) default null,
+`addresslist` varchar(1024) not null,
+`servicelist` varchar(1024) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `pdpentity`
+--
+
+drop table if exists `pdpentity`;
+create table `pdpentity` (
+`pdpkey` bigint(20) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`deleted` tinyint(1) not null,
+`description` varchar(2048) not null,
+`jmxport` int(11) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`pdpid` varchar(255) not null,
+`pdpname` varchar(255) not null,
+`groupkey` bigint(20) default null,
+primary key (`pdpkey`),
+key `fk_pdpentity_groupkey` (`groupkey`),
+constraint `fk_pdpentity_groupkey` foreign key (`groupkey`) references `groupentity` (`groupkey`)
+);
+
+--
+-- Table structure for table `pepoptions`
+--
+
+drop table if exists `pepoptions`;
+create table `pepoptions` (
+`id` int(11) not null auto_increment,
+`pep_name` varchar(1024) not null,
+`description` varchar(1024) default null,
+`actions` varchar(1024) not null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `pipconfigparams`
+--
+
+drop table if exists `pipconfigparams`;
+create table `pipconfigparams` (
+`id` int(11) not null,
+`param_default` varchar(2048) default null,
+`param_name` varchar(1024) not null,
+`param_value` varchar(2048) not null,
+`required` char(1) not null,
+`pip_id` int(11) default null,
+primary key (`id`),
+key `fk_pipconfigparams_pip_id` (`pip_id`),
+constraint `fk_pipconfigparams_pip_id` foreign key (`pip_id`) references `pipconfiguration` (`id`)
+);
+
+--
+-- Table structure for table `pipconfiguration`
+--
+
+drop table if exists `pipconfiguration`;
+create table `pipconfiguration` (
+`id` int(11) not null,
+`classname` varchar(2048) not null,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`description` varchar(2048) default null,
+`issuer` varchar(1024) default null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`name` varchar(255) not null,
+`read_only` char(1) not null,
+`requires_resolver` char(1) not null,
+`type` int(11) default null,
+primary key (`id`),
+key `fk_pipconfiguration_type` (`type`),
+constraint `fk_pipconfiguration_type` foreign key (`type`) references `piptype` (`id`)
+);
+
+--
+-- Table structure for table `pipresolver`
+--
+
+drop table if exists `pipresolver`;
+create table `pipresolver` (
+`id` int(11) not null,
+`classname` varchar(2048) not null,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`description` varchar(2048) default null,
+`issuer` varchar(1024) default null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`name` varchar(255) not null,
+`read_only` char(1) not null,
+`pip_id` int(11) default null,
+primary key (`id`),
+key `fk_pipresolver_pip_id` (`pip_id`),
+constraint `fk_pipresolver_pip_id` foreign key (`pip_id`) references `pipconfiguration` (`id`)
+);
+
+--
+-- Table structure for table `pipresolverparams`
+--
+
+drop table if exists `pipresolverparams`;
+create table `pipresolverparams` (
+`id` int(11) not null,
+`param_default` varchar(2048) default null,
+`param_name` varchar(1024) not null,
+`param_value` varchar(2048) not null,
+`required` char(1) not null,
+`id_resolver` int(11) default null,
+primary key (`id`),
+key `fk_pipresolverparams_id_resolver` (`id_resolver`),
+constraint `fk_pipresolverparams_id_resolver` foreign key (`id_resolver`) references `pipresolver` (`id`)
+);
+
+--
+-- Table structure for table `piptype`
+--
+
+drop table if exists `piptype`;
+create table `piptype` (
+`id` int(11) not null,
+`type` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policy_management`
+--
+
+drop table if exists `policy_management`;
+create table `policy_management` (
+`id` int(11) not null,
+`config_name` varchar(1024) not null,
+`create_date_time` timestamp not null default current_timestamp on update current_timestamp,
+`creted_by` varchar(45) not null,
+`ecomp_name` varchar(1024) not null,
+`policy_name` varchar(1024) not null,
+`scope` varchar(1024) not null,
+`update_date_time` timestamp not null default '0000-00-00 00:00:00',
+`updated_by` varchar(45) not null,
+`xml` text not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policy_manangement`
+--
+
+drop table if exists `policy_manangement`;
+create table `policy_manangement` (
+`id` int(11) not null,
+`config_name` varchar(1024) not null,
+`create_date_time` timestamp not null default current_timestamp on update current_timestamp,
+`created_by` varchar(45) not null,
+`ecomp_name` varchar(1024) not null,
+`policy_name` varchar(1024) not null,
+`scope` varchar(1024) not null,
+`update_date_time` timestamp not null default '0000-00-00 00:00:00',
+`updated_by` varchar(45) not null,
+`xml` text not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyalgorithms`
+--
+
+drop table if exists `policyalgorithms`;
+create table `policyalgorithms` (
+`id` int(11) not null,
+`is_standard` char(1) not null,
+`short_name` varchar(64) not null,
+`xacml_id` varchar(255) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policydbdaoentity`
+--
+
+drop table if exists `policydbdaoentity`;
+create table `policydbdaoentity` (
+`policydbdaourl` varchar(500) not null,
+`created_date` timestamp not null default current_timestamp,
+`description` varchar(2048) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`password` varchar(100) default null,
+`username` varchar(100) default null,
+primary key (`policydbdaourl`)
+);
+
+--
+-- Table structure for table `policyeditorscopes`
+--
+
+drop table if exists `policyeditorscopes`;
+create table `policyeditorscopes` (
+`id` int(45) not null auto_increment,
+`scopename` varchar(1024) not null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyentity`
+--
+
+drop table if exists `policyentity`;
+create table `policyentity` (
+`policyid` bigint(20) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`deleted` tinyint(1) not null,
+`description` varchar(2048) not null,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`policydata` text,
+`policyname` varchar(255) not null,
+`policyversion` int(11) default null,
+`scope` varchar(255) not null,
+`version` int(11) default null,
+`actionbodyid` bigint(20) default null,
+`configurationdataid` bigint(20) default null,
+primary key (`policyid`),
+unique key `unq_policyentity_0` (`policyname`,`scope`),
+key `scope` (`scope`),
+key `policyname` (`policyname`),
+key `fk_policyentity_configurationdataid` (`configurationdataid`),
+key `fk_policyentity_actionbodyid` (`actionbodyid`),
+constraint `fk_policyentity_actionbodyid` foreign key (`actionbodyid`) references `actionbodyentity` (`actionbodyid`),
+constraint `fk_policyentity_configurationdataid` foreign key (`configurationdataid`) references `configurationdataentity` (`configurationdataid`)
+);
+
+--
+-- Table structure for table `policygroupentity`
+--
+
+drop table if exists `policygroupentity`;
+create table `policygroupentity` (
+`groupkey` bigint(20) not null auto_increment,
+`policyid` bigint(20) not null,
+primary key (`groupkey`,`policyid`),
+key `fk_policygroupentity_policyid` (`policyid`),
+constraint `fk_policygroupentity_groupkey` foreign key (`groupkey`) references `groupentity` (`groupkey`),
+constraint `fk_policygroupentity_policyid` foreign key (`policyid`) references `policyentity` (`policyid`)
+);
+
+--
+-- Table structure for table `policyscopeclosedloop`
+--
+
+drop table if exists `policyscopeclosedloop`;
+create table `policyscopeclosedloop` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyscoperesource`
+--
+
+drop table if exists `policyscoperesource`;
+create table `policyscoperesource` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyscopeservice`
+--
+
+drop table if exists `policyscopeservice`;
+create table `policyscopeservice` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyscopetype`
+--
+
+drop table if exists `policyscopetype`;
+create table `policyscopetype` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyscore`
+--
+
+drop table if exists `policyscore`;
+create table `policyscore` (
+`id` int(11) not null,
+`policy_name` varchar(1024) not null,
+`versionextension` varchar(45) default null,
+`policy_score` varchar(45) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `policyversion`
+--
+
+drop table if exists `policyversion`;
+create table `policyversion` (
+`id` int(11) not null auto_increment,
+`policy_name` varchar(1024) not null,
+`active_version` int(11) default null,
+`highest_version` int(11) default null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `portlist`
+--
+
+drop table if exists `portlist`;
+create table `portlist` (
+`id` int(11) not null auto_increment,
+`portname` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `prefixlist`
+--
+
+drop table if exists `prefixlist`;
+create table `prefixlist` (
+`id` int(11) not null auto_increment,
+`pl_name` varchar(1024) not null,
+`pl_value` varchar(1024) default null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `protocollist`
+--
+
+drop table if exists `protocollist`;
+create table `protocollist` (
+`id` int(11) not null auto_increment,
+`protocolname` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `rcloudinvocation`
+--
+
+drop table if exists `rcloudinvocation`;
+create table `rcloudinvocation` (
+`id` varchar(128) not null,
+`created` timestamp not null default current_timestamp on update current_timestamp,
+`userinfo` varchar(2048) not null,
+`notebookid` varchar(128) not null,
+`parameters` varchar(2048) default null,
+`tokenreaddate` timestamp null default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `rcloudnotebook`
+--
+
+drop table if exists `rcloudnotebook`;
+create table `rcloudnotebook` (
+`notebookname` varchar(128) not null,
+`notebookid` varchar(128) not null,
+primary key (`notebookname`)
+);
+
+--
+-- Table structure for table `remotecatalogvalues`
+--
+
+drop table if exists `remotecatalogvalues`;
+create table `remotecatalogvalues` (
+`id` int(11) not null,
+`name` varchar(75) not null,
+`value` longtext,
+primary key (`name`)
+);
+
+--
+-- Table structure for table `resourceregistrationentity`
+--
+
+drop table if exists `resourceregistrationentity`;
+create table `resourceregistrationentity` (
+`resourceregistrationid` bigint(20) not null auto_increment,
+`resourcename` varchar(100) not null,
+`resourceurl` varchar(255) not null,
+`site` varchar(50) default null,
+`nodetype` varchar(50) default null,
+`created_date` timestamp not null default current_timestamp,
+`last_updated` timestamp not null default '0000-00-00 00:00:00',
+primary key (`resourceregistrationid`),
+unique key `resource` (`resourcename`),
+unique key `id_resource_url` (`resourceurl`)
+);
+
+--
+-- Table structure for table `risktype`
+--
+
+drop table if exists `risktype`;
+create table `risktype` (
+`id` int(11) not null auto_increment,
+`created_by` varchar(255) default null,
+`created_date` timestamp not null default current_timestamp on update current_timestamp,
+`description` varchar(2048) default null,
+`name` varchar(767) default null,
+`modified_by` varchar(255) default null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+primary key (`id`),
+unique key `name` (`name`)
+);
+
+--
+-- Table structure for table `roles`
+--
+
+drop table if exists `roles`;
+create table `roles` (
+`id` int(11) not null auto_increment,
+`loginid` varchar(1024) not null,
+`role` varchar(1024) not null,
+`scope` varchar(1024) default null,
+`name` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `rulealgorithms`
+--
+
+drop table if exists `rulealgorithms`;
+create table `rulealgorithms` (
+`id` int(11) not null,
+`is_standard` char(1) not null,
+`short_name` varchar(64) not null,
+`xacml_id` varchar(255) not null,
+primary key (`id`),
+unique key `xacml_id` (`xacml_id`)
+);
+
+--
+-- Table structure for table `safepolicywarning`
+--
+
+drop table if exists `safepolicywarning`;
+create table `safepolicywarning` (
+`id` int(11) not null auto_increment,
+`message` varchar(2048) default null,
+`risktype` varchar(2048) default null,
+`name` varchar(767) not null,
+primary key (`id`),
+unique key `name` (`name`)
+);
+
+--
+-- Table structure for table `schema_info`
+--
+
+drop table if exists `schema_info`;
+create table `schema_info` (
+`schema_id` varchar(25) not null,
+`schema_desc` varchar(75) not null,
+`datasource_type` varchar(100) default null,
+`connection_url` varchar(200) not null,
+`user_name` varchar(45) not null,
+`password` varchar(45) default null,
+`driver_class` varchar(100) not null,
+`min_pool_size` int(11) not null,
+`max_pool_size` int(11) not null,
+`idle_connection_test_period` int(11) not null
+);
+
+--
+-- Table structure for table `scope`
+--
+
+drop table if exists `scope`;
+create table `scope` (
+`scopeid` bigint(20) not null auto_increment,
+`parentscope` bigint(20) default null,
+`scopename` varchar(1024) not null,
+primary key (`scopeid`),
+key `parentscope` (`parentscope`)
+);
+
+--
+-- Table structure for table `scopes`
+--
+
+drop table if exists `scopes`;
+create table `scopes` (
+`id` int(11) not null auto_increment,
+`scope` varchar(1024) not null,
+`parent_scope` int(11) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `securityzone`
+--
+
+drop table if exists `securityzone`;
+create table `securityzone` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) default null,
+`value` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `sequence`
+--
+
+drop table if exists `sequence`;
+create table `sequence` (
+`seq_name` varchar(50) not null,
+`seq_count` decimal(38,0) default null,
+primary key (`seq_name`)
+);
+
+--
+-- Table structure for table `servicegroup`
+--
+
+drop table if exists `servicegroup`;
+create table `servicegroup` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) default null,
+`type` varchar(1024) default null,
+`transportprotocol` varchar(1024) default null,
+`appprotocol` varchar(1024) default null,
+`ports` varchar(1024) default null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `statemanagemententity`
+--
+
+drop table if exists `statemanagemententity`;
+create table `statemanagemententity` (
+`id` int(11) not null auto_increment,
+`resourcename` varchar(100) not null,
+`adminstate` varchar(20) not null,
+`opstate` varchar(20) not null,
+`availstatus` varchar(20) default null,
+`standbystatus` varchar(20) default null,
+`created_date` timestamp not null default current_timestamp,
+`modifieddate` timestamp not null default '0000-00-00 00:00:00',
+primary key (`id`),
+unique key `resource` (`resourcename`)
+);
+
+--
+-- Table structure for table `term`
+--
+
+drop table if exists `term`;
+create table `term` (
+`id` int(11) not null auto_increment,
+`termname` varchar(1024) not null,
+`fromzone` varchar(1024) default null,
+`tozone` varchar(1024) default null,
+`srciplist` varchar(1024) default null,
+`destiplist` varchar(1024) default null,
+`protocollist` varchar(1024) default null,
+`portlist` varchar(1024) default null,
+`srcportlist` varchar(1024) default null,
+`destportlist` varchar(1024) default null,
+`action` varchar(1024) default null,
+`description` varchar(1024) default null,
+`created_by` varchar(100) default null,
+`created_date` timestamp not null default current_timestamp,
+`modified_by` varchar(100) default null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+primary key (`id`)
+);
+
+--
+-- Table structure for table `userinfo`
+--
+
+drop table if exists `userinfo`;
+create table `userinfo` (
+`loginid` varchar(767) not null,
+`name` varchar(1024) not null,
+primary key (`loginid`)
+);
+
+
+--
+-- Temporary table structure for view `v_url_access`
+--
+
+drop table if exists `v_url_access`;
+drop view if exists `v_url_access`;
+create table `v_url_access` (
+`url` tinyint not null,
+`function_cd` tinyint not null
+);
+
+--
+-- Table structure for table `varbinddictionary`
+--
+
+drop table if exists `varbinddictionary`;
+create table `varbinddictionary` (
+`id` int(11) not null auto_increment,
+`created_by` varchar(255) not null,
+`created_date` timestamp not null default current_timestamp,
+`modified_by` varchar(255) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`varbind_description` varchar(2048) default null,
+`varbind_name` varchar(767) not null,
+`varbind_oid` varchar(1024) not null,
+primary key (`id`),
+unique key `varbind_name` (`varbind_name`)
+);
+
+--
+-- Table structure for table `vmtype`
+--
+
+drop table if exists `vmtype`;
+create table `vmtype` (
+`id` int(11) not null auto_increment,
+`name` varchar(1024) not null,
+`description` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `vnftype`
+--
+
+drop table if exists `vnftype`;
+create table `vnftype` (
+`id` int(11) not null auto_increment,
+`vnf_type` varchar(1024) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `vsclaction`
+--
+
+drop table if exists `vsclaction`;
+create table `vsclaction` (
+`id` int(11) not null auto_increment,
+`vscl_action` varchar(767) not null,
+`description` varchar(1024) default null,
+`created_date` timestamp not null default current_timestamp,
+`created_by` varchar(45) not null,
+`modified_date` timestamp not null default '0000-00-00 00:00:00',
+`modified_by` varchar(45) not null,
+primary key (`id`),
+unique key `vsclaction_vscl_action_unique` (`vscl_action`)
+);
+
+--
+-- Table structure for table `watchpolicynotificationtable`
+--
+
+drop table if exists `watchpolicynotificationtable`;
+create table `watchpolicynotificationtable` (
+`id` int(45) not null auto_increment,
+`policyname` text not null,
+`loginids` varchar(45) not null,
+primary key (`id`)
+);
+
+--
+-- Table structure for table `zone`
+--
+
+drop table if exists `zone`;
+create table `zone` (
+`id` int(11) not null auto_increment,
+`zonename` varchar(1024) not null,
+`zonevalue` varchar(1024) default null,
+primary key (`id`)
+);
+
+--
+-- Current Database: `ecomp_sdk`
+--
+
+use `ecomp_sdk`;
+
+--
+-- Final view structure for view `function_flattener`
+--
+
+drop table if exists `function_flattener`;
+drop view if exists `function_flattener`;
+create view `function_flattener` as select `d`.`id` as `id`,`d`.`short_name` as `shortname`,`d`.`return_datatype` as `return_datatype`,`d`.`is_bag_return` as `is_bag_return`,`d`.`is_higher_order` as `is_higher_order`,`d`.`arg_lb` as `arg_lb`,`d`.`arg_ub` as `arg_ub`,`a1`.`is_bag` as `arg1_isbag`,`a1`.`datatype_id` as `arg1_datatype`,`a2`.`is_bag` as `arg2_isbag`,`a2`.`datatype_id` as `arg2_datatype`,`a3`.`is_bag` as `arg3_isbag`,`a3`.`datatype_id` as `arg3_datatype` from (((`functiondefinition` `d` left join `functionarguments` `a1` on(((`a1`.`function_id` = `d`.`id`) and (`a1`.`arg_index` = 1)))) left join `functionarguments` `a2` on(((`a2`.`function_id` = `d`.`id`) and (`a2`.`arg_index` = 2)))) left join `functionarguments` `a3` on(((`a3`.`function_id` = `d`.`id`) and (`a3`.`arg_index` = 3)))) order by `d`.`id`;
+
+--
+-- Final view structure for view `higherorder_bag_functions`
+--
+
+drop table if exists `higherorder_bag_functions`;
+drop view if exists `higherorder_bag_functions`;
+create view `higherorder_bag_functions` as select `function_flattener`.`id` as `id`,`function_flattener`.`shortname` as `shortname`,`function_flattener`.`return_datatype` as `return_datatype`,`function_flattener`.`is_bag_return` as `is_bag_return`,`function_flattener`.`is_higher_order` as `is_higher_order`,`function_flattener`.`arg_lb` as `arg_lb`,`function_flattener`.`arg_ub` as `arg_ub`,`function_flattener`.`arg1_isbag` as `arg1_isbag`,`function_flattener`.`arg1_datatype` as `arg1_datatype`,`function_flattener`.`arg2_isbag` as `arg2_isbag`,`function_flattener`.`arg2_datatype` as `arg2_datatype`,`function_flattener`.`arg3_isbag` as `arg3_isbag`,`function_flattener`.`arg3_datatype` as `arg3_datatype` from `function_flattener` where ((`function_flattener`.`is_higher_order` = 1) and (`function_flattener`.`is_bag_return` = 1) and (`function_flattener`.`return_datatype` = 18) and (`function_flattener`.`arg_lb` = 2) and (`function_flattener`.`arg_ub` = 2) and (`function_flattener`.`arg1_isbag` = 1) and ((`function_flattener`.`arg2_isbag` = 1) or isnull(`function_flattener`.`arg2_isbag`)));
+
+--
+-- Final view structure for view `match_functions`
+--
+
+drop table if exists `match_functions`;
+drop view if exists `match_functions`;
+create view `match_functions` as select `d`.`id` as `id`,`d`.`short_name` as `shortname`,`d`.`xacml_id` as `ecomp_sdkid`,`d`.`return_datatype` as `return_datatype`,`d`.`is_bag_return` as `is_bag_return`,`d`.`arg_lb` as `arg_lb`,`d`.`arg_ub` as `arg_ub`,`a1`.`is_bag` as `arg1_isbag`,`a1`.`datatype_id` as `arg1_datatype`,`a2`.`is_bag` as `arg2_isbag`,`a2`.`datatype_id` as `arg2_datatype` from ((`functiondefinition` `d` left join `functionarguments` `a1` on(((`a1`.`function_id` = `d`.`id`) and (`a1`.`arg_index` = 1)))) left join `functionarguments` `a2` on(((`a2`.`function_id` = `d`.`id`) and (`a2`.`arg_index` = 2)))) where ((`d`.`arg_lb` = 2) and (`d`.`arg_ub` = 2) and (`d`.`return_datatype` = 18) and (`a1`.`is_bag` = 0)) order by `d`.`short_name`;
+
+--
+-- Final view structure for view `v_url_access`
+--
+
+drop table if exists `v_url_access`;
+drop view if exists `v_url_access`;
+create view `v_url_access` as select distinct `m`.`action` as `url`,`m`.`function_cd` as `function_cd` from `fn_menu` `m` where (`m`.`action` is not null) union select distinct `t`.`action` as `url`,`t`.`function_cd` as `function_cd` from `fn_tab` `t` where (`t`.`action` is not null) union select `r`.`restricted_url` as `url`,`r`.`function_cd` as `function_cd` from `fn_restricted_url` `r`;
+
+CREATE DATABASE IF NOT EXISTS `log`;
+
+USE `log`;
+
+--
+-- Table structure for table `systemlogdb`
+--
+
+drop table if exists `systemlogdb`;
+create table `systemlogdb` (
+`id` int(11) not null auto_increment,
+`system` varchar(255) not null,
+`description` varchar(2048) default null,
+`remote` varchar(255) not null,
+`type` varchar(10) not null,
+`date` timestamp not null default current_timestamp on update current_timestamp,
+`logtype` varchar(255) not null,
+primary key (`id`)
+);
+
+--
+-- This is for the default data for 1610 Version of SDK database for Open Source called ecomp_sdk
+--
+
+USE ecomp_sdk;
+
+-- fn_function
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_process','Process List');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('1','test role function');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job','Job Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_create','Job Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_designer','Process in Designer view');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task','Task Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task_search','Task Search');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_map','Map Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_sample','Sample Pages Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_test','Test Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('login','Login');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_home','Home Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer','Customer Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_reports','Reports Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile','Profile Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_admin','Admin Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_feedback','Feedback Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_help','Help Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_logout','Logout Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_doclib','Document Library Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib','Document Library');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('doclib_admin','Document Library Admin');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_notes','Notes Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_ajax','Ajax Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer_create','Customer Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_create','Profile Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_import','Profile Import');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_tab','Sample Tab Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_concept','CoNCEPT');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker','iTracker Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('view_reports','View Raptor reports');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_itracker_admin','Itracker Admin/Support menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_policy','Policy');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_admin','Policy Admin');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_dashboard','Policy Dashboard');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_dictionary','Policy Dictionary');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_editor','Policy Editor');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_push','Policy Push');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_roles','Policy Roles');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('policy_pdp','Policy PDP');
+
+-- fn_lu_activity
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role','add_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role','remove_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_user_role','add_user_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_user_role','remove_user_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role_function','add_role_function');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role_function','remove_role_function');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_child_role','add_child_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_child_role','remove_child_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_login','Mobile Login');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_logout','Mobile Logout');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('login','Login');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('logout','Logout');
+
+-- fn_lu_alert_method
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PHONE','Phone');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('FAX','Fax');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PAGER','Pager');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('EMAIL','Email');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('SMS','SMS');
+
+-- fn_lu_menu_set
+Insert into fn_lu_menu_set (MENU_SET_CD,MENU_SET_NAME) values ('APP','Application Menu');
+
+-- fn_lu_priority
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (10,'Low','Y',10);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (20,'Normal','Y',20);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (30,'High','Y',30);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (40,'Urgent','Y',40);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (50,'Fatal','Y',50);
+
+-- fn_lu_tab_set
+Insert into fn_lu_tab_set (TAB_SET_CD,TAB_SET_NAME) values ('APP','Application Tabs');
+
+-- fn_lu_timezone
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (10,'US/Eastern','US/Eastern');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (20,'US/Central','US/Central');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (30,'US/Mountain','US/Mountain');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (40,'US/Arizona','America/Phoenix');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (50,'US/Pacific','US/Pacific');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (60,'US/Alaska','US/Alaska');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (70,'US/Hawaii','US/Hawaii');
+
+-- fn_menu
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (1, 'Root', NULL, 10, NULL, 'menu_home', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL); -- we need even though it's inactive
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (5000, 'Sample Pages', 1, 30, 'sample.htm', 'menu_sample', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-android-apps');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (2, 'Home', 1, 10, 'welcome.htm', 'menu_home', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-home');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (8, 'Reports', 1, 40, 'report.htm', 'menu_reports', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-ios-paper');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (9, 'Profile', 1, 90, 'userProfile', 'menu_profile', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-person');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (10, 'Admin', 1, 110, 'role_list.htm', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-gear-a');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (13, 'Application Logout', 1, 130, 'app_logout.htm', 'menu_logout', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', 'ion-android-exit');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (84, 'All Reports', 8, 50, 'report', 'menu_reports', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) values (87, 'Create Reports', 8, 120, 'report_wizard.htm?r_action=report.create', 'menu_reports', 'N', NULL, 'r_action=report.create', NULL, NULL, 'APP', 'N', NULL);
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) values (88, 'Sample Dashboard', 8, 130, 'report_sample', 'menu_reports', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL);
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (92, 'Import User', 9, 30, 'userProfile#/post_search', 'menu_profile_import', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL);
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (94, 'Self', 9, 40, 'userProfile#/self_profile', 'menu_profile', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/profile.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (101, 'Roles', 10, 20, 'admin', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/users.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (102, 'Role Functions', 10, 30, 'admin#/role_function_list', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL);
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (103, 'Broadcast Messages', 10, 50, 'admin#/broadcast_list', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/bubble.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (105, 'Cache Admin', 10, 40, 'admin#/jcs_admin', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/cache.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (108, 'Usage', 10, 80, 'admin#/usage_list', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/users.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (121, 'Collaboration', 5000, 100, 'collaborate_list.htm', 'menu_sample', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/bubble.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (930, 'Search', 9, 15, 'userProfile', 'menu_admin', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/search_profile.png');
+INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (150038,'Notebook',5000,135,'notebook.htm','menu_sample','N',NULL,NULL,NULL,NULL,'APP','N',NULL);
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150004', 'Policy', '1', '1000', 'menu_policy', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150005', 'Editor', '150004', '1000', 'policy#/Editor', 'policy_editor', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150006', 'Dictionary', '150004', '1000', 'policy#/Dictionary', 'policy_dictionary', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150007', 'PDP', '150004', '1000', 'policy#/Pdp', 'policy_pdp', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150008', 'Push', '150004', '1000', 'policy#/Push', 'policy_push', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150009', 'Roles', '150004', '1000', 'policy#/Roles', 'policy_roles', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150010', 'Admin', '150004', '1000', 'policy#/Admin', 'policy_admin', 'Y', 'APP', 'N');
+INSERT INTO `ecomp_sdk`.`fn_menu` (`menu_id`, `label`, `parent_id`, `sort_order`, `action`, `function_cd`, `active_yn`, `menu_set_cd`, `separator_yn`) VALUES ('150011', 'Dashboard', '150004', '1000', 'policy#/Dashboard', 'policy_dashboard', 'Y', 'APP', 'N');
+
+-- fn_restricted_url
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('attachment.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('broadcast.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('file_upload.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('job.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('role.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('role_function.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('test.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('async_test.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('chatWindow.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('contact_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('customer_dynamic_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('event.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('event_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('mobile_welcome.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('template.jsp','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('zkau','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('itracker_assign.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('itracker_byassignee.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('itracker_create.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('itracker_update.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('manage_license.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('support_ticket.htm','menu_itracker');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('jbpm_designer.htm','menu_job_create'); -- check
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('jbpm_drools.htm','menu_job_create'); -- check
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('process_job.htm','menu_job_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('profile.htm','menu_profile_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor2.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_blob_extract.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_email_attachment.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_search.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('report_list.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gauge.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gmap_controller.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gmap_frame.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map_download.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map_grid_search.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_animated_map.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map_2.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map_3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub1.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub2_link1.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub2_link2.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab4.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor.htm','view_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_blob_extract.htm','view_reports');
+
+-- fn_role
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (16,'Standard User','Y',5);
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (1,'System Administrator','Y',1);
+
+-- fn_role_composite
+Insert into fn_role_composite (PARENT_ROLE_ID,CHILD_ROLE_ID) values (1,16);
+
+-- fn_role_function
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'doclib');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'doclib_admin');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'login');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_admin');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_ajax');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_feedback');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_help');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_home');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_itracker');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_itracker_admin');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_logout');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_notes');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_process');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_import');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_reports');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_sample');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_tab');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_test');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'login');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_ajax');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_home');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_itracker');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_logout');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_map');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_profile');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_reports');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_tab');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_policy');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_admin');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_dashboard');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_editor');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_roles');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_pdp');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_dictionary');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'policy_push');
+
+
+-- fn_tab
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1_S1','Left Tab 1','Sub - Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2_SUB1','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB1','Tab 1','Tab 1 Information','tab1.htm','menu_tab','Y',10,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2','Tab 2','Tab 2 Information','tab2_sub1.htm','menu_tab','Y',20,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB3','Tab 3','Tab 3 Information','tab3.htm','menu_tab','Y',30,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB4','Tab 4','Tab 4 Information','tab4.htm','menu_tab','Y',40,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1','Sub Tab 1','Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB2','Sub Tab 2','Sub Tab 2 Information','tab2_sub2.htm','menu_tab','Y',20,'TAB2','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB3','Sub Tab 3','Sub Tab 3 Information','tab2_sub3.htm','menu_tab','Y',30,'TAB2','APP');
+
+-- fn_tab_selected
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB1','tab1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub2');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1_S1','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB2','tab2_sub2');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB3','tab2_sub3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB3','tab3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB4','tab4');
+
+-- fn_user
+Insert into fn_user (USER_ID,ORG_ID,MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (1,null,null,'Demo',null,'User',null,null,null,null,null,null,null,'demo',null,'demo','demo',str_to_date('24-OCT-16','%d-%M-%Y'),'Y',null,str_to_date('17-OCT-16','%d-%M-%Y'),1,str_to_date('24-OCT-16','%d-%M-%Y'),'N',null,null,null,'NJ',null,'US',null,null,null,null,null,10,null,null,null,null,null,null);
+
+-- cr_raptor_action_img
+Insert into cr_raptor_action_img (IMAGE_ID, IMAGE_LOC) Values ('DELETE', '/static/fusion/raptor/img/deleteicon.gif');
+Insert into cr_raptor_action_img (IMAGE_ID, IMAGE_LOC) Values ('CALENDAR', '/static/fusion/raptor/img/Calendar-16x16.png');
+
+-- fn_app
+Insert into fn_app (APP_ID,APP_NAME,APP_IMAGE_URL,APP_DESCRIPTION,APP_NOTES,APP_URL,APP_ALTERNATE_URL,APP_REST_ENDPOINT,ML_APP_NAME,ML_APP_ADMIN_ID,MOTS_ID,APP_PASSWORD,OPEN,ENABLED,THUMBNAIL,APP_USERNAME,UEB_KEY,UEB_SECRET,UEB_TOPIC_NAME) VALUES (1,'Default',null,'Some Default Description','Some Default Note',null,null,null,'ECPP','?','1','okYTaDrhzibcbGVq5mjkVQ==','N','N',null,'Default',null,null,'ECOMP-PORTAL-INBOX');
+
+-- fn_user_role
+Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1,null,1);
+
+-- DEMO_BAR_CHART
+Insert into demo_bar_chart (label, value) values ('A', 29.765957771107);
+Insert into demo_bar_chart (label, value) values ('B', 0);
+Insert into demo_bar_chart (label, value) values ('C', 32.807804682612);
+Insert into demo_bar_chart (label, value) values ('D', 196.45946739256);
+Insert into demo_bar_chart (label, value) values ('E', 0.19434030906893);
+Insert into demo_bar_chart (label, value) values ('F', 98.079782601442);
+Insert into demo_bar_chart (label, value) values ('G', 13.925743130903);
+Insert into demo_bar_chart (label, value) values ('H', 5.1387322875705);
+
+-- DEMO_BAR_CHART_INTER
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('6-Mar-13','%e-%b-%y'), 198, 220);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('5-Mar-13','%e-%b-%y'), 198, 220);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('4-Mar-13','%e-%b-%y'), 238, 235);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('3-Mar-13','%e-%b-%y'), 238, 235);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('2-Mar-13','%e-%b-%y'), 256, 275);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('1-Mar-13','%e-%b-%y'), 239, 260);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('28-Feb-13','%e-%b-%y'), 247, 255);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('27-Feb-13','%e-%b-%y'), 252, 265);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('26-Feb-13','%e-%b-%y'), 198, 220);
+
+-- DEMO_LINE_CHART
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-May-12','%e-%b-%y'),582.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Apr-12','%e-%b-%y'),583.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Apr-12','%e-%b-%y'),603);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Apr-12','%e-%b-%y'),607.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Apr-12','%e-%b-%y'),610);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Apr-12','%e-%b-%y'),560.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Apr-12','%e-%b-%y'),571.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Apr-12','%e-%b-%y'),572.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Apr-12','%e-%b-%y'),587.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Apr-12','%e-%b-%y'),608.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Apr-12','%e-%b-%y'),609.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Apr-12','%e-%b-%y'),580.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Apr-12','%e-%b-%y'),605.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Apr-12','%e-%b-%y'),622.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Apr-12','%e-%b-%y'),626.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Apr-12','%e-%b-%y'),628.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Apr-12','%e-%b-%y'),636.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Apr-12','%e-%b-%y'),633.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Apr-12','%e-%b-%y'),624.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-12','%e-%b-%y'),629.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Apr-12','%e-%b-%y'),618.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-12','%e-%b-%y'),599.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Mar-12','%e-%b-%y'),609.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Mar-12','%e-%b-%y'),617.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Mar-12','%e-%b-%y'),614.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-12','%e-%b-%y'),606.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-12','%e-%b-%y'),596.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Mar-12','%e-%b-%y'),599.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Mar-12','%e-%b-%y'),602.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Mar-12','%e-%b-%y'),605.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-12','%e-%b-%y'),601.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-12','%e-%b-%y'),585.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Mar-12','%e-%b-%y'),585.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Mar-12','%e-%b-%y'),589.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Mar-12','%e-%b-%y'),568.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-12','%e-%b-%y'),552);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-12','%e-%b-%y'),545.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Mar-12','%e-%b-%y'),541.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Mar-12','%e-%b-%y'),530.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Mar-12','%e-%b-%y'),530.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Mar-12','%e-%b-%y'),533.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-12','%e-%b-%y'),545.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Mar-12','%e-%b-%y'),544.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Feb-12','%e-%b-%y'),542.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Feb-12','%e-%b-%y'),535.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Feb-12','%e-%b-%y'),525.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Feb-12','%e-%b-%y'),522.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Feb-12','%e-%b-%y'),516.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Feb-12','%e-%b-%y'),513.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Feb-12','%e-%b-%y'),514.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-12','%e-%b-%y'),502.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-12','%e-%b-%y'),502.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-12','%e-%b-%y'),497.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Feb-12','%e-%b-%y'),509.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Feb-12','%e-%b-%y'),502.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-12','%e-%b-%y'),493.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-12','%e-%b-%y'),493.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-12','%e-%b-%y'),476.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Feb-12','%e-%b-%y'),468.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Feb-12','%e-%b-%y'),463.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-12','%e-%b-%y'),459.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-12','%e-%b-%y'),455.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-12','%e-%b-%y'),456.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jan-12','%e-%b-%y'),456.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jan-12','%e-%b-%y'),453.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-12','%e-%b-%y'),447.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-12','%e-%b-%y'),444.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-12','%e-%b-%y'),446.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jan-12','%e-%b-%y'),420.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jan-12','%e-%b-%y'),427.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-12','%e-%b-%y'),420.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-12','%e-%b-%y'),427.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-12','%e-%b-%y'),429.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jan-12','%e-%b-%y'),424.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jan-12','%e-%b-%y'),419.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jan-12','%e-%b-%y'),421.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jan-12','%e-%b-%y'),422.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jan-12','%e-%b-%y'),423.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Jan-12','%e-%b-%y'),421.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jan-12','%e-%b-%y'),422.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jan-12','%e-%b-%y'),418.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jan-12','%e-%b-%y'),413.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jan-12','%e-%b-%y'),411.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-11','%e-%b-%y'),405);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Dec-11','%e-%b-%y'),405.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Dec-11','%e-%b-%y'),402.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Dec-11','%e-%b-%y'),406.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Dec-11','%e-%b-%y'),403.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Dec-11','%e-%b-%y'),398.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Dec-11','%e-%b-%y'),396.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Dec-11','%e-%b-%y'),395.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Dec-11','%e-%b-%y'),382.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Dec-11','%e-%b-%y'),381.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Dec-11','%e-%b-%y'),378.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Dec-11','%e-%b-%y'),380.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Dec-11','%e-%b-%y'),388.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Dec-11','%e-%b-%y'),391.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Dec-11','%e-%b-%y'),393.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Dec-11','%e-%b-%y'),390.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Dec-11','%e-%b-%y'),389.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Dec-11','%e-%b-%y'),390.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Dec-11','%e-%b-%y'),393.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Dec-11','%e-%b-%y'),389.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Dec-11','%e-%b-%y'),387.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Nov-11','%e-%b-%y'),382.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Nov-11','%e-%b-%y'),373.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Nov-11','%e-%b-%y'),376.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Nov-11','%e-%b-%y'),363.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Nov-11','%e-%b-%y'),366.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Nov-11','%e-%b-%y'),376.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Nov-11','%e-%b-%y'),369.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-11','%e-%b-%y'),374.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Nov-11','%e-%b-%y'),377.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Nov-11','%e-%b-%y'),384.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Nov-11','%e-%b-%y'),388.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Nov-11','%e-%b-%y'),379.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Nov-11','%e-%b-%y'),384.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-11','%e-%b-%y'),385.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Nov-11','%e-%b-%y'),395.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Nov-11','%e-%b-%y'),406.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Nov-11','%e-%b-%y'),399.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-11','%e-%b-%y'),400.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Nov-11','%e-%b-%y'),403.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Nov-11','%e-%b-%y'),397.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Nov-11','%e-%b-%y'),396.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Oct-11','%e-%b-%y'),404.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Oct-11','%e-%b-%y'),404.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-11','%e-%b-%y'),404.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Oct-11','%e-%b-%y'),400.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Oct-11','%e-%b-%y'),397.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Oct-11','%e-%b-%y'),405.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-11','%e-%b-%y'),392.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Oct-11','%e-%b-%y'),395.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Oct-11','%e-%b-%y'),398.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Oct-11','%e-%b-%y'),422.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Oct-11','%e-%b-%y'),419.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Oct-11','%e-%b-%y'),422);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-11','%e-%b-%y'),408.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Oct-11','%e-%b-%y'),402.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Oct-11','%e-%b-%y'),400.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Oct-11','%e-%b-%y'),388.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-11','%e-%b-%y'),369.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Oct-11','%e-%b-%y'),377.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Oct-11','%e-%b-%y'),378.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Oct-11','%e-%b-%y'),372.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Oct-11','%e-%b-%y'),374.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Sep-11','%e-%b-%y'),381.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-11','%e-%b-%y'),390.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Sep-11','%e-%b-%y'),397.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Sep-11','%e-%b-%y'),399.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Sep-11','%e-%b-%y'),403.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-11','%e-%b-%y'),404.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Sep-11','%e-%b-%y'),401.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Sep-11','%e-%b-%y'),412.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Sep-11','%e-%b-%y'),413.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Sep-11','%e-%b-%y'),411.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Sep-11','%e-%b-%y'),400.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-11','%e-%b-%y'),392.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Sep-11','%e-%b-%y'),389.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Sep-11','%e-%b-%y'),384.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Sep-11','%e-%b-%y'),379.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-11','%e-%b-%y'),377.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Sep-11','%e-%b-%y'),384.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Sep-11','%e-%b-%y'),383.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Sep-11','%e-%b-%y'),379.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-11','%e-%b-%y'),374.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Sep-11','%e-%b-%y'),381.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-11','%e-%b-%y'),384.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Aug-11','%e-%b-%y'),389.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Aug-11','%e-%b-%y'),389.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Aug-11','%e-%b-%y'),383.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-11','%e-%b-%y'),373.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Aug-11','%e-%b-%y'),376.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Aug-11','%e-%b-%y'),373.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Aug-11','%e-%b-%y'),356.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-11','%e-%b-%y'),356.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Aug-11','%e-%b-%y'),366.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-11','%e-%b-%y'),380.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Aug-11','%e-%b-%y'),380.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Aug-11','%e-%b-%y'),383.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Aug-11','%e-%b-%y'),376.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-11','%e-%b-%y'),373.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Aug-11','%e-%b-%y'),363.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Aug-11','%e-%b-%y'),374.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Aug-11','%e-%b-%y'),353.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-11','%e-%b-%y'),373.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Aug-11','%e-%b-%y'),377.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Aug-11','%e-%b-%y'),392.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Aug-11','%e-%b-%y'),388.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Aug-11','%e-%b-%y'),396.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-11','%e-%b-%y'),390.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-11','%e-%b-%y'),391.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jul-11','%e-%b-%y'),392.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jul-11','%e-%b-%y'),403.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jul-11','%e-%b-%y'),398.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-11','%e-%b-%y'),393.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-11','%e-%b-%y'),387.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jul-11','%e-%b-%y'),386.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Jul-11','%e-%b-%y'),376.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jul-11','%e-%b-%y'),373.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Jul-11','%e-%b-%y'),364.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-11','%e-%b-%y'),357.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Jul-11','%e-%b-%y'),358.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jul-11','%e-%b-%y'),353.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jul-11','%e-%b-%y'),354);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-11','%e-%b-%y'),359.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Jul-11','%e-%b-%y'),357.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jul-11','%e-%b-%y'),351.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Jul-11','%e-%b-%y'),349.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-11','%e-%b-%y'),343.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jun-11','%e-%b-%y'),335.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jun-11','%e-%b-%y'),334.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Jun-11','%e-%b-%y'),335.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jun-11','%e-%b-%y'),332.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jun-11','%e-%b-%y'),326.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-11','%e-%b-%y'),331.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jun-11','%e-%b-%y'),322.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jun-11','%e-%b-%y'),325.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jun-11','%e-%b-%y'),315.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-11','%e-%b-%y'),320.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jun-11','%e-%b-%y'),325.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jun-11','%e-%b-%y'),326.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jun-11','%e-%b-%y'),332.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jun-11','%e-%b-%y'),326.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jun-11','%e-%b-%y'),325.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-11','%e-%b-%y'),331.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jun-11','%e-%b-%y'),332.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jun-11','%e-%b-%y'),332.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jun-11','%e-%b-%y'),338.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-11','%e-%b-%y'),343.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jun-11','%e-%b-%y'),346.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jun-11','%e-%b-%y'),345.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-May-11','%e-%b-%y'),347.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-May-11','%e-%b-%y'),337.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-May-11','%e-%b-%y'),335);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-May-11','%e-%b-%y'),336.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-May-11','%e-%b-%y'),332.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-May-11','%e-%b-%y'),334.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-May-11','%e-%b-%y'),335.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-11','%e-%b-%y'),340.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-11','%e-%b-%y'),339.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-May-11','%e-%b-%y'),336.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-May-11','%e-%b-%y'),333.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-11','%e-%b-%y'),340.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-May-11','%e-%b-%y'),346.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-11','%e-%b-%y'),347.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-May-11','%e-%b-%y'),349.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-May-11','%e-%b-%y'),347.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-May-11','%e-%b-%y'),346.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-11','%e-%b-%y'),346.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-May-11','%e-%b-%y'),349.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-May-11','%e-%b-%y'),348.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-May-11','%e-%b-%y'),346.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-11','%e-%b-%y'),350.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Apr-11','%e-%b-%y'),346.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-11','%e-%b-%y'),350.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Apr-11','%e-%b-%y'),350.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Apr-11','%e-%b-%y'),353.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Apr-11','%e-%b-%y'),350.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Apr-11','%e-%b-%y'),342.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Apr-11','%e-%b-%y'),337.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Apr-11','%e-%b-%y'),331.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Apr-11','%e-%b-%y'),327.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Apr-11','%e-%b-%y'),332.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Apr-11','%e-%b-%y'),336.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Apr-11','%e-%b-%y'),332.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Apr-11','%e-%b-%y'),330.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Apr-11','%e-%b-%y'),335.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Apr-11','%e-%b-%y'),338.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Apr-11','%e-%b-%y'),338.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Apr-11','%e-%b-%y'),338.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Apr-11','%e-%b-%y'),341.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Apr-11','%e-%b-%y'),344.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Mar-11','%e-%b-%y'),348.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Mar-11','%e-%b-%y'),348.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Mar-11','%e-%b-%y'),350.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Mar-11','%e-%b-%y'),350.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Mar-11','%e-%b-%y'),351.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Mar-11','%e-%b-%y'),344.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Mar-11','%e-%b-%y'),339.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Mar-11','%e-%b-%y'),341.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Mar-11','%e-%b-%y'),339.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Mar-11','%e-%b-%y'),330.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Mar-11','%e-%b-%y'),334.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Mar-11','%e-%b-%y'),330.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Mar-11','%e-%b-%y'),345.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Mar-11','%e-%b-%y'),353.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Mar-11','%e-%b-%y'),351.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Mar-11','%e-%b-%y'),346.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Mar-11','%e-%b-%y'),352.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Mar-11','%e-%b-%y'),355.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Mar-11','%e-%b-%y'),355.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Mar-11','%e-%b-%y'),360);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Mar-11','%e-%b-%y'),359.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Mar-11','%e-%b-%y'),352.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Mar-11','%e-%b-%y'),349.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Feb-11','%e-%b-%y'),353.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Feb-11','%e-%b-%y'),348.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Feb-11','%e-%b-%y'),342.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Feb-11','%e-%b-%y'),342.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Feb-11','%e-%b-%y'),338.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-11','%e-%b-%y'),350.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-11','%e-%b-%y'),358.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-11','%e-%b-%y'),363.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-11','%e-%b-%y'),359.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Feb-11','%e-%b-%y'),359.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Feb-11','%e-%b-%y'),356.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-11','%e-%b-%y'),354.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-11','%e-%b-%y'),358.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-11','%e-%b-%y'),355.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Feb-11','%e-%b-%y'),351.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Feb-11','%e-%b-%y'),346.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-11','%e-%b-%y'),343.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-11','%e-%b-%y'),344.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-11','%e-%b-%y'),345.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jan-11','%e-%b-%y'),339.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Jan-11','%e-%b-%y'),336.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-11','%e-%b-%y'),343.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-11','%e-%b-%y'),343.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-11','%e-%b-%y'),341.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jan-11','%e-%b-%y'),337.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jan-11','%e-%b-%y'),326.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-11','%e-%b-%y'),332.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-11','%e-%b-%y'),338.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-11','%e-%b-%y'),340.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jan-11','%e-%b-%y'),348.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jan-11','%e-%b-%y'),345.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jan-11','%e-%b-%y'),344.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jan-11','%e-%b-%y'),341.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jan-11','%e-%b-%y'),342.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jan-11','%e-%b-%y'),336.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jan-11','%e-%b-%y'),333.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jan-11','%e-%b-%y'),334);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jan-11','%e-%b-%y'),331.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jan-11','%e-%b-%y'),329.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Dec-10','%e-%b-%y'),322.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Dec-10','%e-%b-%y'),323.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Dec-10','%e-%b-%y'),325.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Dec-10','%e-%b-%y'),325.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Dec-10','%e-%b-%y'),324.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-10','%e-%b-%y'),323.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-10','%e-%b-%y'),325.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Dec-10','%e-%b-%y'),324.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Dec-10','%e-%b-%y'),322.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Dec-10','%e-%b-%y'),320.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-10','%e-%b-%y'),321.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-10','%e-%b-%y'),320.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-10','%e-%b-%y'),320.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Dec-10','%e-%b-%y'),321.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-10','%e-%b-%y'),320.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Dec-10','%e-%b-%y'),319.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-10','%e-%b-%y'),321.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-10','%e-%b-%y'),318.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Dec-10','%e-%b-%y'),320.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Dec-10','%e-%b-%y'),317.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-10','%e-%b-%y'),318.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Dec-10','%e-%b-%y'),316.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-10','%e-%b-%y'),311.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Nov-10','%e-%b-%y'),316.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-10','%e-%b-%y'),315);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Nov-10','%e-%b-%y'),314.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Nov-10','%e-%b-%y'),308.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Nov-10','%e-%b-%y'),313.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Nov-10','%e-%b-%y'),306.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Nov-10','%e-%b-%y'),308.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Nov-10','%e-%b-%y'),300.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Nov-10','%e-%b-%y'),301.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Nov-10','%e-%b-%y'),307.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Nov-10','%e-%b-%y'),308.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Nov-10','%e-%b-%y'),316.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Nov-10','%e-%b-%y'),318.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Nov-10','%e-%b-%y'),316.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Nov-10','%e-%b-%y'),318.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Nov-10','%e-%b-%y'),317.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Nov-10','%e-%b-%y'),318.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Nov-10','%e-%b-%y'),312.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Nov-10','%e-%b-%y'),309.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Nov-10','%e-%b-%y'),304.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Oct-10','%e-%b-%y'),300.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Oct-10','%e-%b-%y'),305.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Oct-10','%e-%b-%y'),307.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Oct-10','%e-%b-%y'),308.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Oct-10','%e-%b-%y'),308.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Oct-10','%e-%b-%y'),307.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Oct-10','%e-%b-%y'),309.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Oct-10','%e-%b-%y'),310.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Oct-10','%e-%b-%y'),309.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Oct-10','%e-%b-%y'),318);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Oct-10','%e-%b-%y'),314.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Oct-10','%e-%b-%y'),302.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Oct-10','%e-%b-%y'),300.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Oct-10','%e-%b-%y'),298.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Oct-10','%e-%b-%y'),295.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Oct-10','%e-%b-%y'),294.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Oct-10','%e-%b-%y'),289.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Oct-10','%e-%b-%y'),289.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Oct-10','%e-%b-%y'),288.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Oct-10','%e-%b-%y'),278.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Oct-10','%e-%b-%y'),282.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Sep-10','%e-%b-%y'),283.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Sep-10','%e-%b-%y'),287.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Sep-10','%e-%b-%y'),286.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Sep-10','%e-%b-%y'),291.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Sep-10','%e-%b-%y'),292.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Sep-10','%e-%b-%y'),288.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Sep-10','%e-%b-%y'),287.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Sep-10','%e-%b-%y'),283.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Sep-10','%e-%b-%y'),283.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Sep-10','%e-%b-%y'),275.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Sep-10','%e-%b-%y'),276.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Sep-10','%e-%b-%y'),270.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Sep-10','%e-%b-%y'),268.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Sep-10','%e-%b-%y'),267.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Sep-10','%e-%b-%y'),263.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Sep-10','%e-%b-%y'),263.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Sep-10','%e-%b-%y'),262.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Sep-10','%e-%b-%y'),257.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Sep-10','%e-%b-%y'),258.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Sep-10','%e-%b-%y'),258.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-10','%e-%b-%y'),252.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Sep-10','%e-%b-%y'),250.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-10','%e-%b-%y'),243.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Aug-10','%e-%b-%y'),242.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-10','%e-%b-%y'),241.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-10','%e-%b-%y'),240.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-10','%e-%b-%y'),242.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Aug-10','%e-%b-%y'),239.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Aug-10','%e-%b-%y'),245.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Aug-10','%e-%b-%y'),249.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-10','%e-%b-%y'),249.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-10','%e-%b-%y'),253.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-10','%e-%b-%y'),251.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Aug-10','%e-%b-%y'),247.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-10','%e-%b-%y'),249.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Aug-10','%e-%b-%y'),251.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-10','%e-%b-%y'),250.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Aug-10','%e-%b-%y'),259.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Aug-10','%e-%b-%y'),261.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Aug-10','%e-%b-%y'),260.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-10','%e-%b-%y'),261.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Aug-10','%e-%b-%y'),262.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Aug-10','%e-%b-%y'),261.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Aug-10','%e-%b-%y'),261.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jul-10','%e-%b-%y'),257.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-10','%e-%b-%y'),258.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-10','%e-%b-%y'),260.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Jul-10','%e-%b-%y'),264.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jul-10','%e-%b-%y'),259.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jul-10','%e-%b-%y'),259.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-10','%e-%b-%y'),259.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-10','%e-%b-%y'),254.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jul-10','%e-%b-%y'),251.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Jul-10','%e-%b-%y'),245.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jul-10','%e-%b-%y'),249.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jul-10','%e-%b-%y'),251.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-10','%e-%b-%y'),252.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Jul-10','%e-%b-%y'),251.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jul-10','%e-%b-%y'),257.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Jul-10','%e-%b-%y'),259.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-10','%e-%b-%y'),258.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jul-10','%e-%b-%y'),258.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jul-10','%e-%b-%y'),248.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Jul-10','%e-%b-%y'),246.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jul-10','%e-%b-%y'),246.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Jul-10','%e-%b-%y'),248.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jun-10','%e-%b-%y'),251.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jun-10','%e-%b-%y'),256.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jun-10','%e-%b-%y'),268.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Jun-10','%e-%b-%y'),266.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jun-10','%e-%b-%y'),269);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Jun-10','%e-%b-%y'),270.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jun-10','%e-%b-%y'),273.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jun-10','%e-%b-%y'),270.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jun-10','%e-%b-%y'),274.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Jun-10','%e-%b-%y'),271.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jun-10','%e-%b-%y'),267.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Jun-10','%e-%b-%y'),259.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jun-10','%e-%b-%y'),254.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jun-10','%e-%b-%y'),253.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jun-10','%e-%b-%y'),250.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Jun-10','%e-%b-%y'),243.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jun-10','%e-%b-%y'),249.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Jun-10','%e-%b-%y'),250.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jun-10','%e-%b-%y'),255.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jun-10','%e-%b-%y'),263.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jun-10','%e-%b-%y'),263.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Jun-10','%e-%b-%y'),260.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-May-10','%e-%b-%y'),256.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-May-10','%e-%b-%y'),256.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-May-10','%e-%b-%y'),253.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-May-10','%e-%b-%y'),244.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-May-10','%e-%b-%y'),245.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-May-10','%e-%b-%y'),246.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-10','%e-%b-%y'),242.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-May-10','%e-%b-%y'),237.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-10','%e-%b-%y'),248.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-10','%e-%b-%y'),252.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-May-10','%e-%b-%y'),254.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-10','%e-%b-%y'),253.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-10','%e-%b-%y'),258.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-May-10','%e-%b-%y'),262.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-10','%e-%b-%y'),256.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-May-10','%e-%b-%y'),253.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-10','%e-%b-%y'),235.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-10','%e-%b-%y'),246.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-10','%e-%b-%y'),255.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-May-10','%e-%b-%y'),258.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-May-10','%e-%b-%y'),266.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Apr-10','%e-%b-%y'),261.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-10','%e-%b-%y'),268.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-10','%e-%b-%y'),261.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-10','%e-%b-%y'),262.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Apr-10','%e-%b-%y'),269.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-10','%e-%b-%y'),270.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Apr-10','%e-%b-%y'),266.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-10','%e-%b-%y'),259.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Apr-10','%e-%b-%y'),244.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Apr-10','%e-%b-%y'),247.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Apr-10','%e-%b-%y'),247.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-10','%e-%b-%y'),248.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Apr-10','%e-%b-%y'),245.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Apr-10','%e-%b-%y'),242.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Apr-10','%e-%b-%y'),242.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-10','%e-%b-%y'),241.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Apr-10','%e-%b-%y'),239.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-10','%e-%b-%y'),240.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Apr-10','%e-%b-%y'),239.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Apr-10','%e-%b-%y'),238.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-10','%e-%b-%y'),235.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-10','%e-%b-%y'),235.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('31-Mar-10','%e-%b-%y'),235);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-10','%e-%b-%y'),235.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Mar-10','%e-%b-%y'),232.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-10','%e-%b-%y'),230.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-10','%e-%b-%y'),226.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-10','%e-%b-%y'),229.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-10','%e-%b-%y'),228.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Mar-10','%e-%b-%y'),224.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-10','%e-%b-%y'),222.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Mar-10','%e-%b-%y'),224.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Mar-10','%e-%b-%y'),224.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-10','%e-%b-%y'),224.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Mar-10','%e-%b-%y'),223.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-10','%e-%b-%y'),226.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Mar-10','%e-%b-%y'),225.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Mar-10','%e-%b-%y'),224.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-10','%e-%b-%y'),223.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Mar-10','%e-%b-%y'),219.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Mar-10','%e-%b-%y'),218.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Mar-10','%e-%b-%y'),210.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Mar-10','%e-%b-%y'),209.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-10','%e-%b-%y'),208.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Mar-10','%e-%b-%y'),208.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-10','%e-%b-%y'),204.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Feb-10','%e-%b-%y'),202);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Feb-10','%e-%b-%y'),200.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Feb-10','%e-%b-%y'),197.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Feb-10','%e-%b-%y'),200.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-10','%e-%b-%y'),201.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-10','%e-%b-%y'),202.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-10','%e-%b-%y'),202.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-10','%e-%b-%y'),203.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-10','%e-%b-%y'),200.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Feb-10','%e-%b-%y'),200.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Feb-10','%e-%b-%y'),198.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-10','%e-%b-%y'),195.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-10','%e-%b-%y'),196.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-10','%e-%b-%y'),194.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Feb-10','%e-%b-%y'),195.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Feb-10','%e-%b-%y'),192.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-10','%e-%b-%y'),199.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-10','%e-%b-%y'),195.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-10','%e-%b-%y'),194.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jan-10','%e-%b-%y'),192.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Jan-10','%e-%b-%y'),199.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-10','%e-%b-%y'),207.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-10','%e-%b-%y'),205.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-10','%e-%b-%y'),203.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Jan-10','%e-%b-%y'),197.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jan-10','%e-%b-%y'),208.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-10','%e-%b-%y'),211.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-10','%e-%b-%y'),215.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-10','%e-%b-%y'),205.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-10','%e-%b-%y'),205.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Jan-10','%e-%b-%y'),209.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jan-10','%e-%b-%y'),210.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jan-10','%e-%b-%y'),207.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jan-10','%e-%b-%y'),210.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jan-10','%e-%b-%y'),211.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-10','%e-%b-%y'),210.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Jan-10','%e-%b-%y'),210.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jan-10','%e-%b-%y'),214.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jan-10','%e-%b-%y'),214.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jan-10','%e-%b-%y'),210.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Dec-09','%e-%b-%y'),210.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-09','%e-%b-%y'),211.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Dec-09','%e-%b-%y'),209.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Dec-09','%e-%b-%y'),211.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Dec-09','%e-%b-%y'),209.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-09','%e-%b-%y'),209.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-09','%e-%b-%y'),202.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-09','%e-%b-%y'),200.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Dec-09','%e-%b-%y'),198.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-09','%e-%b-%y'),195.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Dec-09','%e-%b-%y'),191.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-09','%e-%b-%y'),195.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-09','%e-%b-%y'),194.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-09','%e-%b-%y'),196.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Dec-09','%e-%b-%y'),194.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-09','%e-%b-%y'),196.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Dec-09','%e-%b-%y'),197.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-09','%e-%b-%y'),189.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-09','%e-%b-%y'),188.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-09','%e-%b-%y'),193.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Dec-09','%e-%b-%y'),196.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-09','%e-%b-%y'),196.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Dec-09','%e-%b-%y'),196.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-09','%e-%b-%y'),199.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-09','%e-%b-%y'),200.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-09','%e-%b-%y'),204.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Nov-09','%e-%b-%y'),204.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Nov-09','%e-%b-%y'),204.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Nov-09','%e-%b-%y'),205.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Nov-09','%e-%b-%y'),199.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Nov-09','%e-%b-%y'),200.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-09','%e-%b-%y'),205.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Nov-09','%e-%b-%y'),207);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Nov-09','%e-%b-%y'),206.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Nov-09','%e-%b-%y'),204.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Nov-09','%e-%b-%y'),201.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Nov-09','%e-%b-%y'),203.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-09','%e-%b-%y'),202.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Nov-09','%e-%b-%y'),201.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Nov-09','%e-%b-%y'),194.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Nov-09','%e-%b-%y'),194.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-09','%e-%b-%y'),190.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Nov-09','%e-%b-%y'),188.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Nov-09','%e-%b-%y'),189.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Oct-09','%e-%b-%y'),188.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Oct-09','%e-%b-%y'),196.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Oct-09','%e-%b-%y'),192.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-09','%e-%b-%y'),197.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Oct-09','%e-%b-%y'),202.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Oct-09','%e-%b-%y'),203.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Oct-09','%e-%b-%y'),205.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-09','%e-%b-%y'),204.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Oct-09','%e-%b-%y'),198.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Oct-09','%e-%b-%y'),189.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Oct-09','%e-%b-%y'),188.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Oct-09','%e-%b-%y'),190.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Oct-09','%e-%b-%y'),191.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-09','%e-%b-%y'),190.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Oct-09','%e-%b-%y'),190.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Oct-09','%e-%b-%y'),190.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Oct-09','%e-%b-%y'),189.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-09','%e-%b-%y'),190.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Oct-09','%e-%b-%y'),190.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Oct-09','%e-%b-%y'),186.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Oct-09','%e-%b-%y'),184.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Oct-09','%e-%b-%y'),180.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Sep-09','%e-%b-%y'),185.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-09','%e-%b-%y'),185.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Sep-09','%e-%b-%y'),186.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Sep-09','%e-%b-%y'),182.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Sep-09','%e-%b-%y'),183.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-09','%e-%b-%y'),185.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Sep-09','%e-%b-%y'),184.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Sep-09','%e-%b-%y'),184.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Sep-09','%e-%b-%y'),185.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Sep-09','%e-%b-%y'),184.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Sep-09','%e-%b-%y'),181.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-09','%e-%b-%y'),175.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Sep-09','%e-%b-%y'),173.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Sep-09','%e-%b-%y'),172.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Sep-09','%e-%b-%y'),172.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-09','%e-%b-%y'),171.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Sep-09','%e-%b-%y'),172.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Sep-09','%e-%b-%y'),170.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Sep-09','%e-%b-%y'),166.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-09','%e-%b-%y'),165.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Sep-09','%e-%b-%y'),165.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-09','%e-%b-%y'),168.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Aug-09','%e-%b-%y'),170.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-09','%e-%b-%y'),169.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-09','%e-%b-%y'),167.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-09','%e-%b-%y'),169.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Aug-09','%e-%b-%y'),169.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Aug-09','%e-%b-%y'),169.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Aug-09','%e-%b-%y'),166.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-09','%e-%b-%y'),164.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-09','%e-%b-%y'),164);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-09','%e-%b-%y'),159.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Aug-09','%e-%b-%y'),166.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-09','%e-%b-%y'),168.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Aug-09','%e-%b-%y'),165.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Aug-09','%e-%b-%y'),164.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Aug-09','%e-%b-%y'),165.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Aug-09','%e-%b-%y'),163.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Aug-09','%e-%b-%y'),165.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Aug-09','%e-%b-%y'),165.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Aug-09','%e-%b-%y'),166.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jul-09','%e-%b-%y'),163.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jul-09','%e-%b-%y'),162.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jul-09','%e-%b-%y'),160.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Jul-09','%e-%b-%y'),160);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jul-09','%e-%b-%y'),160.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jul-09','%e-%b-%y'),159.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jul-09','%e-%b-%y'),157.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jul-09','%e-%b-%y'),156.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jul-09','%e-%b-%y'),151.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jul-09','%e-%b-%y'),152.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jul-09','%e-%b-%y'),151.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jul-09','%e-%b-%y'),147.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jul-09','%e-%b-%y'),146.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jul-09','%e-%b-%y'),142.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jul-09','%e-%b-%y'),142.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jul-09','%e-%b-%y'),138.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jul-09','%e-%b-%y'),136.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jul-09','%e-%b-%y'),137.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jul-09','%e-%b-%y'),135.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jul-09','%e-%b-%y'),138.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jul-09','%e-%b-%y'),140.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jul-09','%e-%b-%y'),140.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-09','%e-%b-%y'),142.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jun-09','%e-%b-%y'),142.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jun-09','%e-%b-%y'),141.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jun-09','%e-%b-%y'),142.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jun-09','%e-%b-%y'),139.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jun-09','%e-%b-%y'),136.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-09','%e-%b-%y'),134.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jun-09','%e-%b-%y'),137.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jun-09','%e-%b-%y'),139.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jun-09','%e-%b-%y'),135.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-09','%e-%b-%y'),135.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Jun-09','%e-%b-%y'),136.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jun-09','%e-%b-%y'),136.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jun-09','%e-%b-%y'),136.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jun-09','%e-%b-%y'),139.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jun-09','%e-%b-%y'),140.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-09','%e-%b-%y'),142.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Jun-09','%e-%b-%y'),143.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jun-09','%e-%b-%y'),144.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jun-09','%e-%b-%y'),143.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-09','%e-%b-%y'),140.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jun-09','%e-%b-%y'),139.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jun-09','%e-%b-%y'),139.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-May-09','%e-%b-%y'),135.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-May-09','%e-%b-%y'),135.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-May-09','%e-%b-%y'),133.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-May-09','%e-%b-%y'),130.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-May-09','%e-%b-%y'),122.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-09','%e-%b-%y'),124.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-May-09','%e-%b-%y'),125.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-09','%e-%b-%y'),127.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-09','%e-%b-%y'),126.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-May-09','%e-%b-%y'),122.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-09','%e-%b-%y'),122.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-09','%e-%b-%y'),119.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-May-09','%e-%b-%y'),124.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-09','%e-%b-%y'),129.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-May-09','%e-%b-%y'),129.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-09','%e-%b-%y'),129.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-09','%e-%b-%y'),132.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-09','%e-%b-%y'),132.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-May-09','%e-%b-%y'),132.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-May-09','%e-%b-%y'),127.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Apr-09','%e-%b-%y'),125.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-09','%e-%b-%y'),125.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-09','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-09','%e-%b-%y'),124.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Apr-09','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-09','%e-%b-%y'),125.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Apr-09','%e-%b-%y'),121.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-09','%e-%b-%y'),121.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Apr-09','%e-%b-%y'),120.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Apr-09','%e-%b-%y'),123.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Apr-09','%e-%b-%y'),121.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-09','%e-%b-%y'),117.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Apr-09','%e-%b-%y'),118.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Apr-09','%e-%b-%y'),120.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Apr-09','%e-%b-%y'),119.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-09','%e-%b-%y'),119.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Apr-09','%e-%b-%y'),116.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-09','%e-%b-%y'),115);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Apr-09','%e-%b-%y'),118.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-09','%e-%b-%y'),115.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-09','%e-%b-%y'),112.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-09','%e-%b-%y'),108.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('31-Mar-09','%e-%b-%y'),105.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-09','%e-%b-%y'),104.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Mar-09','%e-%b-%y'),106.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-09','%e-%b-%y'),109.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-09','%e-%b-%y'),106.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-09','%e-%b-%y'),106.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-09','%e-%b-%y'),107.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Mar-09','%e-%b-%y'),101.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-09','%e-%b-%y'),101.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Mar-09','%e-%b-%y'),101.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Mar-09','%e-%b-%y'),99.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-09','%e-%b-%y'),95.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Mar-09','%e-%b-%y'),95.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-09','%e-%b-%y'),96.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Mar-09','%e-%b-%y'),92.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Mar-09','%e-%b-%y'),88.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-09','%e-%b-%y'),83.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Mar-09','%e-%b-%y'),85.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Mar-09','%e-%b-%y'),88.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Mar-09','%e-%b-%y'),91.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Mar-09','%e-%b-%y'),88.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-09','%e-%b-%y'),87.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Feb-09','%e-%b-%y'),89.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-09','%e-%b-%y'),89.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Feb-09','%e-%b-%y'),91.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Feb-09','%e-%b-%y'),90.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Feb-09','%e-%b-%y'),86.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Feb-09','%e-%b-%y'),91.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-09','%e-%b-%y'),90.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-09','%e-%b-%y'),94.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-09','%e-%b-%y'),94.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Feb-09','%e-%b-%y'),99.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Feb-09','%e-%b-%y'),99.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Feb-09','%e-%b-%y'),96.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Feb-09','%e-%b-%y'),97.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Feb-09','%e-%b-%y'),102.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Feb-09','%e-%b-%y'),99.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Feb-09','%e-%b-%y'),96.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Feb-09','%e-%b-%y'),93.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Feb-09','%e-%b-%y'),92.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Feb-09','%e-%b-%y'),91.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jan-09','%e-%b-%y'),90.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Jan-09','%e-%b-%y'),93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jan-09','%e-%b-%y'),94.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jan-09','%e-%b-%y'),90.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jan-09','%e-%b-%y'),89.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jan-09','%e-%b-%y'),88.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jan-09','%e-%b-%y'),88.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Jan-09','%e-%b-%y'),82.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jan-09','%e-%b-%y'),78.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jan-09','%e-%b-%y'),82.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-09','%e-%b-%y'),83.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jan-09','%e-%b-%y'),85.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jan-09','%e-%b-%y'),87.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Jan-09','%e-%b-%y'),88.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jan-09','%e-%b-%y'),90.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jan-09','%e-%b-%y'),92.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-09','%e-%b-%y'),91.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jan-09','%e-%b-%y'),93.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jan-09','%e-%b-%y'),94.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jan-09','%e-%b-%y'),90.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jan-09','%e-%b-%y'),85.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Dec-08','%e-%b-%y'),85.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-08','%e-%b-%y'),86.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Dec-08','%e-%b-%y'),86.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Dec-08','%e-%b-%y'),85.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Dec-08','%e-%b-%y'),85.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-08','%e-%b-%y'),85.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-08','%e-%b-%y'),86.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-08','%e-%b-%y'),85.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Dec-08','%e-%b-%y'),90);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-08','%e-%b-%y'),89.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Dec-08','%e-%b-%y'),89.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-08','%e-%b-%y'),95.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-08','%e-%b-%y'),94.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Dec-08','%e-%b-%y'),98.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Dec-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-08','%e-%b-%y'),98.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Dec-08','%e-%b-%y'),100.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-08','%e-%b-%y'),99.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Dec-08','%e-%b-%y'),94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-08','%e-%b-%y'),91.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Dec-08','%e-%b-%y'),95.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-08','%e-%b-%y'),92.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Dec-08','%e-%b-%y'),88.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Nov-08','%e-%b-%y'),92.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Nov-08','%e-%b-%y'),90.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Nov-08','%e-%b-%y'),92.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Nov-08','%e-%b-%y'),82.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Nov-08','%e-%b-%y'),80.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Nov-08','%e-%b-%y'),86.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-08','%e-%b-%y'),89.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Nov-08','%e-%b-%y'),88.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Nov-08','%e-%b-%y'),90.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Nov-08','%e-%b-%y'),96.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Nov-08','%e-%b-%y'),90.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Nov-08','%e-%b-%y'),94.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-08','%e-%b-%y'),95.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Nov-08','%e-%b-%y'),98.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Nov-08','%e-%b-%y'),99.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Nov-08','%e-%b-%y'),103.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-08','%e-%b-%y'),110.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Nov-08','%e-%b-%y'),106.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Oct-08','%e-%b-%y'),107.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Oct-08','%e-%b-%y'),111.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Oct-08','%e-%b-%y'),104.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Oct-08','%e-%b-%y'),99.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-08','%e-%b-%y'),92.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Oct-08','%e-%b-%y'),96.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Oct-08','%e-%b-%y'),98.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Oct-08','%e-%b-%y'),96.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-08','%e-%b-%y'),91.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Oct-08','%e-%b-%y'),98.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Oct-08','%e-%b-%y'),97.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Oct-08','%e-%b-%y'),101.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Oct-08','%e-%b-%y'),97.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Oct-08','%e-%b-%y'),104.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-08','%e-%b-%y'),110.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Oct-08','%e-%b-%y'),96.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Oct-08','%e-%b-%y'),88.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Oct-08','%e-%b-%y'),89.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-08','%e-%b-%y'),89.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Oct-08','%e-%b-%y'),98.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Oct-08','%e-%b-%y'),97.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Oct-08','%e-%b-%y'),100.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Oct-08','%e-%b-%y'),109.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Sep-08','%e-%b-%y'),113.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-08','%e-%b-%y'),105.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Sep-08','%e-%b-%y'),128.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Sep-08','%e-%b-%y'),131.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Sep-08','%e-%b-%y'),128.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-08','%e-%b-%y'),126.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Sep-08','%e-%b-%y'),131.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Sep-08','%e-%b-%y'),140.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Sep-08','%e-%b-%y'),134.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Sep-08','%e-%b-%y'),127.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Sep-08','%e-%b-%y'),139.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-08','%e-%b-%y'),140.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Sep-08','%e-%b-%y'),148.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Sep-08','%e-%b-%y'),152.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Sep-08','%e-%b-%y'),151.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-08','%e-%b-%y'),151.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Sep-08','%e-%b-%y'),157.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Sep-08','%e-%b-%y'),160.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Sep-08','%e-%b-%y'),161.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Sep-08','%e-%b-%y'),166.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Sep-08','%e-%b-%y'),166.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Aug-08','%e-%b-%y'),169.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Aug-08','%e-%b-%y'),173.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-08','%e-%b-%y'),174.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-08','%e-%b-%y'),173.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-08','%e-%b-%y'),172.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Aug-08','%e-%b-%y'),176.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Aug-08','%e-%b-%y'),174.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Aug-08','%e-%b-%y'),175.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-08','%e-%b-%y'),173.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-08','%e-%b-%y'),175.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Aug-08','%e-%b-%y'),175.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Aug-08','%e-%b-%y'),179.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-08','%e-%b-%y'),179.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Aug-08','%e-%b-%y'),176.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-08','%e-%b-%y'),173.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Aug-08','%e-%b-%y'),169.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Aug-08','%e-%b-%y'),163.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Aug-08','%e-%b-%y'),164.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-08','%e-%b-%y'),160.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Aug-08','%e-%b-%y'),153.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Aug-08','%e-%b-%y'),156.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Jul-08','%e-%b-%y'),158.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jul-08','%e-%b-%y'),159.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-08','%e-%b-%y'),157.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-08','%e-%b-%y'),154.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jul-08','%e-%b-%y'),162.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jul-08','%e-%b-%y'),159.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jul-08','%e-%b-%y'),166.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-08','%e-%b-%y'),162.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-08','%e-%b-%y'),166.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jul-08','%e-%b-%y'),165.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Jul-08','%e-%b-%y'),171.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jul-08','%e-%b-%y'),172.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jul-08','%e-%b-%y'),169.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-08','%e-%b-%y'),173.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jul-08','%e-%b-%y'),172.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jul-08','%e-%b-%y'),176.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Jul-08','%e-%b-%y'),174.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-08','%e-%b-%y'),179.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jul-08','%e-%b-%y'),175.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jul-08','%e-%b-%y'),170.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jul-08','%e-%b-%y'),168.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-08','%e-%b-%y'),174.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Jun-08','%e-%b-%y'),167.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jun-08','%e-%b-%y'),170.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jun-08','%e-%b-%y'),168.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jun-08','%e-%b-%y'),177.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jun-08','%e-%b-%y'),173.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-08','%e-%b-%y'),173.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jun-08','%e-%b-%y'),175.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jun-08','%e-%b-%y'),180.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jun-08','%e-%b-%y'),178.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-08','%e-%b-%y'),181.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jun-08','%e-%b-%y'),176.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jun-08','%e-%b-%y'),172.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Jun-08','%e-%b-%y'),173.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jun-08','%e-%b-%y'),180.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jun-08','%e-%b-%y'),185.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-08','%e-%b-%y'),181.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jun-08','%e-%b-%y'),185.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jun-08','%e-%b-%y'),189.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Jun-08','%e-%b-%y'),185.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-08','%e-%b-%y'),185.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jun-08','%e-%b-%y'),186.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-May-08','%e-%b-%y'),188.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-May-08','%e-%b-%y'),186.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-May-08','%e-%b-%y'),187.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-May-08','%e-%b-%y'),186.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-May-08','%e-%b-%y'),181.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-May-08','%e-%b-%y'),177.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-08','%e-%b-%y'),178.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-May-08','%e-%b-%y'),185.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-08','%e-%b-%y'),183.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-May-08','%e-%b-%y'),187.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-May-08','%e-%b-%y'),189.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-08','%e-%b-%y'),186.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-08','%e-%b-%y'),189.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-May-08','%e-%b-%y'),188.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-May-08','%e-%b-%y'),183.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-May-08','%e-%b-%y'),185.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-08','%e-%b-%y'),182.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-08','%e-%b-%y'),186.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-08','%e-%b-%y'),184.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-May-08','%e-%b-%y'),180.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-May-08','%e-%b-%y'),180);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Apr-08','%e-%b-%y'),173.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-08','%e-%b-%y'),175.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-08','%e-%b-%y'),172.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Apr-08','%e-%b-%y'),169.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Apr-08','%e-%b-%y'),168.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-08','%e-%b-%y'),162.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Apr-08','%e-%b-%y'),160.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-08','%e-%b-%y'),168.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Apr-08','%e-%b-%y'),161.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Apr-08','%e-%b-%y'),154.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Apr-08','%e-%b-%y'),153.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-08','%e-%b-%y'),148.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Apr-08','%e-%b-%y'),147.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Apr-08','%e-%b-%y'),147.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Apr-08','%e-%b-%y'),154.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-08','%e-%b-%y'),151.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Apr-08','%e-%b-%y'),152.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-08','%e-%b-%y'),155.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Apr-08','%e-%b-%y'),153.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-08','%e-%b-%y'),151.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-08','%e-%b-%y'),147.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-08','%e-%b-%y'),149.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Mar-08','%e-%b-%y'),143.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Mar-08','%e-%b-%y'),143.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Mar-08','%e-%b-%y'),140.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-08','%e-%b-%y'),145.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-08','%e-%b-%y'),140.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-08','%e-%b-%y'),139.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Mar-08','%e-%b-%y'),133.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Mar-08','%e-%b-%y'),129.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Mar-08','%e-%b-%y'),132.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Mar-08','%e-%b-%y'),126.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Mar-08','%e-%b-%y'),126.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Mar-08','%e-%b-%y'),127.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Mar-08','%e-%b-%y'),126.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Mar-08','%e-%b-%y'),127.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Mar-08','%e-%b-%y'),119.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Mar-08','%e-%b-%y'),122.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Mar-08','%e-%b-%y'),120.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Mar-08','%e-%b-%y'),124.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Mar-08','%e-%b-%y'),124.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Mar-08','%e-%b-%y'),121.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Feb-08','%e-%b-%y'),125.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Feb-08','%e-%b-%y'),129.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Feb-08','%e-%b-%y'),122.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-08','%e-%b-%y'),119.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Feb-08','%e-%b-%y'),119.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Feb-08','%e-%b-%y'),119.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Feb-08','%e-%b-%y'),121.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Feb-08','%e-%b-%y'),123.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-08','%e-%b-%y'),122.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Feb-08','%e-%b-%y'),124.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Feb-08','%e-%b-%y'),127.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Feb-08','%e-%b-%y'),129.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Feb-08','%e-%b-%y'),124.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Feb-08','%e-%b-%y'),129.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Feb-08','%e-%b-%y'),125.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Feb-08','%e-%b-%y'),121.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Feb-08','%e-%b-%y'),122);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Feb-08','%e-%b-%y'),129.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Feb-08','%e-%b-%y'),131.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Feb-08','%e-%b-%y'),133.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Jan-08','%e-%b-%y'),135.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jan-08','%e-%b-%y'),132.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jan-08','%e-%b-%y'),131.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jan-08','%e-%b-%y'),130.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jan-08','%e-%b-%y'),130.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jan-08','%e-%b-%y'),135.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jan-08','%e-%b-%y'),139.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jan-08','%e-%b-%y'),155.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-08','%e-%b-%y'),161.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jan-08','%e-%b-%y'),160.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Jan-08','%e-%b-%y'),159.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-08','%e-%b-%y'),169.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jan-08','%e-%b-%y'),178.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jan-08','%e-%b-%y'),172.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jan-08','%e-%b-%y'),178.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jan-08','%e-%b-%y'),179.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Jan-08','%e-%b-%y'),171.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-08','%e-%b-%y'),177.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jan-08','%e-%b-%y'),180.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jan-08','%e-%b-%y'),194.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jan-08','%e-%b-%y'),194.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Dec-07','%e-%b-%y'),198.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Dec-07','%e-%b-%y'),199.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Dec-07','%e-%b-%y'),198.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Dec-07','%e-%b-%y'),198.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-07','%e-%b-%y'),198.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Dec-07','%e-%b-%y'),193.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Dec-07','%e-%b-%y'),187.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Dec-07','%e-%b-%y'),183.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-07','%e-%b-%y'),182.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Dec-07','%e-%b-%y'),184.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-07','%e-%b-%y'),190.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Dec-07','%e-%b-%y'),191.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Dec-07','%e-%b-%y'),190.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Dec-07','%e-%b-%y'),188.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-07','%e-%b-%y'),194.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-07','%e-%b-%y'),194.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Dec-07','%e-%b-%y'),189.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Dec-07','%e-%b-%y'),185.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-07','%e-%b-%y'),179.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Dec-07','%e-%b-%y'),178.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-07','%e-%b-%y'),182.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Nov-07','%e-%b-%y'),184.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Nov-07','%e-%b-%y'),180.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-07','%e-%b-%y'),174.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-07','%e-%b-%y'),172.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Nov-07','%e-%b-%y'),171.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Nov-07','%e-%b-%y'),168.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Nov-07','%e-%b-%y'),168.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Nov-07','%e-%b-%y'),163.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Nov-07','%e-%b-%y'),166.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Nov-07','%e-%b-%y'),164.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Nov-07','%e-%b-%y'),166.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Nov-07','%e-%b-%y'),169.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Nov-07','%e-%b-%y'),153.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Nov-07','%e-%b-%y'),165.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Nov-07','%e-%b-%y'),175.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Nov-07','%e-%b-%y'),186.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Nov-07','%e-%b-%y'),191.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Nov-07','%e-%b-%y'),186.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Nov-07','%e-%b-%y'),187.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Nov-07','%e-%b-%y'),187.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Oct-07','%e-%b-%y'),189.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Oct-07','%e-%b-%y'),187);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Oct-07','%e-%b-%y'),185.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Oct-07','%e-%b-%y'),184.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Oct-07','%e-%b-%y'),182.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Oct-07','%e-%b-%y'),185.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Oct-07','%e-%b-%y'),186.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Oct-07','%e-%b-%y'),174.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Oct-07','%e-%b-%y'),170.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Oct-07','%e-%b-%y'),173.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Oct-07','%e-%b-%y'),172.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Oct-07','%e-%b-%y'),169.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Oct-07','%e-%b-%y'),166.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Oct-07','%e-%b-%y'),167.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Oct-07','%e-%b-%y'),162.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Oct-07','%e-%b-%y'),166.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Oct-07','%e-%b-%y'),167.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Oct-07','%e-%b-%y'),167.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Oct-07','%e-%b-%y'),161.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Oct-07','%e-%b-%y'),156.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Oct-07','%e-%b-%y'),157.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Oct-07','%e-%b-%y'),158.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Oct-07','%e-%b-%y'),156.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Sep-07','%e-%b-%y'),153.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Sep-07','%e-%b-%y'),154.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Sep-07','%e-%b-%y'),152.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Sep-07','%e-%b-%y'),153.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Sep-07','%e-%b-%y'),148.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Sep-07','%e-%b-%y'),144.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Sep-07','%e-%b-%y'),140.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Sep-07','%e-%b-%y'),140.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Sep-07','%e-%b-%y'),140.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Sep-07','%e-%b-%y'),138.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Sep-07','%e-%b-%y'),138.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Sep-07','%e-%b-%y'),137.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Sep-07','%e-%b-%y'),136.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Sep-07','%e-%b-%y'),135.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Sep-07','%e-%b-%y'),136.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Sep-07','%e-%b-%y'),131.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Sep-07','%e-%b-%y'),135.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Sep-07','%e-%b-%y'),136.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Sep-07','%e-%b-%y'),144.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Aug-07','%e-%b-%y'),138.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Aug-07','%e-%b-%y'),136.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Aug-07','%e-%b-%y'),134.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Aug-07','%e-%b-%y'),126.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Aug-07','%e-%b-%y'),132.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Aug-07','%e-%b-%y'),135.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Aug-07','%e-%b-%y'),131.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Aug-07','%e-%b-%y'),132.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Aug-07','%e-%b-%y'),127.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Aug-07','%e-%b-%y'),122.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Aug-07','%e-%b-%y'),122.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Aug-07','%e-%b-%y'),117.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Aug-07','%e-%b-%y'),119.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Aug-07','%e-%b-%y'),124.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Aug-07','%e-%b-%y'),127.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Aug-07','%e-%b-%y'),125);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Aug-07','%e-%b-%y'),126.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Aug-07','%e-%b-%y'),134.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Aug-07','%e-%b-%y'),135.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Aug-07','%e-%b-%y'),135.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Aug-07','%e-%b-%y'),131.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Aug-07','%e-%b-%y'),136.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Aug-07','%e-%b-%y'),135);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jul-07','%e-%b-%y'),131.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jul-07','%e-%b-%y'),141.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jul-07','%e-%b-%y'),143.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Jul-07','%e-%b-%y'),146);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jul-07','%e-%b-%y'),137.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jul-07','%e-%b-%y'),134.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jul-07','%e-%b-%y'),143.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jul-07','%e-%b-%y'),143.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jul-07','%e-%b-%y'),140);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Jul-07','%e-%b-%y'),138.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jul-07','%e-%b-%y'),138.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jul-07','%e-%b-%y'),138.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jul-07','%e-%b-%y'),137.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jul-07','%e-%b-%y'),134.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jul-07','%e-%b-%y'),132.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jul-07','%e-%b-%y'),132.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jul-07','%e-%b-%y'),130.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jul-07','%e-%b-%y'),132.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jul-07','%e-%b-%y'),132.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jul-07','%e-%b-%y'),127.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jul-07','%e-%b-%y'),121.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Jun-07','%e-%b-%y'),122.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jun-07','%e-%b-%y'),120.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jun-07','%e-%b-%y'),121.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jun-07','%e-%b-%y'),119.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Jun-07','%e-%b-%y'),122.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jun-07','%e-%b-%y'),123);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Jun-07','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jun-07','%e-%b-%y'),121.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Jun-07','%e-%b-%y'),123.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jun-07','%e-%b-%y'),125.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jun-07','%e-%b-%y'),120.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jun-07','%e-%b-%y'),118.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jun-07','%e-%b-%y'),117.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jun-07','%e-%b-%y'),120.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jun-07','%e-%b-%y'),120.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jun-07','%e-%b-%y'),124.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jun-07','%e-%b-%y'),124.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jun-07','%e-%b-%y'),123.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jun-07','%e-%b-%y'),122.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jun-07','%e-%b-%y'),121.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Jun-07','%e-%b-%y'),118.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-May-07','%e-%b-%y'),121.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-May-07','%e-%b-%y'),118.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-May-07','%e-%b-%y'),114.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-May-07','%e-%b-%y'),113.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-May-07','%e-%b-%y'),110.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-May-07','%e-%b-%y'),112.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-May-07','%e-%b-%y'),113.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-May-07','%e-%b-%y'),111.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-May-07','%e-%b-%y'),110.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-May-07','%e-%b-%y'),109.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-May-07','%e-%b-%y'),107.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-May-07','%e-%b-%y'),107.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-May-07','%e-%b-%y'),109.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-May-07','%e-%b-%y'),108.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-May-07','%e-%b-%y'),107.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-May-07','%e-%b-%y'),106.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-May-07','%e-%b-%y'),105.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-May-07','%e-%b-%y'),103.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-May-07','%e-%b-%y'),100.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-May-07','%e-%b-%y'),100.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-May-07','%e-%b-%y'),100.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-May-07','%e-%b-%y'),99.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Apr-07','%e-%b-%y'),99.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Apr-07','%e-%b-%y'),99.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Apr-07','%e-%b-%y'),98.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Apr-07','%e-%b-%y'),95.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Apr-07','%e-%b-%y'),93.24);
+
+-- DEMO_PIE_CHART
+Insert into demo_pie_chart (legend, data_value) values ('One', 5);
+Insert into demo_pie_chart (legend, data_value) values ('Two', 2);
+Insert into demo_pie_chart (legend, data_value) values ('Three', 9);
+Insert into demo_pie_chart (legend, data_value) values ('Four', 7);
+Insert into demo_pie_chart (legend, data_value) values ('Five', 4);
+Insert into demo_pie_chart (legend, data_value) values ('Six', 3);
+Insert into demo_pie_chart (legend, data_value) values ('Seven', .5);
+
+
+-- DEMO_SCATTER_CHART
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.1, 'Particulate', 122);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.3, 'Particulate', 117);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.7, 'Particulate', 112);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.4, 'Particulate', 114);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.9, 'Particulate', 110);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.0, 'Particulate', 114);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (3.6, 'Particulate', 128);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (1.9, 'Particulate', 137);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.3, 'Particulate', 104);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (6.9, 'Humidity', 119);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.9, 'Humidity', 118);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (9.8, 'Humidity', 103);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.9, 'Humidity', 137);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (6.8, 'Humidity', 102);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.7, 'Humidity', 89);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (2.7, 'Humidity', 98);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (3.7, 'Humidity', 145);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.4, 'Humidity', 118);
+
+-- DEMO_SCATTER_PLOT
+
+-- SET DEFINE OFF;
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -46.5901128883449, -464.477370615131);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -85.0293361247543, -362.252178232471);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 70.9700275365898, 402.214363675566);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -50.1110580054506, -310.108907443154);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 85.043005750476, 813.481841353449);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -14.2356123424179, -134.200903707809);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -66.7014933188071, -445.754374526706);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -79.941582021797, -694.089097548454);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -64.4665101305822, -431.660620986243);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 13.718818366452, 100.010719918027);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 35.457456199233, 223.254643848734);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 55.2326402548387, 268.940835852805);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -32.9989160276248, -237.280626944034);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -0.464911506111831, -2.65656324666862);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -59.0205101710777, -498.895652307826);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 28.0939970575828, 117.200615553207);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 31.7305239061572, 186.662624012256);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 50.9035126419798, 440.937283203403);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 58.3875046571053, 547.879249694999);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 76.7846997917459, 525.020578968308);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 1.73485745801611, 7.28149474936192);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 15.304841061276, 71.2374666595537);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 75.1342455000693, 381.145932349436);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -58.2087417684623, -573.630956069476);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 76.7977837302114, 624.733726327778);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 56.3295585433654, 309.697529902676);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -9.27601440680639, -49.5126219388194);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 98.3002030040236, 765.653589829535);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -25.0987502451517, -174.651201240269);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 39.9215299020147, 337.889176256456);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 77.9225832868337, 356.183903852096);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 75.4311841137638, 14.5258766665983);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 58.9445375968278, 376.359576288564);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 46.9521897141796, 3.5679984193934);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -49.0378307695689, -230.816092788509);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -96.2461776340861, -863.765255159092);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -96.3388912796447, -538.147283544646);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -21.4684477767032, -200.140077054848);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -30.3532837083366, -226.462637188158);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -17.5055590488884, -118.709622452841);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 56.6394671790491, 385.48951169801);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 70.4622912302344, 356.986529538635);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 58.2647422222769, 489.418744916999);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -92.16093253903, -425.576081634713);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -2.64574970943097, -26.190027661226);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -16.7568654181289, -117.460886096034);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 68.215377945908, 606.917788617984);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 53.7387814434413, 367.53491797949);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -51.8861573715238, -289.998186955562);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -15.9721784074351, -75.335027134323);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 63.2540648905791, 602.546517566905);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -53.376167960458, -470.921238684285);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 40.8307443439851, 276.112653117961);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -13.0540977188468, -127.648158921993);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -43.7358336047599, -435.080470107322);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -74.5673321340732, -617.960236798371);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -6.47907144443936, -55.654651151187);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 68.1915507628225, 352.320728639801);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -23.5393521654339, -137.714557244391);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 28.3621412621467, 141.103859877604);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -99.5615230664525, -974.857161307048);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -77.7132553058204, -736.182131225006);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 95.9321864873013, 478.286112499176);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 97.7451855292708, 940.301427763062);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -10.2483179758141, -70.1145330070458);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -24.0750124187893, -113.523998470537);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -5.5721118558967, -43.8516395203455);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -55.5378338160537, -368.506951528332);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 52.6669516338013, 38.2926120131942);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -74.1981412067658, -436.990411988621);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -8.70511941690364, -71.3277811558721);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 63.2921735621378, 534.825008407329);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 97.9066635843841, 678.994971737474);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -83.1613916743288, -494.53303650568);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 23.4730547863992, 223.031148353333);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 40.6105099506845, 199.937366405274);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 35.4473225526307, 331.61786915261);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 27.2050975460142, 146.277993239147);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -1.54684302938646, -12.6706471561247);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 45.8386162291745, 401.780882699918);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 43.4241956158593, 228.71488367607);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -23.4517134254585, -165.958577325218);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -98.8954664030229, -829.964553125469);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 48.0527046113198, 451.527720751234);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -77.8912947988124, -416.867729852279);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 23.8325471824168, 206.907438743452);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 83.2787398847467, 814.01250022556);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 49.1572992549647, 451.03037365466);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -11.1351768833872, -57.3863334655361);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 71.1980242104626, 572.745863967841);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 15.0952976022392, 103.30274980367);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 75.0300005037414, 406.581640027236);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -82.0092720309019, -690.340287049552);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 40.2433497232209, 363.579616486762);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 26.8157962678174, 262.150124949525);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -83.9563210001448, -432.739081022174);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -20.6480437627346, -161.330015497217);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 37.1388896882226, 161.352404658606);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 20.2126667486174, 168.833789818416);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 58.3723632769494, 293.206814023827);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -20.2876832456236, -88.0090685884954);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 72.9768050433371, 691.684023528398);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -21.6612128833675, -130.834158714088);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 97.4870524045038, 806.47904449193);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 60.6688063197852, 255.749289305775);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -44.235772358471, -336.262226570567);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -47.39573087854, -321.133647936626);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -24.7522484346097, -204.548308435727);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -42.903238078129, -239.651563752902);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 20.4656734934697, 172.700213789797);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 56.0665747085147, 365.360390019834);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 31.9979219049038, 237.490140339893);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -29.9884426739069, -203.821484170813);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 13.5011085362703, 79.4784314297668);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 41.8402945507358, 297.04934398378);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -84.9323678979223, -345.2331996232);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -42.2469964847455, -361.468816319656);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 98.1057699772752, 445.181262282444);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 95.5327901766563, 522.663100406047);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 35.0916611161316, 246.796980313209);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 99.3987950082867, 401.97428571655);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -3.0419413965969, -14.5325761725203);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -79.388026451666, -701.817589967372);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -88.451242397524, -668.370526000304);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.3131838963851, 254.418322223563);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -61.518208630511, -347.521623572776);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 45.6124480237487, 356.33565541369);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -1.0716036518037, -7.80544934354423);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 31.7371714687412, 283.925868763573);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -76.771029786315, -626.268489584739);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -67.913690110843, -614.736930677921);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.9311671860034, 171.384205820777);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 94.3264454603021, 914.267819214392);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 76.7493996267558, 705.649611960615);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -87.795202856922, -749.505178721718);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 2.10914716736019, 15.4036733330536);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -50.456669557937, -318.410608422062);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -94.646644883092, -734.660992935541);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.9170862075359, 347.583881438806);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 44.3524585090071, 294.615219199443);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -67.191016143335, -609.956472872497);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -78.826443879164, -369.129912603377);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -50.427554400015, -418.144241602024);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -70.371769526721, -307.02193189609);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 16.3220947890044, 97.0997346831135);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -47.067245718878, -398.27032236792);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 5.91206661301702, 24.7239863780181);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -99.621681801868, -843.593457399484);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 87.4503492670535, 695.345037859433);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -91.176921118057, -683.305064255346);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -0.6632900001386, -5.34157539224209);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 2.98188785882178, 12.1181973600389);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 30.6008700087597, 205.922863867274);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 7.90348761612496, 65.5271597329641);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 40.3565229854156, 268.058138389501);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 37.6892733312091, 247.519083233639);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 16.4759733864001, 107.72661087278);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -53.578492311122, -369.768816039059);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 77.1292326560541, 765.262108306778);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -79.566811593352, -677.545127214159);
+
+-- DEMO_UTIL_CHART
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-17','%Y-%m-%d'),53.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-10','%Y-%m-%d'),62.95747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-21','%Y-%m-%d'),48.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-22','%Y-%m-%d'),51.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-11','%Y-%m-%d'),56.13373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-23','%Y-%m-%d'),53.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-12','%Y-%m-%d'),57.05287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-24','%Y-%m-%d'),51.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-13','%Y-%m-%d'),55.78947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-25','%Y-%m-%d'),54.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-14','%Y-%m-%d'),63.34907);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-26','%Y-%m-%d'),50.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-15','%Y-%m-%d'),52.21327);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-27','%Y-%m-%d'),48.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-16','%Y-%m-%d'),51.32080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-28','%Y-%m-%d'),50.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-17','%Y-%m-%d'),58.35720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-29','%Y-%m-%d'),51.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-18','%Y-%m-%d'),57.62293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-30','%Y-%m-%d'),67.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-19','%Y-%m-%d'),55.25000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-01','%Y-%m-%d'),59.89393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-20','%Y-%m-%d'),58.79573);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-02','%Y-%m-%d'),61.20753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-21','%Y-%m-%d'),54.09720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-03','%Y-%m-%d'),58.98340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-22','%Y-%m-%d'),59.95813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-04','%Y-%m-%d'),59.55873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-23','%Y-%m-%d'),62.03067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-05','%Y-%m-%d'),58.73680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-24','%Y-%m-%d'),61.97620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-06','%Y-%m-%d'),59.89967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-25','%Y-%m-%d'),58.00207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-07','%Y-%m-%d'),60.67973);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-26','%Y-%m-%d'),59.95440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-08','%Y-%m-%d'),60.85913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-27','%Y-%m-%d'),55.43747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-09','%Y-%m-%d'),60.62460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-28','%Y-%m-%d'),52.53933);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-10','%Y-%m-%d'),59.51887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-29','%Y-%m-%d'),57.46260);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-11','%Y-%m-%d'),61.57187);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-30','%Y-%m-%d'),60.04787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-12','%Y-%m-%d'),60.70000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-31','%Y-%m-%d'),58.79480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-13','%Y-%m-%d'),69.85133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-01','%Y-%m-%d'),54.40107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-14','%Y-%m-%d'),68.99620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-02','%Y-%m-%d'),62.26007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-15','%Y-%m-%d'),67.64080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-03','%Y-%m-%d'),60.72360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-16','%Y-%m-%d'),59.71433);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-04','%Y-%m-%d'),60.95847);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-17','%Y-%m-%d'),59.99667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-05','%Y-%m-%d'),59.45920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-18','%Y-%m-%d'),63.27207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-06','%Y-%m-%d'),60.58620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-19','%Y-%m-%d'),60.32080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-07','%Y-%m-%d'),61.94207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-20','%Y-%m-%d'),57.32907);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-08','%Y-%m-%d'),59.03327);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-21','%Y-%m-%d'),59.76933);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-09','%Y-%m-%d'),62.83087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-22','%Y-%m-%d'),59.12453);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-10','%Y-%m-%d'),59.36840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-23','%Y-%m-%d'),57.10167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-11','%Y-%m-%d'),56.11480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-24','%Y-%m-%d'),58.45820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-12','%Y-%m-%d'),62.23393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-25','%Y-%m-%d'),59.45440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-13','%Y-%m-%d'),59.72313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-26','%Y-%m-%d'),60.12807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-14','%Y-%m-%d'),53.37093);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-27','%Y-%m-%d'),59.11760);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-15','%Y-%m-%d'),52.99233);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-28','%Y-%m-%d'),57.32020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-16','%Y-%m-%d'),55.99080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-29','%Y-%m-%d'),59.80360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-17','%Y-%m-%d'),53.93853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-30','%Y-%m-%d'),66.73280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-18','%Y-%m-%d'),55.99313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-31','%Y-%m-%d'),58.78673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-19','%Y-%m-%d'),68.23393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-01','%Y-%m-%d'),58.82773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-20','%Y-%m-%d'),61.86213);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-02','%Y-%m-%d'),63.12100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-21','%Y-%m-%d'),61.20307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-03','%Y-%m-%d'),59.70467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-22','%Y-%m-%d'),61.05900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-04','%Y-%m-%d'),58.85173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-23','%Y-%m-%d'),58.41040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-05','%Y-%m-%d'),61.21880);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-24','%Y-%m-%d'),59.15967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-06','%Y-%m-%d'),58.99920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-25','%Y-%m-%d'),56.42153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-07','%Y-%m-%d'),59.94693);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-26','%Y-%m-%d'),60.46580);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-08','%Y-%m-%d'),66.27293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-27','%Y-%m-%d'),57.44333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-09','%Y-%m-%d'),61.46773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-28','%Y-%m-%d'),56.88887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-10','%Y-%m-%d'),59.70467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-29','%Y-%m-%d'),61.85773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-11','%Y-%m-%d'),60.16000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-30','%Y-%m-%d'),61.96400);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-12','%Y-%m-%d'),61.20300);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-01','%Y-%m-%d'),65.88833);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-13','%Y-%m-%d'),60.95673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-02','%Y-%m-%d'),62.67920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-14','%Y-%m-%d'),60.70207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-03','%Y-%m-%d'),63.52047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-15','%Y-%m-%d'),61.02520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-04','%Y-%m-%d'),58.60280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-16','%Y-%m-%d'),60.33953);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-05','%Y-%m-%d'),63.74487);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-17','%Y-%m-%d'),61.20300);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-06','%Y-%m-%d'),59.94880);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-18','%Y-%m-%d'),63.12100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-07','%Y-%m-%d'),59.44380);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-23','%Y-%m-%d'),61.09153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-08','%Y-%m-%d'),59.16320);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-24','%Y-%m-%d'),61.28867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-09','%Y-%m-%d'),60.84593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-25','%Y-%m-%d'),60.95673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-10','%Y-%m-%d'),58.84113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-26','%Y-%m-%d'),60.61100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-11','%Y-%m-%d'),62.59827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-27','%Y-%m-%d'),61.22913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-12','%Y-%m-%d'),60.94660);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-28','%Y-%m-%d'),58.88507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-13','%Y-%m-%d'),59.37593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-29','%Y-%m-%d'),59.73693);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-14','%Y-%m-%d'),67.21840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-30','%Y-%m-%d'),62.45307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-15','%Y-%m-%d'),68.56020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-01','%Y-%m-%d'),61.30167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-16','%Y-%m-%d'),57.56493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-02','%Y-%m-%d'),62.92727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-17','%Y-%m-%d'),57.02280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-03','%Y-%m-%d'),60.05887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-18','%Y-%m-%d'),56.20947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-06','%Y-%m-%d'),61.20100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-19','%Y-%m-%d'),55.69353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-07','%Y-%m-%d'),60.66120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-20','%Y-%m-%d'),57.17640);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-08','%Y-%m-%d'),59.78180);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-21','%Y-%m-%d'),57.50867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-09','%Y-%m-%d'),58.74653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-22','%Y-%m-%d'),61.67860);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-10','%Y-%m-%d'),59.77893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-23','%Y-%m-%d'),57.34867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-11','%Y-%m-%d'),67.34500);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-24','%Y-%m-%d'),61.68080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-12','%Y-%m-%d'),57.07293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-25','%Y-%m-%d'),55.55793);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-13','%Y-%m-%d'),57.37567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-26','%Y-%m-%d'),55.81013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-14','%Y-%m-%d'),63.97820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-27','%Y-%m-%d'),59.85540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-15','%Y-%m-%d'),56.06647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-28','%Y-%m-%d'),61.05073);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-16','%Y-%m-%d'),53.66347);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-29','%Y-%m-%d'),59.81253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-23','%Y-%m-%d'),56.50813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-30','%Y-%m-%d'),61.02047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-24','%Y-%m-%d'),53.19667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-31','%Y-%m-%d'),60.60413);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-25','%Y-%m-%d'),51.57133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-01','%Y-%m-%d'),57.43067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-26','%Y-%m-%d'),45.98160);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-02','%Y-%m-%d'),58.63027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-27','%Y-%m-%d'),49.21113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-03','%Y-%m-%d'),59.08127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-28','%Y-%m-%d'),49.67213);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-04','%Y-%m-%d'),59.37373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-29','%Y-%m-%d'),52.94053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-05','%Y-%m-%d'),58.13413);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-30','%Y-%m-%d'),57.55727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-06','%Y-%m-%d'),57.18893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-31','%Y-%m-%d'),61.76900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-07','%Y-%m-%d'),56.72853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-01','%Y-%m-%d'),56.51953);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-08','%Y-%m-%d'),56.47340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-02','%Y-%m-%d'),61.04853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-09','%Y-%m-%d'),62.02333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-03','%Y-%m-%d'),70.06067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-10','%Y-%m-%d'),61.21787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-04','%Y-%m-%d'),60.97787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-11','%Y-%m-%d'),62.01087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-05','%Y-%m-%d'),59.25967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-12','%Y-%m-%d'),62.67573);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-06','%Y-%m-%d'),56.12287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-13','%Y-%m-%d'),59.23993);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-07','%Y-%m-%d'),63.99913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-14','%Y-%m-%d'),67.34973);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-08','%Y-%m-%d'),58.71127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-15','%Y-%m-%d'),60.93753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-09','%Y-%m-%d'),64.01913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-16','%Y-%m-%d'),54.52607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-17','%Y-%m-%d'),57.81127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-18','%Y-%m-%d'),63.53027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-19','%Y-%m-%d'),58.13000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-20','%Y-%m-%d'),58.46827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-21','%Y-%m-%d'),65.27807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-22','%Y-%m-%d'),53.74513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-23','%Y-%m-%d'),60.99107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-24','%Y-%m-%d'),60.45427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-25','%Y-%m-%d'),56.16847);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-26','%Y-%m-%d'),59.04040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-27','%Y-%m-%d'),54.62040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-28','%Y-%m-%d'),56.34687);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-29','%Y-%m-%d'),54.81560);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-30','%Y-%m-%d'),60.22753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-01','%Y-%m-%d'),59.07307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-02','%Y-%m-%d'),59.73553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-03','%Y-%m-%d'),68.69447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-04','%Y-%m-%d'),68.91767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-05','%Y-%m-%d'),67.86460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-06','%Y-%m-%d'),64.43120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-01','%Y-%m-%d'),61.22507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-07','%Y-%m-%d'),60.67793);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-02','%Y-%m-%d'),63.27533);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-08','%Y-%m-%d'),62.47060);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-03','%Y-%m-%d'),69.88087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-09','%Y-%m-%d'),58.26053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-04','%Y-%m-%d'),66.84920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-10','%Y-%m-%d'),61.03340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-05','%Y-%m-%d'),61.57367);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-11','%Y-%m-%d'),57.32620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-06','%Y-%m-%d'),60.52293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-12','%Y-%m-%d'),63.10353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-07','%Y-%m-%d'),62.21027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-13','%Y-%m-%d'),61.73167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-08','%Y-%m-%d'),63.20380);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-14','%Y-%m-%d'),65.31080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-09','%Y-%m-%d'),62.72427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-15','%Y-%m-%d'),64.67620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-10','%Y-%m-%d'),61.59373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-16','%Y-%m-%d'),62.87287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-11','%Y-%m-%d'),61.21280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-17','%Y-%m-%d'),60.14680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-12','%Y-%m-%d'),60.79787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-18','%Y-%m-%d'),63.01007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-13','%Y-%m-%d'),60.00080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-19','%Y-%m-%d'),57.82680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-14','%Y-%m-%d'),60.82333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-20','%Y-%m-%d'),62.59173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-15','%Y-%m-%d'),59.62020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-21','%Y-%m-%d'),61.65607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-16','%Y-%m-%d'),60.27420);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-23','%Y-%m-%d'),61.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-17','%Y-%m-%d'),60.06200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-24','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-18','%Y-%m-%d'),60.88900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-25','%Y-%m-%d'),50.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-19','%Y-%m-%d'),59.92547);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-26','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-20','%Y-%m-%d'),59.99853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-27','%Y-%m-%d'),62.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-21','%Y-%m-%d'),58.65873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-28','%Y-%m-%d'),61.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-22','%Y-%m-%d'),60.61000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-29','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-23','%Y-%m-%d'),59.92280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-30','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-24','%Y-%m-%d'),59.52427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-31','%Y-%m-%d'),62.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-25','%Y-%m-%d'),59.44887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-01','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-26','%Y-%m-%d'),60.23540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-02','%Y-%m-%d'),62.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-27','%Y-%m-%d'),61.18333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-03','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-28','%Y-%m-%d'),60.88133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-04','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-29','%Y-%m-%d'),61.74160);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-06','%Y-%m-%d'),62.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-30','%Y-%m-%d'),60.25647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-08','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-31','%Y-%m-%d'),60.41220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-09','%Y-%m-%d'),63.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-01','%Y-%m-%d'),59.21053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-10','%Y-%m-%d'),61.82227);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-02','%Y-%m-%d'),55.04713);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-11','%Y-%m-%d'),61.89553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-03','%Y-%m-%d'),56.08473);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-12','%Y-%m-%d'),60.90127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-04','%Y-%m-%d'),64.51107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-13','%Y-%m-%d'),62.23660);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-05','%Y-%m-%d'),56.75193);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-14','%Y-%m-%d'),61.76947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-06','%Y-%m-%d'),61.64240);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-15','%Y-%m-%d'),63.08853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-07','%Y-%m-%d'),61.33653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-16','%Y-%m-%d'),60.12627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-08','%Y-%m-%d'),69.28867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-17','%Y-%m-%d'),60.60020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-09','%Y-%m-%d'),60.87507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-18','%Y-%m-%d'),60.43440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-10','%Y-%m-%d'),68.08707);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-19','%Y-%m-%d'),65.02820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-11','%Y-%m-%d'),60.57680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-20','%Y-%m-%d'),62.95593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-12','%Y-%m-%d'),61.52467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-21','%Y-%m-%d'),61.23967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-13','%Y-%m-%d'),58.06567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-22','%Y-%m-%d'),62.61853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-14','%Y-%m-%d'),59.80807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-23','%Y-%m-%d'),63.64227);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-15','%Y-%m-%d'),79.90007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-24','%Y-%m-%d'),63.42147);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-16','%Y-%m-%d'),54.75020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-25','%Y-%m-%d'),60.82687);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-17','%Y-%m-%d'),65.69500);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-26','%Y-%m-%d'),60.66260);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-18','%Y-%m-%d'),68.56247);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-27','%Y-%m-%d'),60.12767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-19','%Y-%m-%d'),72.67153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-28','%Y-%m-%d'),60.51513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-20','%Y-%m-%d'),71.30720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-29','%Y-%m-%d'),61.71520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-21','%Y-%m-%d'),57.75233);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-30','%Y-%m-%d'),60.89553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-22','%Y-%m-%d'),59.04200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-31','%Y-%m-%d'),63.50540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-23','%Y-%m-%d'),62.30153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-01','%Y-%m-%d'),62.37533);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-24','%Y-%m-%d'),67.68287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-02','%Y-%m-%d'),60.31400);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-25','%Y-%m-%d'),69.21800);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-03','%Y-%m-%d'),63.43920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-26','%Y-%m-%d'),69.75993);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-04','%Y-%m-%d'),61.20487);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-27','%Y-%m-%d'),64.64113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-05','%Y-%m-%d'),62.11167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-28','%Y-%m-%d'),60.10053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-06','%Y-%m-%d'),59.96140);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-29','%Y-%m-%d'),58.67653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-07','%Y-%m-%d'),62.60727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-30','%Y-%m-%d'),58.29180);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-08','%Y-%m-%d'),61.95493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-01','%Y-%m-%d'),60.56173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-09','%Y-%m-%d'),58.89653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-02','%Y-%m-%d'),57.15840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-10','%Y-%m-%d'),66.20167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-03','%Y-%m-%d'),54.49167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-11','%Y-%m-%d'),64.76873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-04','%Y-%m-%d'),61.54087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-12','%Y-%m-%d'),69.90680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-05','%Y-%m-%d'),63.86073);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-13','%Y-%m-%d'),68.49253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-06','%Y-%m-%d'),64.13460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-14','%Y-%m-%d'),63.19360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-07','%Y-%m-%d'),65.30087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-15','%Y-%m-%d'),63.35453);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-08','%Y-%m-%d'),64.46353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-16','%Y-%m-%d'),59.78020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-09','%Y-%m-%d'),62.81193);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-17','%Y-%m-%d'),60.70760);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-10','%Y-%m-%d'),56.14480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-18','%Y-%m-%d'),58.05167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-11','%Y-%m-%d'),61.47853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-19','%Y-%m-%d'),57.12700);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-12','%Y-%m-%d'),63.39287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-20','%Y-%m-%d'),59.49013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-13','%Y-%m-%d'),64.30640);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-21','%Y-%m-%d'),59.18607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-14','%Y-%m-%d'),64.29447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-22','%Y-%m-%d'),60.94680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-15','%Y-%m-%d'),65.63307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-23','%Y-%m-%d'),59.85807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-16','%Y-%m-%d'),62.32887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-24','%Y-%m-%d'),60.06767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-17','%Y-%m-%d'),56.52853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-25','%Y-%m-%d'),61.60267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-18','%Y-%m-%d'),70.26520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-26','%Y-%m-%d'),60.94220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-19','%Y-%m-%d'),64.38267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-27','%Y-%m-%d'),59.99040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-20','%Y-%m-%d'),63.01447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-28','%Y-%m-%d'),63.05567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-21','%Y-%m-%d'),61.89200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-22','%Y-%m-%d'),62.06920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-23','%Y-%m-%d'),68.49253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-24','%Y-%m-%d'),69.98867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-25','%Y-%m-%d'),60.26940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-26','%Y-%m-%d'),62.91493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-09','%Y-%m-%d'),62.28433);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-27','%Y-%m-%d'),62.36827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-10','%Y-%m-%d'),64.38787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-11','%Y-%m-%d'),61.17093);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-28','%Y-%m-%d'),60.33887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-12','%Y-%m-%d'),57.17713);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-29','%Y-%m-%d'),83.89220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-13','%Y-%m-%d'),57.69653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-30','%Y-%m-%d'),60.96747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-14','%Y-%m-%d'),55.97980);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-31','%Y-%m-%d'),57.80627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-15','%Y-%m-%d'),62.08940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-01','%Y-%m-%d'),61.60173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-16','%Y-%m-%d'),83.81047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-02','%Y-%m-%d'),63.23627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-17','%Y-%m-%d'),61.32540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-03','%Y-%m-%d'),58.39987);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-18','%Y-%m-%d'),61.08900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-04','%Y-%m-%d'),69.51947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-19','%Y-%m-%d'),67.26267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-05','%Y-%m-%d'),69.67787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-20','%Y-%m-%d'),58.71120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-06','%Y-%m-%d'),62.40513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-21','%Y-%m-%d'),55.77320);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-07','%Y-%m-%d'),61.01893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-22','%Y-%m-%d'),59.99420);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-08','%Y-%m-%d'),61.34813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-23','%Y-%m-%d'),60.83867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-24','%Y-%m-%d'),59.57020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-25','%Y-%m-%d'),63.20393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-17','%Y-%m-%d'),67.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-26','%Y-%m-%d'),58.30480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-18','%Y-%m-%d'),64.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-27','%Y-%m-%d'),58.79667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-19','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-28','%Y-%m-%d'),54.04967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-20','%Y-%m-%d'),57.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-29','%Y-%m-%d'),57.88313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-21','%Y-%m-%d'),58.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-30','%Y-%m-%d'),56.94940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-22','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-01','%Y-%m-%d'),65.01080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-23','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-02','%Y-%m-%d'),64.97013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-24','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-03','%Y-%m-%d'),65.06647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-25','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-04','%Y-%m-%d'),64.08287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-26','%Y-%m-%d'),76.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-05','%Y-%m-%d'),65.40367);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-27','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-06','%Y-%m-%d'),72.61373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-28','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-07','%Y-%m-%d'),72.53120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-29','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-08','%Y-%m-%d'),72.54133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-26','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-30','%Y-%m-%d'),54.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-01','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-02','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-03','%Y-%m-%d'),58.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-04','%Y-%m-%d'),60.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-05','%Y-%m-%d'),101.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-06','%Y-%m-%d'),58.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-07','%Y-%m-%d'),59.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-08','%Y-%m-%d'),56.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-09','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-10','%Y-%m-%d'),65.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-11','%Y-%m-%d'),56.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-12','%Y-%m-%d'),54.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-13','%Y-%m-%d'),68.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-14','%Y-%m-%d'),69.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-15','%Y-%m-%d'),66.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-16','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-17','%Y-%m-%d'),60.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-18','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-19','%Y-%m-%d'),55.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-20','%Y-%m-%d'),55.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-21','%Y-%m-%d'),57.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-22','%Y-%m-%d'),57.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-23','%Y-%m-%d'),58.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-24','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-25','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-26','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-27','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-28','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-29','%Y-%m-%d'),59.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-30','%Y-%m-%d'),55.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-31','%Y-%m-%d'),53.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-01','%Y-%m-%d'),56.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-02','%Y-%m-%d'),57.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-03','%Y-%m-%d'),55.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-04','%Y-%m-%d'),57.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-05','%Y-%m-%d'),65.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-06','%Y-%m-%d'),55.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-07','%Y-%m-%d'),57.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-08','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-09','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-10','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-11','%Y-%m-%d'),58.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-12','%Y-%m-%d'),57.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-13','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-14','%Y-%m-%d'),55.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-15','%Y-%m-%d'),55.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-16','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-17','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-18','%Y-%m-%d'),64.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-19','%Y-%m-%d'),59.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-20','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-21','%Y-%m-%d'),57.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-22','%Y-%m-%d'),59.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-23','%Y-%m-%d'),56.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-24','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-25','%Y-%m-%d'),57.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-26','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-27','%Y-%m-%d'),53.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-28','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-29','%Y-%m-%d'),56.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-30','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-01','%Y-%m-%d'),60.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-02','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-03','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-04','%Y-%m-%d'),77.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-05','%Y-%m-%d'),56.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-06','%Y-%m-%d'),55.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-07','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-08','%Y-%m-%d'),57.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-09','%Y-%m-%d'),71.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-10','%Y-%m-%d'),62.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-11','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-12','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-13','%Y-%m-%d'),62.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-14','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-15','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-16','%Y-%m-%d'),62.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-17','%Y-%m-%d'),66.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-18','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-19','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-20','%Y-%m-%d'),57.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-21','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-22','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-23','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-24','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-25','%Y-%m-%d'),52.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-09','%Y-%m-%d'),70.77980);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-10','%Y-%m-%d'),70.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-11','%Y-%m-%d'),60.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-12','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-13','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-14','%Y-%m-%d'),58.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-15','%Y-%m-%d'),68.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-16','%Y-%m-%d'),84.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-17','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-18','%Y-%m-%d'),64.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-19','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-20','%Y-%m-%d'),77.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-21','%Y-%m-%d'),60.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-22','%Y-%m-%d'),65.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-23','%Y-%m-%d'),68.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-24','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-25','%Y-%m-%d'),56.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-26','%Y-%m-%d'),58.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-27','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-28','%Y-%m-%d'),59.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-29','%Y-%m-%d'),58.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-30','%Y-%m-%d'),59.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-27','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-31','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-28','%Y-%m-%d'),305.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-01','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-29','%Y-%m-%d'),62.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-02','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-30','%Y-%m-%d'),60.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-03','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-31','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-04','%Y-%m-%d'),83.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-01','%Y-%m-%d'),55.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-05','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-02','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-06','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-03','%Y-%m-%d'),61.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-07','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-04','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-08','%Y-%m-%d'),57.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-05','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-09','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-06','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-10','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-07','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-11','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-08','%Y-%m-%d'),100.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-12','%Y-%m-%d'),57.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-09','%Y-%m-%d'),62.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-13','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-10','%Y-%m-%d'),66.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-14','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-11','%Y-%m-%d'),61.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-15','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-12','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-16','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-13','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-17','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-14','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-18','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-15','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-19','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-16','%Y-%m-%d'),61.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-20','%Y-%m-%d'),60.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-17','%Y-%m-%d'),70.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-21','%Y-%m-%d'),63.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-18','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-22','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-19','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-23','%Y-%m-%d'),59.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-20','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-24','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-21','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-25','%Y-%m-%d'),63.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-22','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-26','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-23','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-27','%Y-%m-%d'),60.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-24','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-28','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-25','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-29','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-26','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-30','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-27','%Y-%m-%d'),61.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-31','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-28','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-01','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-29','%Y-%m-%d'),61.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-02','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-30','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-03','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-31','%Y-%m-%d'),59.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-04','%Y-%m-%d'),59.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-01','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-05','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-02','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-06','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-03','%Y-%m-%d'),60.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-07','%Y-%m-%d'),59.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-04','%Y-%m-%d'),61.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-08','%Y-%m-%d'),61.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-05','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-09','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-06','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-10','%Y-%m-%d'),60.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-07','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-11','%Y-%m-%d'),58.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-08','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-12','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-09','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-13','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-10','%Y-%m-%d'),60.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-14','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-11','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-15','%Y-%m-%d'),62.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-12','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-16','%Y-%m-%d'),65.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-13','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-14','%Y-%m-%d'),69.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-15','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-16','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-17','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-18','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-19','%Y-%m-%d'),62.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-20','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-21','%Y-%m-%d'),59.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-22','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-23','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-24','%Y-%m-%d'),64.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-25','%Y-%m-%d'),61.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-26','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-27','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-28','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-29','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-01','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-02','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-03','%Y-%m-%d'),60.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-04','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-05','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-06','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-07','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-08','%Y-%m-%d'),62.00000);
+
+commit;
+
+INSERT INTO ConstraintType (id, constraint_type, description) VALUES (1,'Range','Set a range of min and/or max integer/double values the attribute can be set to during policy creation.');
+INSERT INTO ConstraintType (id, constraint_type, description) VALUES (2,'Regular Expression','Define a regular expression the attribute must match against during policy creation.');
+INSERT INTO ConstraintType (id, constraint_type, description) VALUES (3,'Enumeration','Enumerate a set of values that the attribute may be set to during policy creation.');
+
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (4,'subject','S','urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject','intermediary-subject');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (5,'resource','S','urn:oasis:names:tc:xacml:3.0:attribute-category:resource','resource');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (6,'subject','S','urn:oasis:names:tc:xacml:1.0:subject-category:codebase','codebase');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (7,'action','S','urn:oasis:names:tc:xacml:3.0:attribute-category:action','action');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (8,'subject','S','urn:oasis:names:tc:xacml:1.0:subject-category:access-subject','access-subject');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (9,'environment','S','urn:oasis:names:tc:xacml:3.0:attribute-category:environment','environment');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (10,'subject','S','urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine','requesting-machine');
+INSERT INTO Category (id, grouping, is_standard, xacml_id, short_name) VALUES (11,'subject','S','urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject','recipient-subject');
+
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (12,'S','integer','http://www.w3.org/2001/XMLSchema#integer');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (13,'S','base64Binary','http://www.w3.org/2001/XMLSchema#base64Binary');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (14,'S','x500Name','urn:oasis:names:tc:xacml:1.0:data-type:x500Name');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (15,'S','dayTimeDuration','http://www.w3.org/2001/XMLSchema#dayTimeDuration');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (16,'S','time','http://www.w3.org/2001/XMLSchema#time');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (17,'S','dnsName','urn:oasis:names:tc:xacml:2.0:data-type:dnsName');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (18,'S','boolean','http://www.w3.org/2001/XMLSchema#boolean');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (19,'S','dateTime','http://www.w3.org/2001/XMLSchema#dateTime');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (20,'S','rfc822Name','urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (21,'S','date','http://www.w3.org/2001/XMLSchema#date');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (22,'S','ipAddress','urn:oasis:names:tc:xacml:2.0:data-type:ipAddress');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (23,'S','yearMonthDuration','http://www.w3.org/2001/XMLSchema#yearMonthDuration');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (24,'S','hexBinary','http://www.w3.org/2001/XMLSchema#hexBinary');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (25,'S','double','http://www.w3.org/2001/XMLSchema#double');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (26,'S','string','http://www.w3.org/2001/XMLSchema#string');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (27,'S','anyURI','http://www.w3.org/2001/XMLSchema#anyURI');
+INSERT INTO Datatype (id, is_standard, short_name, xacml_id) VALUES (28,'S','xpathExpression','urn:oasis:names:tc:xacml:3.0:data-type:xpathExpression');
+
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (29,'S','ordered-deny-overrides','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-deny-overrides');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (30,'S','on-permit-apply-second','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:on-permit-apply-second');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (31,'S','deny-overrides','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (32,'S','permit-unless-deny','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-unless-deny');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (33,'S','deny-unless-permit','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (34,'S','permit-overrides','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-overrides');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (35,'S','only-one-applicable','urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:only-one-applicable');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (36,'S','first-applicable','urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:first-applicable');
+INSERT INTO PolicyAlgorithms (id, is_standard, short_name, xacml_id) VALUES (37,'S','ordered-permit-overrides','urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-permit-overrides');
+
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (38,'S','permit-unless-deny','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (39,'S','permit-overrides','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (40,'S','deny-overrides','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (41,'S','ordered-permit-overrides','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-permit-overrides');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (42,'S','deny-unless-permit','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (43,'S','ordered-deny-overrides','urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-deny-overrides');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (44,'S','only-one-applicable','urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:only-one-applicable');
+INSERT INTO RuleAlgorithms (id, is_standard, short_name, xacml_id) VALUES (45,'S','first-applicable','urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable');
+
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (1,'integer-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (2,'integer-subtract','urn:oasis:names:tc:xacml:1.0:function:integer-subtract',12,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (3,'double-to-integer','urn:oasis:names:tc:xacml:1.0:function:double-to-integer',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (4,'integer-one-and-only','urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (5,'double-one-and-only','urn:oasis:names:tc:xacml:1.0:function:double-one-and-only',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (6,'string-equal','urn:oasis:names:tc:xacml:1.0:function:string-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (7,'string-equal-ignore-case','urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (8,'string-starts-with','urn:oasis:names:tc:xacml:3.0:function:string-starts-with',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (9,'string-ends-with','urn:oasis:names:tc:xacml:3.0:function: string-ends-with',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (10,'string-concatenate','urn:oasis:names:tc:xacml:2.0:function:string-concatenate',26,0,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (11,'boolean-from-string','urn:oasis:names:tc:xacml:3.0:function:boolean-from-string',18,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (12,'string-from-boolean','urn:oasis:names:tc:xacml:3.0:function:string-from-boolean',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (13,'integer-from-string','urn:oasis:names:tc:xacml:3.0:function:integer-from-string',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (14,'string-from-integer','urn:oasis:names:tc:xacml:3.0:function:string-from-integer',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (15,'double-from-string','urn:oasis:names:tc:xacml:3.0:function:double-from-string',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (16,'string-from-double','urn:oasis:names:tc:xacml:3.0:function:string-from-double',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (17,'time-from-string','urn:oasis:names:tc:xacml:3.0:function:time-from-string',16,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (18,'string-from-time','urn:oasis:names:tc:xacml:3.0:function:string-from-time',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (19,'date-from-string','urn:oasis:names:tc:xacml:3.0:function:date-from-string',21,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (20,'string-from-date','urn:oasis:names:tc:xacml:3.0:function:string-from-date',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (21,'dateTime-from-string','urn:oasis:names:tc:xacml:3.0:function:dateTime-from-string',19,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (22,'string-from-dateTime','urn:oasis:names:tc:xacml:3.0:function:string-from-dateTime',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (23,'anyURI-from-string','urn:oasis:names:tc:xacml:3.0:function:anyURI-from-string',27,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (24,'string-from-anyURI','urn:oasis:names:tc:xacml:3.0:function:string-from-anyURI',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (25,'dayTimeDuration-from-string','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-from-string',15,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (26,'string-from-dayTimeDuration','urn:oasis:names:tc:xacml:3.0:function:string-from-dayTimeDuration',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (27,'yearMonthDuration-from-string','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-from-string',23,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (28,'string-from-yearMonthDuration','urn:oasis:names:tc:xacml:3.0:function:string-from-yearMonthDuration',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (29,'x500Name-from-string','urn:oasis:names:tc:xacml:3.0:function:x500Name-from-string',14,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (30,'string-from-x500Name','urn:oasis:names:tc:xacml:3.0:function:string-from-x500Name',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (31,'rfc822Name-from-string','urn:oasis:names:tc:xacml:3.0:function:rfc822Name-from-string',20,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (32,'string-from-rfc822Name','urn:oasis:names:tc:xacml:3.0:function:string-from-rfc822Name',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (33,'ipAddress-from-string','urn:oasis:names:tc:xacml:3.0:function:ipAddress-from-string',22,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (34,'string-from-ipAddress','urn:oasis:names:tc:xacml:3.0:function:string-from-ipAddress',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (35,'dnsName-from-string','urn:oasis:names:tc:xacml:3.0:function:dnsName-from-string',17,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (36,'string-from-dnsName','urn:oasis:names:tc:xacml:3.0:function:string-from-dnsName',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (37,'anyURI-starts-with','urn:oasis:names:tc:xacml:3.0:function:anyURI-starts-with',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (38,'anyURI-ends-with','urn:oasis:names:tc:xacml:3.0:function:anyURI-ends-with',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (39,'string-contains','urn:oasis:names:tc:xacml:3.0:function:string-contains',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (40,'anyURI-contains','urn:oasis:names:tc:xacml:3.0:function:anyURI-contains',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (41,'string-substring','urn:oasis:names:tc:xacml:3.0:function:string-substring',26,0,0,3,3,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (42,'anyURI-substring','urn:oasis:names:tc:xacml:3.0:function:anyURI-substring',26,0,0,3,3,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (43,'boolean-equal','urn:oasis:names:tc:xacml:1.0:function:boolean-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (44,'integer-equal','urn:oasis:names:tc:xacml:1.0:function:integer-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (45,'double-equal','urn:oasis:names:tc:xacml:1.0:function:double-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (46,'date-equal','urn:oasis:names:tc:xacml:1.0:function:date-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (47,'time-equal','urn:oasis:names:tc:xacml:1.0:function:time-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (48,'dateTime-equal','urn:oasis:names:tc:xacml:1.0:function:dateTime-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (49,'dayTimeDuration-equal','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (50,'yearMonthDuration-equal','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (51,'anyURI-equal','urn:oasis:names:tc:xacml:1.0:function:anyURI-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (52,'x500Name-equal','urn:oasis:names:tc:xacml:1.0:function:x500Name-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (53,'rfc822Name-equal','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (54,'hexBinary-equal','urn:oasis:names:tc:xacml:1.0:function:hexBinary-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (55,'base64Binary-equal','urn:oasis:names:tc:xacml:1.0:function:base64Binary-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (56,'integer-add','urn:oasis:names:tc:xacml:1.0:function:integer-add',12,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (57,'double-add','urn:oasis:names:tc:xacml:1.0:function:double-add',25,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (58,'double-subtract','urn:oasis:names:tc:xacml:1.0:function:double-subtract',25,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (59,'integer-multiply','urn:oasis:names:tc:xacml:1.0:function:integer-multiply',12,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (60,'double-multiply','urn:oasis:names:tc:xacml:1.0:function:double-multiply',25,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (61,'integer-divide','urn:oasis:names:tc:xacml:1.0:function:integer-divide',12,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (62,'double-divide','urn:oasis:names:tc:xacml:1.0:function:double-divide',25,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (63,'integer-mod','urn:oasis:names:tc:xacml:1.0:function:integer-mod',12,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (64,'integer-abs','urn:oasis:names:tc:xacml:1.0:function:integer-abs',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (65,'double-abs','urn:oasis:names:tc:xacml:1.0:function:double-abs',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (66,'round','urn:oasis:names:tc:xacml:1.0:function:round',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (67,'floor','urn:oasis:names:tc:xacml:1.0:function:floor',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (68,'string-normalize-space','urn:oasis:names:tc:xacml:1.0:function:string-normalize-space',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (69,'string-normalize-to-lower-case','urn:oasis:names:tc:xacml:1.0:function:string-normalize-to-lower-case',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (70,'integer-to-double','urn:oasis:names:tc:xacml:1.0:function:integer-to-double',25,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (71,'integer-greater-than','urn:oasis:names:tc:xacml:1.0:function:integer-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (72,'integer-less-than','urn:oasis:names:tc:xacml:1.0:function:integer-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (73,'integer-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:integer-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (74,'double-greater-than','urn:oasis:names:tc:xacml:1.0:function:double-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (75,'double-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:double-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (76,'double-less-than','urn:oasis:names:tc:xacml:1.0:function:double-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (77,'double-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:double-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (78,'dateTime-add-dayTimeDuration','urn:oasis:names:tc:xacml:3.0:function:dateTime-add-dayTimeDuration',19,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (79,'dateTime-add-yearMonthDuration','urn:oasis:names:tc:xacml:3.0:function:dateTime-add-yearMonthDuration',19,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (80,'dateTime-subtract-dayTimeDuration','urn:oasis:names:tc:xacml:3.0:function:dateTime-subtract-dayTimeDuration',19,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (81,'dateTime-subtract-yearMonthDuration','urn:oasis:names:tc:xacml:3.0:function:dateTime-subtract-yearMonthDuration',19,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (82,'date-add-yearMonthDuration','urn:oasis:names:tc:xacml:3.0:function:date-add-yearMonthDuration',21,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (83,'date-subtract-yearMonthDuration','urn:oasis:names:tc:xacml:3.0:function:date-subtract-yearMonthDuration',21,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (84,'string-greater-than','urn:oasis:names:tc:xacml:1.0:function:string-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (85,'string-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:string-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (86,'string-less-than','urn:oasis:names:tc:xacml:1.0:function:string-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (87,'string-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:string-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (88,'time-greater-than','urn:oasis:names:tc:xacml:1.0:function:time-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (89,'time-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:time-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (90,'time-less-than','urn:oasis:names:tc:xacml:1.0:function:time-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (91,'time-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:time-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (92,'time-in-range','urn:oasis:names:tc:xacml:2.0:function:time-in-range',18,0,0,3,3,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (93,'dateTime-greater-than','urn:oasis:names:tc:xacml:1.0:function:dateTime-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (94,'dateTime-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:dateTime-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (95,'dateTime-less-than','urn:oasis:names:tc:xacml:1.0:function:dateTime-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (96,'dateTime-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:dateTime-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (97,'date-greater-than','urn:oasis:names:tc:xacml:1.0:function:date-greater-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (98,'date-greater-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:date-greater-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (99,'date-less-than','urn:oasis:names:tc:xacml:1.0:function:date-less-than',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (100,'date-less-than-or-equal','urn:oasis:names:tc:xacml:1.0:function:date-less-than-or-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (101,'string-one-and-only','urn:oasis:names:tc:xacml:1.0:function:string-one-and-only',26,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (102,'string-bag-size','urn:oasis:names:tc:xacml:1.0:function:string-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (103,'string-is-in','urn:oasis:names:tc:xacml:1.0:function:string-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (104,'string-bag','urn:oasis:names:tc:xacml:1.0:function:string-bag',26,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (105,'integer-bag-size','urn:oasis:names:tc:xacml:1.0:function:integer-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (106,'integer-is-in','urn:oasis:names:tc:xacml:1.0:function:integer-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (107,'integer-bag','urn:oasis:names:tc:xacml:1.0:function:integer-bag',12,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (108,'double-bag-size','urn:oasis:names:tc:xacml:1.0:function:double-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (109,'double-is-in','urn:oasis:names:tc:xacml:1.0:function:double-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (110,'double-bag','urn:oasis:names:tc:xacml:1.0:function:double-bag',25,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (111,'boolean-one-and-only','urn:oasis:names:tc:xacml:1.0:function:boolean-one-and-only',18,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (112,'boolean-bag-size','urn:oasis:names:tc:xacml:1.0:function:boolean-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (113,'boolean-is-in','urn:oasis:names:tc:xacml:1.0:function:boolean-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (114,'boolean-bag','urn:oasis:names:tc:xacml:1.0:function:boolean-bag',18,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (115,'time-one-and-only','urn:oasis:names:tc:xacml:1.0:function:time-one-and-only',16,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (116,'time-bag-size','urn:oasis:names:tc:xacml:1.0:function:time-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (117,'time-is-in','urn:oasis:names:tc:xacml:1.0:function:time-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (118,'time-bag','urn:oasis:names:tc:xacml:1.0:function:time-bag',16,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (119,'date-one-and-only','urn:oasis:names:tc:xacml:1.0:function:date-one-and-only',21,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (120,'date-bag-size','urn:oasis:names:tc:xacml:1.0:function:date-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (121,'date-is-in','urn:oasis:names:tc:xacml:1.0:function:date-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (122,'date-bag','urn:oasis:names:tc:xacml:1.0:function:date-bag',21,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (123,'dateTime-one-and-only','urn:oasis:names:tc:xacml:1.0:function:dateTime-one-and-only',19,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (124,'dateTime-bag-size','urn:oasis:names:tc:xacml:1.0:function:dateTime-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (125,'dateTime-is-in','urn:oasis:names:tc:xacml:1.0:function:dateTime-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (126,'dateTime-bag','urn:oasis:names:tc:xacml:1.0:function:dateTime-bag',19,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (127,'anyURI-one-and-only','urn:oasis:names:tc:xacml:1.0:function:anyURI-one-and-only',27,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (128,'anyURI-bag-size','urn:oasis:names:tc:xacml:1.0:function:anyURI-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (129,'anyURI-is-in','urn:oasis:names:tc:xacml:1.0:function:anyURI-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (130,'anyURI-bag','urn:oasis:names:tc:xacml:1.0:function:anyURI-bag',27,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (131,'hexBinary-one-and-only','urn:oasis:names:tc:xacml:1.0:function:hexBinary-one-and-only',24,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (132,'hexBinary-bag-size','urn:oasis:names:tc:xacml:1.0:function:hexBinary-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (133,'hexBinary-is-in','urn:oasis:names:tc:xacml:1.0:function:hexBinary-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (134,'hexBinary-bag','urn:oasis:names:tc:xacml:1.0:function:hexBinary-bag',24,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (135,'base64Binary-one-and-only','urn:oasis:names:tc:xacml:1.0:function:base64Binary-one-and-only',13,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (136,'base64Binary-bag-size','urn:oasis:names:tc:xacml:1.0:function:base64Binary-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (137,'base64Binary-is-in','urn:oasis:names:tc:xacml:1.0:function:base64Binary-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (138,'base64Binary-bag','urn:oasis:names:tc:xacml:1.0:function:base64Binary-bag',13,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (139,'dayTimeDuration-one-and-only','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-one-and-only',15,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (140,'dayTimeDuration-bag-size','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (141,'dayTimeDuration-is-in','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (142,'dayTimeDuration-bag','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-bag',15,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (143,'yearMonthDuration-one-and-only','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-one-and-only',23,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (144,'yearMonthDuration-bag-size','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (145,'yearMonthDuration-is-in','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (146,'yearMonthDuration-bag','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-bag',23,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (147,'x500Name-one-and-only','urn:oasis:names:tc:xacml:1.0:function:x500Name-one-and-only',14,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (148,'x500Name-bag-size','urn:oasis:names:tc:xacml:1.0:function:x500Name-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (149,'x500Name-is-in','urn:oasis:names:tc:xacml:1.0:function:x500Name-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (150,'x500Name-bag','urn:oasis:names:tc:xacml:1.0:function:x500Name-bag',14,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (151,'rfc822Name-one-and-only','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-one-and-only',20,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (152,'rfc822Name-bag-size','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (153,'rfc822Name-is-in','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (154,'rfc822Name-bag','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-bag',20,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (155,'ipAddress-one-and-only','urn:oasis:names:tc:xacml:2.0:function:ipAddress-one-and-only',22,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (156,'ipAddress-bag-size','urn:oasis:names:tc:xacml:2.0:function:ipAddress-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (157,'ipAddress-is-in','urn:oasis:names:tc:xacml:2.0:function:ipAddress-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (158,'ipAddress-bag','urn:oasis:names:tc:xacml:2.0:function:ipAddress-bag',22,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (159,'dnsName-one-and-only','urn:oasis:names:tc:xacml:2.0:function:dnsName-one-and-only',17,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (160,'dnsName-bag-size','urn:oasis:names:tc:xacml:2.0:function:dnsName-bag-size',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (161,'dnsName-is-in','urn:oasis:names:tc:xacml:2.0:function:dnsName-is-in',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (162,'dnsName-bag','urn:oasis:names:tc:xacml:2.0:function:dnsName-bag',17,1,0,1,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (163,'string-regexp-match','urn:oasis:names:tc:xacml:1.0:function:string-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (164,'anyURI-regexp-match','urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (165,'ipAddress-regexp-match','urn:oasis:names:tc:xacml:2.0:function:ipAddress-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (166,'dnsName-regexp-match','urn:oasis:names:tc:xacml:2.0:function:dnsName-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (167,'rfc822Name-regexp-match','urn:oasis:names:tc:xacml:2.0:function:rfc822Name-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (168,'x500Name-regexp-match','urn:oasis:names:tc:xacml:2.0:function:x500Name-regexp-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (169,'string-intersection','urn:oasis:names:tc:xacml:1.0:function:string-intersection',26,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (170,'string-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (171,'string-union','urn:oasis:names:tc:xacml:1.0:function:string-union',26,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (172,'string-subset','urn:oasis:names:tc:xacml:1.0:function:string-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (173,'string-set-equals','urn:oasis:names:tc:xacml:1.0:function:string-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (174,'integer-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:integer-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (175,'integer-union','urn:oasis:names:tc:xacml:1.0:function:integer-union',12,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (176,'integer-subset','urn:oasis:names:tc:xacml:1.0:function:integer-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (177,'integer-set-equals','urn:oasis:names:tc:xacml:1.0:function:integer-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (178,'double-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:double-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (179,'double-union','urn:oasis:names:tc:xacml:1.0:function:double-union',25,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (180,'double-subset','urn:oasis:names:tc:xacml:1.0:function:double-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (181,'double-set-equals','urn:oasis:names:tc:xacml:1.0:function:double-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (182,'boolean-intersection','urn:oasis:names:tc:xacml:1.0:function:boolean-intersection',18,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (183,'boolean-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:boolean-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (184,'boolean-union','urn:oasis:names:tc:xacml:1.0:function:boolean-union',18,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (185,'boolean-subset','urn:oasis:names:tc:xacml:1.0:function:boolean-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (186,'boolean-set-equals','urn:oasis:names:tc:xacml:1.0:function:boolean-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (187,'time-intersection','urn:oasis:names:tc:xacml:1.0:function:time-intersection',16,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (188,'time-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:time-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (189,'time-union','urn:oasis:names:tc:xacml:1.0:function:time-union',16,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (190,'time-subset','urn:oasis:names:tc:xacml:1.0:function:time-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (191,'time-set-equals','urn:oasis:names:tc:xacml:1.0:function:time-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (192,'date-intersection','urn:oasis:names:tc:xacml:1.0:function:date-intersection',21,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (193,'date-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:date-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (194,'date-union','urn:oasis:names:tc:xacml:1.0:function:date-union',21,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (195,'date-subset','urn:oasis:names:tc:xacml:1.0:function:date-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (196,'date-set-equals','urn:oasis:names:tc:xacml:1.0:function:date-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (197,'dateTime-intersection','urn:oasis:names:tc:xacml:1.0:function:dateTime-intersection',19,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (198,'dateTime-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:dateTime-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (199,'dateTime-union','urn:oasis:names:tc:xacml:1.0:function:dateTime-union',19,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (200,'dateTime-subset','urn:oasis:names:tc:xacml:1.0:function:dateTime-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (201,'dateTime-set-equals','urn:oasis:names:tc:xacml:1.0:function:dateTime-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (202,'anyURI-intersection','urn:oasis:names:tc:xacml:1.0:function:anyURI-intersection',27,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (203,'anyURI-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:anyURI-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (204,'anyURI-union','urn:oasis:names:tc:xacml:1.0:function:anyURI-union',27,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (205,'anyURI-subset','urn:oasis:names:tc:xacml:1.0:function:anyURI-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (206,'anyURI-set-equals','urn:oasis:names:tc:xacml:1.0:function:anyURI-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (207,'hexBinary-intersection','urn:oasis:names:tc:xacml:1.0:function:hexBinary-intersection',24,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (208,'hexBinary-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:hexBinary-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (209,'hexBinary-union','urn:oasis:names:tc:xacml:1.0:function:hexBinary-union',24,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (210,'hexBinary-subset','urn:oasis:names:tc:xacml:1.0:function:hexBinary-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (211,'hexBinary-set-equals','urn:oasis:names:tc:xacml:1.0:function:hexBinary-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (212,'base64Binary-intersection','urn:oasis:names:tc:xacml:1.0:function:base64Binary-intersection',13,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (213,'base64Binary-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:base64Binary-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (214,'base64Binary-union','urn:oasis:names:tc:xacml:1.0:function:base64Binary-union',13,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (215,'base64Binary-subset','urn:oasis:names:tc:xacml:1.0:function:base64Binary-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (216,'base64Binary-set-equals','urn:oasis:names:tc:xacml:1.0:function:base64Binary-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (217,'dayTimeDuration-intersection','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-intersection',15,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (218,'dayTimeDuration-at-least-one-member-of','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (219,'dayTimeDuration-union','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-union',15,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (220,'dayTimeDuration-subset','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (221,'dayTimeDuration-set-equals','urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (222,'yearMonthDuration-intersection','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-intersection',23,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (223,'yearMonthDuration-at-least-one-member-of','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (224,'yearMonthDuration-union','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-union',23,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (225,'yearMonthDuration-subset','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (226,'yearMonthDuration-set-equals','urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (227,'x500Name-intersection','urn:oasis:names:tc:xacml:1.0:function:x500Name-intersection',14,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (228,'x500Name-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:x500Name-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (229,'x500Name-union','urn:oasis:names:tc:xacml:1.0:function:x500Name-union',14,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (230,'x500Name-subset','urn:oasis:names:tc:xacml:1.0:function:x500Name-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (231,'x500Name-set-equals','urn:oasis:names:tc:xacml:1.0:function:x500Name-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (232,'rfc822Name-intersection','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-intersection',20,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (233,'rfc822Name-at-least-one-member-of','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-at-least-one-member-of',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (234,'rfc822Name-union','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-union',20,1,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (235,'rfc822Name-subset','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-subset',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (236,'rfc822Name-set-equals','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-set-equals',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (237,'x500Name-match','urn:oasis:names:tc:xacml:1.0:function:x500Name-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (238,'rfc822Name-match','urn:oasis:names:tc:xacml:1.0:function:rfc822Name-match',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (239,'integer-intersection','urn:oasis:names:tc:xacml:1.0:function:integer-intersection',12,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (240,'double-intersection','urn:oasis:names:tc:xacml:1.0:function:double-intersection',25,1,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (241,'or','urn:oasis:names:tc:xacml:1.0:function:or',18,0,0,0,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (242,'and','urn:oasis:names:tc:xacml:1.0:function:and',18,0,0,0,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (243,'n-of','urn:oasis:names:tc:xacml:1.0:function:n-of',18,0,0,2,-1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (244,'not','urn:oasis:names:tc:xacml:1.0:function:not',18,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (245,'any-of','urn:oasis:names:tc:xacml:3.0:function:any-of',18,0,1,2,-1,1,-1,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (246,'all-of','urn:oasis:names:tc:xacml:3.0:function:all-of',18,0,1,2,-1,1,-1,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (247,'any-of-any','urn:oasis:names:tc:xacml:3.0:function:any-of-any',18,0,1,2,-1,1,-1,0);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (248,'all-of-any','urn:oasis:names:tc:xacml:1.0:function:all-of-any',18,0,1,3,3,2,2,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (249,'any-of-all','urn:oasis:names:tc:xacml:1.0:function:any-of-all',18,0,1,3,3,2,2,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (250,'all-of-all','urn:oasis:names:tc:xacml:1.0:function:all-of-all',18,0,1,3,3,2,2,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (251,'map','urn:oasis:names:tc:xacml:3.0:function:map',NULL,1,1,2,-1,1,-1,1);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (252,'xpath-node-count','urn:oasis:names:tc:xacml:3.0:function:xpath-node-count',12,0,0,1,1,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (253,'xpath-node-equal','urn:oasis:names:tc:xacml:3.0:function:xpath-node-equal',18,0,0,2,2,NULL,NULL,NULL);
+INSERT INTO FunctionDefinition (id, short_name, xacml_id, return_datatype, is_bag_return, is_higher_order, arg_lb, arg_ub, ho_arg_lb, ho_arg_ub, ho_primitive) VALUES (254,'xpath-node-match','urn:oasis:names:tc:xacml:3.0:function:xpath-node-match',18,0,0,2,2,NULL,NULL,NULL);
+
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (1,0,1,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (2,0,1,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (3,0,2,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (4,0,2,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (5,0,3,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (6,1,4,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (7,1,5,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (8,0,6,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (9,0,6,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (10,0,7,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (11,0,7,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (12,0,8,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (13,0,8,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (14,0,9,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (15,0,9,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (16,0,10,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (17,0,11,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (18,0,12,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (19,0,13,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (20,0,14,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (21,0,15,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (22,0,16,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (23,0,17,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (24,0,18,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (25,0,19,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (26,0,20,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (27,0,21,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (28,0,22,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (29,0,23,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (30,0,24,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (31,0,25,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (32,0,26,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (33,0,27,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (34,0,28,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (35,0,29,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (36,0,30,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (37,0,31,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (38,0,32,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (39,0,33,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (40,0,34,1,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (41,0,35,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (42,0,36,1,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (43,0,37,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (44,0,37,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (45,0,38,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (46,0,38,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (47,0,39,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (48,0,39,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (49,0,40,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (50,0,40,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (51,0,41,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (52,0,41,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (53,0,41,3,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (54,0,42,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (55,0,42,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (56,0,42,3,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (57,0,43,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (58,0,43,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (59,0,44,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (60,0,44,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (61,0,45,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (62,0,45,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (63,0,46,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (64,0,46,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (65,0,47,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (66,0,47,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (67,0,48,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (68,0,48,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (69,0,49,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (70,0,49,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (71,0,50,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (72,0,50,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (73,0,51,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (74,0,51,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (75,0,52,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (76,0,52,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (77,0,53,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (78,0,53,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (79,0,54,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (80,0,54,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (81,0,55,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (82,0,55,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (83,0,56,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (84,0,56,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (85,0,57,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (86,0,57,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (89,0,58,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (90,0,58,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (91,0,59,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (92,0,59,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (93,0,60,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (94,0,60,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (95,0,61,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (96,0,61,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (97,0,62,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (98,0,62,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (99,0,63,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (100,0,63,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (101,0,64,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (102,0,65,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (103,0,66,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (104,0,67,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (125,0,68,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (126,0,69,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (128,0,70,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (129,0,71,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (130,0,71,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (131,0,72,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (132,0,72,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (133,0,73,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (134,0,73,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (135,0,74,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (136,0,74,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (137,0,75,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (138,0,75,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (139,0,76,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (140,0,76,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (141,0,77,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (142,0,77,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (143,0,78,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (144,0,78,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (145,0,79,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (146,0,79,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (147,0,80,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (148,0,80,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (149,0,81,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (150,0,81,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (151,0,82,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (152,0,82,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (153,0,83,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (154,0,83,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (155,0,84,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (156,0,84,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (157,0,85,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (158,0,85,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (159,0,86,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (160,0,86,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (161,0,87,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (162,0,87,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (163,0,88,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (164,0,88,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (165,0,89,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (166,0,89,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (167,0,90,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (168,0,90,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (169,0,91,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (170,0,91,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (171,0,92,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (172,0,92,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (173,0,93,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (174,0,93,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (175,0,94,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (176,0,94,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (177,0,95,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (178,0,95,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (179,0,96,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (180,0,96,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (181,0,97,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (182,0,97,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (183,0,98,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (184,0,98,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (185,0,99,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (186,0,99,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (187,0,100,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (188,0,100,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (189,1,101,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (190,1,102,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (191,0,103,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (192,1,103,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (193,0,104,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (194,1,105,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (195,0,106,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (196,1,106,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (197,0,107,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (198,1,108,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (199,0,109,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (200,1,109,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (201,0,110,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (202,1,111,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (203,1,112,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (204,0,113,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (205,1,113,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (206,0,114,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (207,1,115,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (208,1,116,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (209,0,117,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (210,1,117,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (211,0,118,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (212,1,119,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (213,1,120,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (214,0,121,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (215,1,121,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (216,0,122,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (217,1,123,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (218,1,124,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (219,0,125,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (220,1,125,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (221,0,126,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (222,1,127,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (223,1,128,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (224,0,129,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (225,1,129,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (226,0,130,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (227,1,131,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (228,1,132,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (229,0,133,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (230,1,133,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (231,0,134,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (232,1,135,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (233,1,136,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (234,0,137,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (235,1,137,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (236,0,138,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (237,1,139,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (238,1,140,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (239,0,141,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (240,1,141,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (241,0,142,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (242,1,143,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (243,1,144,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (244,1,145,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (245,0,145,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (246,0,146,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (247,1,147,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (248,1,148,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (249,0,149,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (250,1,149,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (251,0,150,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (252,1,151,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (253,1,152,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (254,0,153,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (255,1,153,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (256,0,154,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (257,1,155,1,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (258,1,156,1,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (259,0,157,1,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (260,1,157,2,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (261,0,158,1,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (262,1,159,1,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (263,1,160,1,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (264,0,161,1,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (265,1,161,2,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (266,0,162,1,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (267,0,163,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (268,0,163,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (269,0,164,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (270,0,164,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (271,0,165,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (272,0,165,2,22);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (273,0,166,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (274,0,166,2,17);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (275,0,167,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (276,0,167,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (277,0,168,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (278,0,168,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (279,1,169,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (280,1,169,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (281,1,170,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (282,1,170,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (283,1,171,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (284,1,172,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (285,1,172,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (286,1,173,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (287,1,173,2,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (288,1,174,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (289,1,174,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (290,1,175,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (292,1,176,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (293,1,176,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (294,1,177,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (295,1,177,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (296,1,178,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (297,1,178,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (298,1,179,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (299,1,180,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (300,1,180,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (301,1,181,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (302,1,181,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (303,1,182,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (304,1,182,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (305,1,183,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (306,1,183,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (307,1,184,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (308,1,185,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (309,1,185,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (310,1,186,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (311,1,186,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (312,1,187,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (313,1,187,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (314,1,188,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (315,1,188,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (316,1,189,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (317,1,190,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (318,1,190,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (319,1,191,1,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (320,1,191,2,16);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (321,1,192,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (322,1,192,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (323,1,193,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (324,1,193,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (325,1,194,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (326,1,195,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (327,1,195,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (328,1,196,1,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (329,1,196,2,21);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (330,1,197,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (331,1,197,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (332,1,198,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (333,1,198,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (334,1,199,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (335,1,200,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (336,1,200,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (337,1,201,1,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (338,1,201,2,19);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (339,1,202,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (340,1,202,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (341,1,203,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (342,1,203,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (343,1,204,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (344,1,205,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (345,1,205,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (346,1,206,1,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (347,1,206,2,27);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (348,1,207,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (349,1,207,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (350,1,208,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (351,1,208,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (352,1,209,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (353,1,210,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (354,1,210,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (355,1,211,1,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (356,1,211,2,24);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (357,1,212,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (358,1,212,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (359,1,213,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (360,1,213,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (361,1,214,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (362,1,215,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (363,1,215,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (364,1,216,1,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (365,1,216,2,13);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (366,1,217,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (367,1,217,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (368,1,218,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (369,1,218,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (370,1,219,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (371,1,220,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (372,1,220,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (373,1,221,1,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (374,1,221,2,15);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (375,1,222,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (376,1,222,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (377,1,223,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (378,1,223,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (380,1,224,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (381,1,225,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (382,1,225,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (383,1,226,2,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (384,1,226,1,23);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (385,1,227,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (386,1,227,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (387,1,228,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (388,1,228,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (389,1,229,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (390,1,230,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (391,1,230,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (392,1,231,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (393,1,231,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (394,1,232,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (395,1,232,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (396,1,233,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (397,1,233,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (398,1,234,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (399,1,235,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (400,1,235,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (401,1,236,1,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (402,1,236,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (403,0,237,1,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (404,0,237,2,14);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (405,0,238,1,26);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (406,0,238,2,20);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (407,1,239,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (408,1,239,2,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (409,1,240,1,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (410,1,240,2,25);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (411,0,241,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (412,0,242,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (413,0,243,1,12);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (414,0,243,2,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (415,0,244,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (416,0,245,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (417,0,245,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (418,1,245,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (419,0,246,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (420,0,246,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (421,1,246,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (422,0,247,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (423,1,247,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (424,1,247,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (433,0,248,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (434,1,248,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (435,1,248,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (436,0,249,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (437,1,249,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (438,1,249,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (439,0,250,1,18);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (440,1,250,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (441,1,250,3,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (442,0,251,1,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (447,1,251,2,NULL);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (448,0,252,1,28);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (449,0,253,1,28);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (450,0,253,2,28);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (451,0,254,1,28);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (452,0,254,2,28);
+INSERT INTO FunctionArguments (id, is_bag, function_id, arg_index, datatype_id) VALUES (453,0,92,3,16);
+
+INSERT INTO PIPType VALUES (500,'SQL'), (501,'LDAP'), (502,'CSV'), (503,'Hyper-CSV'), (504,'Custom');
+
+INSERT INTO GlobalRoleSettings (role, lockdown) values ('super-admin', '0');
+
+INSERT INTO `ecomp_sdk`.`roles` (`id`, `loginid`, `role`) VALUES ('2', 'API', 'super-admin');
+INSERT INTO `ecomp_sdk`.`roles` (`id`, `loginid`, `role`) VALUES ('3', 'demo', 'super-admin');
+
+INSERT INTO `ecomp_sdk`.`USERINFO` (`loginid`, `NAME`) VALUES ('API', 'API');
+INSERT INTO `ecomp_sdk`.`USERINFO` (`loginid`, `NAME`) VALUES ('demo', 'Demo');
+
+INSERT INTO `ecomp_sdk`.`dcaeuuid` (`ID`, `name`, `description`) VALUES ('2', '/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer', 'vLoadBalancer');
+INSERT INTO `ecomp_sdk`.`dcaeuuid` (`ID`, `name`, `description`) VALUES ('3', '/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall', 'vFirewall');
+
+INSERT INTO `ecomp_sdk`.`microservicemodels` (`id`, `modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`) VALUES ('1', 'TcaMetrics', 'TCA Metrics test', '[NamedEntity, DcaePolicyEntity]', 'API', 'functionalRole=java.lang.String:defaultValue-NA:required-false:MANY-false, name=java.lang.String:defaultValue-NA:required-false:MANY-false', 'thresholds=TcaThreshold:MANY-true', '{\"TcaThreshold\":{\"severity\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"fieldPath\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"thresholdValue\":\"java.lang.Integer:defaultValue-NA:required-false:MANY-false\",\"closedLoopControlName\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"version\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"direction\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\"}}', '1.0.0.5');
+INSERT INTO `ecomp_sdk`.`microservicemodels` (`id`, `modelname`, `description`, `dependency`, `imported_by`, `ref_attributes`, `sub_attributes`, `version`) VALUES ('2', 'StringMatchingConfiguration', 'StringMatchingConfiguration', '[CdapServiceInstanceConfiguration]', 'API', 'serviceConfigurations=StringMatchingServiceConfiguration:MANY-true', '{\"StringMatchingServiceConfiguration\":{\"ageLimit\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"timeWindow\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"createClosedLoopEventId\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"aaiSendFields\":\"java.lang.String:defaultValue-NA:required-false:MANY-true\",\"stringSet\":\"java.lang.String:defaultValue-NA:required-false:MANY-true\",\"outputEventName\":\"java.lang.String:defaultValue-NA:required-false:MANY-false\",\"aaiMatchingFields\":\"java.lang.String:defaultValue-NA:required-false:MANY-true\"}}', '1.0.0.3');
+
+INSERT INTO `ecompname` VALUES (1,'demo','2016-12-28 14:23:31','DCAE','DCAE','demo','2016-12-28 14:23:31');
+INSERT INTO `ecompname` VALUES (2,'demo','2016-12-28 14:23:31','test','SampleDemo','demo','2016-12-28 14:23:31');
+
+INSERT INTO `safepolicywarning` VALUES (1,'demo','SampleRiskType','SampleSafePolicyWarning');
+
+INSERT INTO `policyscopeclosedloop` VALUES (1,'SampleClosedLoop','demo');
+
+INSERT INTO `policyscoperesource` VALUES (1,'SampleResource','demo');
+
+INSERT INTO `policyscopeservice` VALUES (1,'SampleService','demo');
+
+INSERT INTO `policyscopetype` VALUES (1,'SampleType','demo');
+
+INSERT INTO `grouppolicyscopelist` VALUES (1,'PolicyScope_SampleGroupPolicyScope','resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop','demo');
+
+INSERT INTO `microserviceconfigname` VALUES (1,'SampleConfigName','demo');
+
+INSERT INTO `microservicelocation` VALUES (1,'SampleServiceLocation','demo');
+
+INSERT INTO `risktype` VALUES (1,'demo','2016-12-29 20:20:48','demo','SampleRiskType','demo','2016-12-29 20:20:48');
+
+INSERT INTO `policyentity` VALUES (3153,'doACPolicyPut','2017-02-09 17:13:37',0,'vFW Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:','doACPolicyPut','2017-02-09 17:13:37','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Policy xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicyId=\"urn:com:xacml:policy:id:708de148-2cfb-4211-930a-44b446c2d781\" Version=\"1\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides\">\n <Description>vFW Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"PolicyName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DROOLS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ECOMPName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">BRMS_PARAM_RULE</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ConfigName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskType\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskLevel\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"guard\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"TTLDate\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <Rule RuleId=\"urn:com:xacml:rule:id:817128cd-2880-4e85-997b-1abff0eae822\" Effect=\"Permit\">\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">ACCESS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Config</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <AdviceExpressions>\n <AdviceExpression AdviceId=\"BRMSPARAMID\" AppliesTo=\"Permit\">\n <AttributeAssignmentExpression AttributeId=\"type\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Configuration</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"URLID\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#anyURI\">$URL/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"PolicyName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"VersionNumber\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ECOMPName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DROOLS</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ConfigName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">BRMS_PARAM_RULE</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"key:controller\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">vFW</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskType\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskLevel\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"guard\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"TTLDate\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n </AttributeAssignmentExpression>\n </AdviceExpression>\n </AdviceExpressions>\n </Rule>\n</Policy>\n','Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml',0,'com',1,NULL,3152),(3155,'doACPolicyPut','2017-02-09 17:16:17',0,'vLB Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:','doACPolicyPut','2017-02-09 17:16:17','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Policy xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicyId=\"urn:com:xacml:policy:id:95afb43f-13f2-475c-9501-7e022d15b8a7\" Version=\"1\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides\">\n <Description>vLB Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"PolicyName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DROOLS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ECOMPName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">BRMS_PARAM_RULE</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ConfigName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskType\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskLevel\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"guard\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"TTLDate\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <Rule RuleId=\"urn:com:xacml:rule:id:69f687f8-1f6e-485f-a4e8-5cb9beb28ba4\" Effect=\"Permit\">\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">ACCESS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Config</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <AdviceExpressions>\n <AdviceExpression AdviceId=\"BRMSPARAMID\" AppliesTo=\"Permit\">\n <AttributeAssignmentExpression AttributeId=\"type\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Configuration</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"URLID\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#anyURI\">$URL/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"PolicyName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"VersionNumber\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ECOMPName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DROOLS</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ConfigName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">BRMS_PARAM_RULE</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"key:controller\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">vDNS</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskType\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskLevel\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"guard\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"TTLDate\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n </AttributeAssignmentExpression>\n </AdviceExpression>\n </AdviceExpressions>\n </Rule>\n</Policy>\n','Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml',0,'com',1,NULL,3154),(3157,'doACPolicyPut','2017-02-09 17:19:38',0,'Micro Service vFirewall Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:','doACPolicyPut','2017-02-09 17:19:38','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Policy xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicyId=\"urn:com:xacml:policy:id:a1c91d9b-b5d2-4b04-b3a9-afcac74a8161\" Version=\"1\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides\">\n <Description>Micro Service vFirewall Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_MS_vFirewall.1.xml</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"PolicyName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DCAE</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ECOMPName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleConfigName</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ConfigName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">TcaMetrics-v1.0.0.5</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"service\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"uuid\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleServiceLocation</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"location\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskType\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskLevel\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"guard\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"TTLDate\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <Rule RuleId=\"urn:com:xacml:rule:id:2af7b2a1-6427-4765-ac5f-0d5e3c7d059f\" Effect=\"Permit\">\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">ACCESS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Config</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <AdviceExpressions>\n <AdviceExpression AdviceId=\"MSID\" AppliesTo=\"Permit\">\n <AttributeAssignmentExpression AttributeId=\"type\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Configuration</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"URLID\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#anyURI\">$URL/Config/com.Config_MS_vFirewall.1.json</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"PolicyName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_MS_vFirewall.1.xml</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"VersionNumber\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ECOMPName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DCAE</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ConfigName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleConfigName</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:service\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">TcaMetrics-v1.0.0.5</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:uuid\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:Location\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleServiceLocation</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"Priority\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskType\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskLevel\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"guard\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"TTLDate\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n </AttributeAssignmentExpression>\n </AdviceExpression>\n </AdviceExpressions>\n </Rule>\n</Policy>\n','Config_MS_vFirewall.1.xml',0,'com',1,NULL,3156),(3159,'doACPolicyPut','2017-02-09 17:21:15',0,'Micro Service vLoadBalancer Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:','doACPolicyPut','2017-02-09 17:21:15','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Policy xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicyId=\"urn:com:xacml:policy:id:4fd0d4bd-729b-42dd-9c39-d63fea7c9655\" Version=\"1\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides\">\n <Description>Micro Service vLoadBalancer Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_MS_vLoadBalancer.1.xml</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"PolicyName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n <AllOf>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DCAE</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ECOMPName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleConfigName</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"ConfigName\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">TcaMetrics-v1.0.0.5</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"service\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"uuid\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleServiceLocation</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"location\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskType\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"RiskLevel\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">False</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"guard\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"org.openecomp.function.regex-match\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"TTLDate\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <Rule RuleId=\"urn:com:xacml:rule:id:69d31737-09d4-429f-9e1d-6bcf39da90a1\" Effect=\"Permit\">\n <Target>\n <AnyOf>\n <AllOf>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">ACCESS</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n <Match MatchId=\"urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Config</AttributeValue>\n <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\"/>\n </Match>\n </AllOf>\n </AnyOf>\n </Target>\n <AdviceExpressions>\n <AdviceExpression AdviceId=\"MSID\" AppliesTo=\"Permit\">\n <AttributeAssignmentExpression AttributeId=\"type\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">Configuration</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"URLID\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#anyURI\">$URL/Config/com.Config_MS_vLoadBalancer.1.json</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"PolicyName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">com.Config_MS_vLoadBalancer.1.xml</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"VersionNumber\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ECOMPName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">DCAE</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:ConfigName\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleConfigName</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:service\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">TcaMetrics-v1.0.0.5</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:uuid\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"matching:Location\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleServiceLocation</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"Priority\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskType\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">SampleRiskType</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"RiskLevel\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"guard\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">1</AttributeValue>\n </AttributeAssignmentExpression>\n <AttributeAssignmentExpression AttributeId=\"TTLDate\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" Issuer=\"\">\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">NA</AttributeValue>\n </AttributeAssignmentExpression>\n </AdviceExpression>\n </AdviceExpressions>\n </Rule>\n</Policy>\n','Config_MS_vLoadBalancer.1.xml',0,'com',1,NULL,3158);
+
+INSERT INTO `configurationdataentity` VALUES (3152,'/* Autogenerated Code Please Don\'t change/remove this comment section. This is for the UI purpose. \n <$%BRMSParamTemplate=ControlLoopDemo__closedLoopControlName%$> \n */ \n\r\n\r\n/*-\r\n * ============LICENSE_START=======================================================\r\n * archetype-closed-loop-demo-rules\r\n * ================================================================================\r\n * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r\n * ================================================================================\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============LICENSE_END=========================================================\r\n */\r\n\r\npackage org.openecomp.policy.controlloop;\r\n\r\nimport java.util.LinkedList;\r\nimport java.util.Map;\r\nimport java.util.HashMap;\r\nimport java.util.UUID;\r\n\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopEvent;\r\nimport org.openecomp.policy.controlloop.ControlLoopEventStatus;\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopNotification;\r\nimport org.openecomp.policy.controlloop.ControlLoopNotificationType;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperation;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperationWrapper;\r\nimport org.openecomp.policy.template.demo.ControlLoopException;\r\n\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199CloudRegion;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperties;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperty;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199GenericVNF;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InstanceFilters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItems;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Manager;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199NamedQuery;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199QueryParameters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Request;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199RequestWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Response;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ResponseWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ServiceInstance;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Tenant;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VfModule;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VServer;\r\nimport org.openecomp.policy.aai.util.Serialization;\r\n\r\nimport org.openecomp.policy.appc.CommonHeader;\r\nimport org.openecomp.policy.appc.Request;\r\nimport org.openecomp.policy.appc.Response;\r\nimport org.openecomp.policy.appc.ResponseCode;\r\nimport org.openecomp.policy.appc.ResponseStatus;\r\nimport org.openecomp.policy.appc.ResponseValue;\r\n\r\nimport org.openecomp.policy.template.demo.EventManager;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGRequest;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStream;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStreams;\r\n\r\nimport org.openecomp.policy.mso.MSOManager;\r\nimport org.openecomp.policy.mso.MSORequest;\r\nimport org.openecomp.policy.mso.MSORequestStatus;\r\nimport org.openecomp.policy.mso.MSORequestDetails;\r\nimport org.openecomp.policy.mso.MSOModelInfo;\r\nimport org.openecomp.policy.mso.MSOCloudConfiguration;\r\nimport org.openecomp.policy.mso.MSORequestInfo;\r\nimport org.openecomp.policy.mso.MSORequestParameters;\r\nimport org.openecomp.policy.mso.MSORelatedInstanceListElement;\r\nimport org.openecomp.policy.mso.MSORelatedInstance;\r\nimport org.openecomp.policy.mso.MSOResponse;\r\n\r\nimport org.openecomp.policy.drools.system.PolicyEngine;\r\n\r\n//\r\n// These parameters are required to build the runtime policy\r\n//\r\ndeclare Params\r\n closedLoopControlName : String\r\n actor : String\r\n aaiURL : String\r\n aaiUsername : String\r\n aaiPassword : String\r\n msoURL : String\r\n msoUsername : String\r\n msoPassword : String\r\n aaiNamedQueryUUID : String\r\n aaiPatternMatch : int \r\n notificationTopic : String\r\n appcTopic : String\r\nend\r\n\r\n/*\r\n*\r\n* Called once and only once to insert the parameters into working memory for this Closed Loop policy.\r\n* (Comment SETUP rule out for the first ECOMP opensource release since policy BRMS_GW already puts a Params fact in there)\r\n*\r\n*\r\n*rule \"BRMSParamvFWDemoPolicy.SETUP\"\r\n* when\r\n* then\r\n* System.out.println(\"rule SETUP is triggered.\");\r\n* Params params = new Params();\r\n* params.setClosedLoopControlName(\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\");\r\n* params.setActor(\"APPC\");\r\n* params.setAaiURL(\"null\");\r\n* params.setAaiUsername(\"null\");\r\n* params.setAaiPassword(\"null\");\r\n* params.setMsoURL(\"null\");\r\n* params.setMsoUsername(\"null\");\r\n* params.setMsoPassword(\"null\");\r\n* params.setAaiNamedQueryUUID(\"null\");\r\n* params.setAaiPatternMatch(1);\r\n* params.setNotificationTopic(\"POLICY-CL-MGT\");\r\n* params.setAppcTopic(\"APPC-CL\");\r\n* //\r\n* // This stays in memory as long as the rule is alive and running\r\n* //\r\n* insert(params);\r\n*end\r\n*/\r\n/*\r\n*\r\n* This rule responds to DCAE Events\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.EVENT\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n not ( EventManager( closedLoopControlName == $event.closedLoopControlName ))\r\n then\r\n System.out.println(\"rule EVENT is triggered.\");\r\n try {\r\n // \r\n // Check the requestID in the event to make sure it is not null before we create the EventManager. \r\n // The EventManager will do extra syntax checking as well check if the closed loop is disabled/\r\n //\r\n if ($event.requestID == null) {\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.from = \"policy\";\r\n notification.message = \"Missing requestID from DCAE event\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n System.out.println(\"Event with requestID=null has been retracted.\");\r\n } else {\r\n //\r\n // Create an EventManager\r\n //\r\n EventManager manager = new EventManager($params.getClosedLoopControlName(), $event.requestID, $event.target);\r\n //\r\n // Determine if EventManager can actively process the event (i.e. syntax)\r\n //\r\n VirtualControlLoopNotification notification = manager.activate($event);\r\n notification.from = \"policy\"; \r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n // Are we actively pursuing this event?\r\n //\r\n if (notification.notification == ControlLoopNotificationType.ACTIVE) {\r\n //\r\n // Insert Event Manager into memory, this will now kick off processing.\r\n //\r\n insert(manager);\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n } \r\n } else {\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n }\r\n //\r\n // Now that the manager is inserted into Drools working memory, we\'ll wait for\r\n // another rule to fire in order to continue processing. This way we can also\r\n // then screen for additional ONSET and ABATED events for this same RequestIDs \r\n // and for different RequestIDs but with the same closedLoopControlName and target.\r\n //\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n //\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract the event\r\n //\r\n retract($event);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled and an Event Manager\r\n* is created. We can start the operations for this closed loop.\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.EVENT.MANAGER\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER is triggered.\");\r\n //\r\n // Check which event this is.\r\n //\r\n EventManager.NEW_EVENT_STATUS eventStatus = $manager.onNewEvent($event);\r\n //\r\n // We only want the initial ONSET event in memory,\r\n // all the other events need to be retracted to support\r\n // cleanup and avoid the other rules being fired for this event.\r\n //\r\n if (eventStatus != EventManager.NEW_EVENT_STATUS.FIRST_ONSET) {\r\n System.out.println(\"Retracting \"+eventStatus+\" Event.\");\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // Now the event in memory is first onset event\r\n //\r\n try {\r\n //\r\n // Pull the known AAI field from the Event\r\n //\r\n // generic-vnf is needed for vFirewall case\r\n // vserver-name is needed for vLoadBalancer case\r\n //\r\n String genericVNF = $event.AAI.get(\"generic-vnf.vnf-id\");\r\n String vserver = $event.AAI.get(\"vserver.vserver-name\");\r\n //\r\n // Check if we are implementing a simple pattern match.\r\n //\r\n if ($params.getAaiPatternMatch() == 1) {\r\n //\r\n // Yes\r\n //\r\n //Basic naming characteristics:\r\n //VF Name (9 char)+VM name (13 char total)+VFC (19 char total)\r\n //Example: \r\n //VF Name (9 characters): cscf0001v\r\n //VM Name(13 characters): cscf0001vm001\r\n //VFC name(19 characters): cscf0001vm001cfg001\r\n //\r\n // zdfw1fwl01fwl02 or zdfw1fwl01fwl01 \r\n // replaced with\r\n // zdfw1fwl01pgn02 or zdfw1fwl01pgn01\r\n //\r\n int index = genericVNF.lastIndexOf(\"fwl\");\r\n if (index == -1) {\r\n System.err.println(\"The generic-vnf.vnf-id from DCAE Event is not valid.\");\r\n } else {\r\n genericVNF = genericVNF.substring(0, index) + \"pgn\" + genericVNF.substring(index+\"fwl\".length());\r\n }\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n //\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n //\r\n } else {\r\n //\r\n // create AAI named-query request with UUID started with \"F199\"\r\n //\r\n AAINQF199Request aainqf199request = new AAINQF199Request();\r\n AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();\r\n AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();\r\n AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();\r\n //\r\n // queryParameters\r\n //\r\n aainqf199namedquery.namedQueryUUID = UUID.fromString($params.getAaiNamedQueryUUID()); \r\n aainqf199queryparam.namedQuery = aainqf199namedquery;\r\n aainqf199request.queryParameters = aainqf199queryparam;\r\n //\r\n // instanceFilters\r\n //\r\n Map aainqf199instancefiltermap = new HashMap();\r\n Map aainqf199instancefiltermapitem = new HashMap();\r\n aainqf199instancefiltermapitem.put(\"vserver-name\", vserver); \r\n aainqf199instancefiltermap.put(\"vserver\", aainqf199instancefiltermapitem);\r\n aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);\r\n aainqf199request.instanceFilters = aainqf199instancefilter;\r\n //\r\n // print aainqf199request for debug\r\n //\r\n System.out.println(\"AAI Request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(aainqf199request));\r\n //\r\n // Create AAINQF199RequestWrapper\r\n //\r\n AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper($event.requestID, aainqf199request);\r\n //\r\n // insert aainqf199request into memory\r\n //\r\n insert(aainqf199RequestWrapper);\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled, an Event Manager\r\n* is created, AAI Manager and AAI Request are ready in memory. We can start sending query to AAI and then wait for response.\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.EVENT.MANAGER.AAINQF199REQUEST\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199REQUEST is triggered.\");\r\n //\r\n // send the request\r\n //\r\n AAINQF199Response aainqf199response = AAINQF199Manager.postQuery($params.getAaiURL(), $params.getAaiUsername(), $params.getAaiPassword(),\r\n $aainqf199RequestWrapper.aainqf199request, $event.requestID);\r\n //\r\n // Check AAI response\r\n //\r\n if (aainqf199response == null) {\r\n System.err.println(\"Failed to get AAI response\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n retract($aainqf199RequestWrapper);\r\n } else {\r\n //\r\n // Create AAINQF199ResponseWrapper\r\n //\r\n AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper($event.requestID, aainqf199response);\r\n //\r\n // insert aainqf199ResponseWrapper to memeory\r\n //\r\n insert(aainqf199ResponseWrapper);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.EVENT.MANAGER.AAINQF199RESPONSE\"\r\n when \r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n $aainqf199ResponseWrapper : AAINQF199ResponseWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199RESPONSE is triggered.\");\r\n //\r\n // Extract related fields out of AAINQF199RESPONSE\r\n //\r\n String vnfItemVnfId, vnfItemVnfType, vnfItemPersonaModelId, vnfItemPersonaModelVersion, vnfItemModelName, \r\n vnfItemModelVersion, vnfItemModelNameVersionId, serviceItemServiceInstanceId, serviceItemPersonaModelId,\r\n serviceItemModelName, serviceItemModelType, serviceItemModelVersion, serviceItemModelNameVersionId,\r\n vfModuleItemVfModuleName, vfModuleItemPersonaModelId, vfModuleItemPersonaModelVersion, vfModuleItemModelName, \r\n vfModuleItemModelNameVersionId, tenantItemTenantId, cloudRegionItemCloudRegionId;\r\n try {\r\n //\r\n // vnfItem\r\n //\r\n vnfItemVnfId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID;\r\n vnfItemVnfType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType;\r\n vnfItemVnfType = vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf(\"/\")+1);\r\n vnfItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId;\r\n vnfItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion;\r\n vnfItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n vnfItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue;\r\n vnfItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // serviceItem\r\n //\r\n serviceItemServiceInstanceId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID;\r\n serviceItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId;\r\n serviceItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n serviceItemModelType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue;\r\n serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion;\r\n serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // This comes from the base module\r\n //\r\n vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName;\r\n vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace(\"Vfmodule\", \"vDNS\");\r\n //\r\n // vfModuleItem - NOT the base module\r\n //\r\n vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId;\r\n vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion;\r\n vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue;\r\n vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // tenantItem\r\n //\r\n tenantItemTenantId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId;\r\n //\r\n // cloudRegionItem\r\n //\r\n cloudRegionItemCloudRegionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n notification.message = \"Invalid named-query response from AAI\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n } \r\n //\r\n // Extracted fields should not be null\r\n //\r\n if ((vnfItemVnfId == null) || (vnfItemVnfType == null) ||\r\n (vnfItemPersonaModelId == null) || (vnfItemModelName == null) ||\r\n (vnfItemModelVersion == null) || (vnfItemModelNameVersionId == null) ||\r\n (serviceItemServiceInstanceId == null) || (serviceItemModelName == null) ||\r\n (serviceItemModelType == null) || (serviceItemModelVersion == null) ||\r\n (serviceItemModelNameVersionId == null) || (vfModuleItemVfModuleName == null) ||\r\n (vfModuleItemPersonaModelId == null) || (vfModuleItemPersonaModelVersion == null) ||\r\n (vfModuleItemModelName == null) || (vfModuleItemModelNameVersionId == null) ||\r\n (tenantItemTenantId == null) || (cloudRegionItemCloudRegionId == null)) {\r\n //\r\n System.err.println(\"some fields are missing from AAI response.\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // We don\'t need them any more\r\n //\r\n retract($aainqf199ResponseWrapper);\r\n retract($aainqf199RequestWrapper); \r\n //\r\n // check the actor of this closed loop\r\n //\r\n switch ($params.getActor()) {\r\n case \"APPC\":\r\n {\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n // Hardcode genericVNF for now since AAI has not been ready for vFirewall demo case\r\n //\r\n String genericVNF = \"zdfw1fwl01pgn02\";\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n }\r\n break;\r\n case \"MSO\":\r\n {\r\n //\r\n // Construct an operation\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"createModuleInstance\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // Construct an MSO request\r\n //\r\n MSORequest request = new MSORequest();\r\n request.requestDetails = new MSORequestDetails();\r\n request.requestDetails.modelInfo = new MSOModelInfo();\r\n request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();\r\n request.requestDetails.requestInfo = new MSORequestInfo();\r\n request.requestDetails.requestParameters = new MSORequestParameters();\r\n request.requestDetails.requestParameters.userParams = null;\r\n //\r\n // cloudConfiguration\r\n //\r\n request.requestDetails.cloudConfiguration.lcpCloudRegionId = cloudRegionItemCloudRegionId;\r\n request.requestDetails.cloudConfiguration.tenantId = tenantItemTenantId;\r\n //\r\n // modelInfo\r\n //\r\n request.requestDetails.modelInfo.modelType = \"vfModule\";\r\n request.requestDetails.modelInfo.modelInvariantId = vfModuleItemPersonaModelId;\r\n request.requestDetails.modelInfo.modelNameVersionId = vfModuleItemModelNameVersionId;\r\n request.requestDetails.modelInfo.modelName = vfModuleItemModelName;\r\n request.requestDetails.modelInfo.modelVersion = vfModuleItemPersonaModelVersion;\r\n //\r\n // requestInfo\r\n //\r\n request.requestDetails.requestInfo.instanceName = vfModuleItemVfModuleName;\r\n request.requestDetails.requestInfo.source = \"POLICY\";\r\n request.requestDetails.requestInfo.suppressRollback = false;\r\n //\r\n // relatedInstanceList\r\n //\r\n MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();\r\n MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();\r\n relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();\r\n relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();\r\n //\r\n relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelType = \"service\";\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelName = serviceItemModelName;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;\r\n //\r\n relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelType = \"vnf\";\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelName = vnfItemModelName;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = vnfItemModelVersion;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = vnfItemVnfType;\r\n // \r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);\r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);\r\n //\r\n // print MSO request for debug\r\n //\r\n System.out.println(\"MSO request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n //\r\n //\r\n //\r\n if (request != null) {\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL\r\n //\r\n String MSOUrl = $params.getMsoURL() + \"/serviceInstances/v2/\" + serviceItemServiceInstanceId + \"/vnfs/\" + vnfItemVnfId + \"/vfModules\";\r\n //\r\n // Call MSO\r\n //\r\n MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);\r\n //\r\n if (response != null) {\r\n //\r\n // Assign requestId\r\n //\r\n request.requestId = $event.requestID.toString(); \r\n response.request.requestId = $event.requestID.toString();\r\n //\r\n // Insert facts\r\n //\r\n insert(operationWrapper);\r\n insert(request);\r\n insert(response);\r\n } else {\r\n //\r\n // MSO request not even accepted\r\n //\r\n notification.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n notification.history.add(operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n }\r\n } else {\r\n System.err.println(\"constructed MSO request is invalid.\");\r\n }\r\n }\r\n break; \r\n } \r\nend\r\n \r\n/*\r\n*\r\n* This rule responds to APPC Response Events\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.APPC.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : Request( getCommonHeader().RequestID == $event.requestID )\r\n $response : Response( getCommonHeader().RequestID == $event.requestID ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE is triggered.\");\r\n if ($response.Status == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n } \r\n //\r\n // Get the Response Code\r\n //\r\n ResponseCode code = ResponseCode.toResponseCode($response.Status.Code);\r\n if (code == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n }\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // Ok, let\'s figure out what APP-C\'s response is\r\n //\r\n switch (code) {\r\n case ACCEPT:\r\n $operationWrapper.operation.outcome = \"PROCESSING\";\r\n break;\r\n case ERROR:\r\n case REJECT:\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n break;\r\n case SUCCESS:\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n break;\r\n case FAILURE:\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n break;\r\n }\r\n if ($operationWrapper.operation.outcome.equals(\"SUCCESS\")) {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else if ($operationWrapper.operation.outcome.equals(\"PROCESSING\")) {\r\n retract($response);\r\n } else {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend \r\n\r\n/*\r\n*\r\n* This rule is used to clean up APPC response\r\n*\r\n*/ \r\nrule \"BRMSParamvFWDemoPolicy.APPC.RESPONSE.CLEANUP\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $response : Response($id : getCommonHeader().RequestID )\r\n not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE.CLEANUP is triggered.\");\r\n retract($response);\r\nend\r\n\r\n/*\r\n*\r\n* This rule responds to MSO Response Events\r\n*\r\n*/\r\nrule \"BRMSParamvFWDemoPolicy.MSO.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : MSORequest( requestId == $event.requestID.toString() )\r\n $response : MSOResponse( request.requestId == $event.requestID.toString() ) \r\n then\r\n System.out.println(\"rule MSO.RESPONSE is triggered.\");\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // The operation can either be succeeded or failed\r\n // \r\n if($response.request.requestStatus.requestState.equals(\"Completed\")) {\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else {\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend \nrule \"Params\" \n salience 1000 \n when\n then\n Params params = new Params();\n params.setAaiPatternMatch(1);\n params.setAppcTopic(\"APPC-CL\");\n params.setAaiURL(\"null\");\n params.setMsoPassword(\"null\");\n params.setClosedLoopControlName(\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\");\n params.setAaiUsername(\"null\");\n params.setMsoURL(\"null\");\n params.setActor(\"APPC\");\n params.setMsoUsername(\"null\");\n params.setAaiNamedQueryUUID(\"null\");\n params.setAaiPassword(\"null\");\n params.setNotificationTopic(\"POLICY-CL-MGT\");\n insert(params);\nend\r\n','OTHER','com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt','doACPolicyPut','2017-02-09 17:13:37',0,'','doACPolicyPut','2017-02-09 17:13:37',1),(3154,'/* Autogenerated Code Please Don\'t change/remove this comment section. This is for the UI purpose. \n <$%BRMSParamTemplate=ControlLoopDemo__closedLoopControlName%$> \n */ \n\r\n\r\n/*-\r\n * ============LICENSE_START=======================================================\r\n * archetype-closed-loop-demo-rules\r\n * ================================================================================\r\n * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r\n * ================================================================================\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============LICENSE_END=========================================================\r\n */\r\n\r\npackage org.openecomp.policy.controlloop;\r\n\r\nimport java.util.LinkedList;\r\nimport java.util.Map;\r\nimport java.util.HashMap;\r\nimport java.util.UUID;\r\n\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopEvent;\r\nimport org.openecomp.policy.controlloop.ControlLoopEventStatus;\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopNotification;\r\nimport org.openecomp.policy.controlloop.ControlLoopNotificationType;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperation;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperationWrapper;\r\nimport org.openecomp.policy.template.demo.ControlLoopException;\r\n\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199CloudRegion;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperties;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperty;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199GenericVNF;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InstanceFilters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItems;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Manager;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199NamedQuery;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199QueryParameters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Request;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199RequestWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Response;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ResponseWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ServiceInstance;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Tenant;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VfModule;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VServer;\r\nimport org.openecomp.policy.aai.util.Serialization;\r\n\r\nimport org.openecomp.policy.appc.CommonHeader;\r\nimport org.openecomp.policy.appc.Request;\r\nimport org.openecomp.policy.appc.Response;\r\nimport org.openecomp.policy.appc.ResponseCode;\r\nimport org.openecomp.policy.appc.ResponseStatus;\r\nimport org.openecomp.policy.appc.ResponseValue;\r\n\r\nimport org.openecomp.policy.template.demo.EventManager;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGRequest;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStream;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStreams;\r\n\r\nimport org.openecomp.policy.mso.MSOManager;\r\nimport org.openecomp.policy.mso.MSORequest;\r\nimport org.openecomp.policy.mso.MSORequestStatus;\r\nimport org.openecomp.policy.mso.MSORequestDetails;\r\nimport org.openecomp.policy.mso.MSOModelInfo;\r\nimport org.openecomp.policy.mso.MSOCloudConfiguration;\r\nimport org.openecomp.policy.mso.MSORequestInfo;\r\nimport org.openecomp.policy.mso.MSORequestParameters;\r\nimport org.openecomp.policy.mso.MSORelatedInstanceListElement;\r\nimport org.openecomp.policy.mso.MSORelatedInstance;\r\nimport org.openecomp.policy.mso.MSOResponse;\r\n\r\nimport org.openecomp.policy.drools.system.PolicyEngine;\r\n\r\n//\r\n// These parameters are required to build the runtime policy\r\n//\r\ndeclare Params\r\n closedLoopControlName : String\r\n actor : String\r\n aaiURL : String\r\n aaiUsername : String\r\n aaiPassword : String\r\n msoURL : String\r\n msoUsername : String\r\n msoPassword : String\r\n aaiNamedQueryUUID : String\r\n aaiPatternMatch : int \r\n notificationTopic : String\r\n appcTopic : String\r\nend\r\n\r\n/*\r\n*\r\n* Called once and only once to insert the parameters into working memory for this Closed Loop policy.\r\n* (Comment SETUP rule out for the first ECOMP opensource release since policy BRMS_GW already puts a Params fact in there)\r\n*\r\n*\r\n*rule \"BRMSParamvLBDemoPolicy.SETUP\"\r\n* when\r\n* then\r\n* System.out.println(\"rule SETUP is triggered.\");\r\n* Params params = new Params();\r\n* params.setClosedLoopControlName(\"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\");\r\n* params.setActor(\"MSO\");\r\n* params.setAaiURL(\"https://aai.api.simpledemo.openecomp.org:8443\");\r\n* params.setAaiUsername(\"POLICY\");\r\n* params.setAaiPassword(\"POLICY\");\r\n* params.setMsoURL(\"http://vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra\");\r\n* params.setMsoUsername(\"InfraPortalClient\");\r\n* params.setMsoPassword(\"password1$\");\r\n* params.setAaiNamedQueryUUID(\"f199cb88-5e69-4b1f-93e0-6f257877d066\");\r\n* params.setAaiPatternMatch(0);\r\n* params.setNotificationTopic(\"POLICY-CL-MGT\");\r\n* params.setAppcTopic(\"APPC-CL\");\r\n* //\r\n* // This stays in memory as long as the rule is alive and running\r\n* //\r\n* insert(params);\r\n*end\r\n*/\r\n/*\r\n*\r\n* This rule responds to DCAE Events\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.EVENT\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n not ( EventManager( closedLoopControlName == $event.closedLoopControlName ))\r\n then\r\n System.out.println(\"rule EVENT is triggered.\");\r\n try {\r\n // \r\n // Check the requestID in the event to make sure it is not null before we create the EventManager. \r\n // The EventManager will do extra syntax checking as well check if the closed loop is disabled/\r\n //\r\n if ($event.requestID == null) {\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.from = \"policy\";\r\n notification.message = \"Missing requestID from DCAE event\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n System.out.println(\"Event with requestID=null has been retracted.\");\r\n } else {\r\n //\r\n // Create an EventManager\r\n //\r\n EventManager manager = new EventManager($params.getClosedLoopControlName(), $event.requestID, $event.target);\r\n //\r\n // Determine if EventManager can actively process the event (i.e. syntax)\r\n //\r\n VirtualControlLoopNotification notification = manager.activate($event);\r\n notification.from = \"policy\"; \r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n // Are we actively pursuing this event?\r\n //\r\n if (notification.notification == ControlLoopNotificationType.ACTIVE) {\r\n //\r\n // Insert Event Manager into memory, this will now kick off processing.\r\n //\r\n insert(manager);\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n } \r\n } else {\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n }\r\n //\r\n // Now that the manager is inserted into Drools working memory, we\'ll wait for\r\n // another rule to fire in order to continue processing. This way we can also\r\n // then screen for additional ONSET and ABATED events for this same RequestIDs \r\n // and for different RequestIDs but with the same closedLoopControlName and target.\r\n //\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n //\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract the event\r\n //\r\n retract($event);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled and an Event Manager\r\n* is created. We can start the operations for this closed loop.\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.EVENT.MANAGER\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER is triggered.\");\r\n //\r\n // Check which event this is.\r\n //\r\n EventManager.NEW_EVENT_STATUS eventStatus = $manager.onNewEvent($event);\r\n //\r\n // We only want the initial ONSET event in memory,\r\n // all the other events need to be retracted to support\r\n // cleanup and avoid the other rules being fired for this event.\r\n //\r\n if (eventStatus != EventManager.NEW_EVENT_STATUS.FIRST_ONSET) {\r\n System.out.println(\"Retracting \"+eventStatus+\" Event.\");\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // Now the event in memory is first onset event\r\n //\r\n try {\r\n //\r\n // Pull the known AAI field from the Event\r\n //\r\n // generic-vnf is needed for vFirewall case\r\n // vserver-name is needed for vLoadBalancer case\r\n //\r\n String genericVNF = $event.AAI.get(\"generic-vnf.vnf-id\");\r\n String vserver = $event.AAI.get(\"vserver.vserver-name\");\r\n //\r\n // Check if we are implementing a simple pattern match.\r\n //\r\n if ($params.getAaiPatternMatch() == 1) {\r\n //\r\n // Yes\r\n //\r\n //Basic naming characteristics:\r\n //VF Name (9 char)+VM name (13 char total)+VFC (19 char total)\r\n //Example: \r\n //VF Name (9 characters): cscf0001v\r\n //VM Name(13 characters): cscf0001vm001\r\n //VFC name(19 characters): cscf0001vm001cfg001\r\n //\r\n // zdfw1fwl01fwl02 or zdfw1fwl01fwl01 \r\n // replaced with\r\n // zdfw1fwl01pgn02 or zdfw1fwl01pgn01\r\n //\r\n int index = genericVNF.lastIndexOf(\"fwl\");\r\n if (index == -1) {\r\n System.err.println(\"The generic-vnf.vnf-id from DCAE Event is not valid.\");\r\n } else {\r\n genericVNF = genericVNF.substring(0, index) + \"pgn\" + genericVNF.substring(index+\"fwl\".length());\r\n }\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n //\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n //\r\n } else {\r\n //\r\n // create AAI named-query request with UUID started with \"F199\"\r\n //\r\n AAINQF199Request aainqf199request = new AAINQF199Request();\r\n AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();\r\n AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();\r\n AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();\r\n //\r\n // queryParameters\r\n //\r\n aainqf199namedquery.namedQueryUUID = UUID.fromString($params.getAaiNamedQueryUUID()); \r\n aainqf199queryparam.namedQuery = aainqf199namedquery;\r\n aainqf199request.queryParameters = aainqf199queryparam;\r\n //\r\n // instanceFilters\r\n //\r\n Map aainqf199instancefiltermap = new HashMap();\r\n Map aainqf199instancefiltermapitem = new HashMap();\r\n aainqf199instancefiltermapitem.put(\"vserver-name\", vserver); \r\n aainqf199instancefiltermap.put(\"vserver\", aainqf199instancefiltermapitem);\r\n aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);\r\n aainqf199request.instanceFilters = aainqf199instancefilter;\r\n //\r\n // print aainqf199request for debug\r\n //\r\n System.out.println(\"AAI Request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(aainqf199request));\r\n //\r\n // Create AAINQF199RequestWrapper\r\n //\r\n AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper($event.requestID, aainqf199request);\r\n //\r\n // insert aainqf199request into memory\r\n //\r\n insert(aainqf199RequestWrapper);\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled, an Event Manager\r\n* is created, AAI Manager and AAI Request are ready in memory. We can start sending query to AAI and then wait for response.\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.EVENT.MANAGER.AAINQF199REQUEST\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199REQUEST is triggered.\");\r\n //\r\n // send the request\r\n //\r\n AAINQF199Response aainqf199response = AAINQF199Manager.postQuery($params.getAaiURL(), $params.getAaiUsername(), $params.getAaiPassword(),\r\n $aainqf199RequestWrapper.aainqf199request, $event.requestID);\r\n //\r\n // Check AAI response\r\n //\r\n if (aainqf199response == null) {\r\n System.err.println(\"Failed to get AAI response\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n retract($aainqf199RequestWrapper);\r\n } else {\r\n //\r\n // Create AAINQF199ResponseWrapper\r\n //\r\n AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper($event.requestID, aainqf199response);\r\n //\r\n // insert aainqf199ResponseWrapper to memeory\r\n //\r\n insert(aainqf199ResponseWrapper);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.EVENT.MANAGER.AAINQF199RESPONSE\"\r\n when \r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n $aainqf199ResponseWrapper : AAINQF199ResponseWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199RESPONSE is triggered.\");\r\n //\r\n // Extract related fields out of AAINQF199RESPONSE\r\n //\r\n String vnfItemVnfId, vnfItemVnfType, vnfItemPersonaModelId, vnfItemPersonaModelVersion, vnfItemModelName, \r\n vnfItemModelVersion, vnfItemModelNameVersionId, serviceItemServiceInstanceId, serviceItemPersonaModelId,\r\n serviceItemModelName, serviceItemModelType, serviceItemModelVersion, serviceItemModelNameVersionId,\r\n vfModuleItemVfModuleName, vfModuleItemPersonaModelId, vfModuleItemPersonaModelVersion, vfModuleItemModelName, \r\n vfModuleItemModelNameVersionId, tenantItemTenantId, cloudRegionItemCloudRegionId;\r\n try {\r\n //\r\n // vnfItem\r\n //\r\n vnfItemVnfId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID;\r\n vnfItemVnfType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType;\r\n vnfItemVnfType = vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf(\"/\")+1);\r\n vnfItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId;\r\n vnfItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion;\r\n vnfItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n vnfItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue;\r\n vnfItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // serviceItem\r\n //\r\n serviceItemServiceInstanceId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID;\r\n serviceItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId;\r\n serviceItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n serviceItemModelType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue;\r\n serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion;\r\n serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // This comes from the base module\r\n //\r\n vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName;\r\n vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace(\"Vfmodule\", \"vDNS\");\r\n //\r\n // vfModuleItem - NOT the base module\r\n //\r\n vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId;\r\n vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion;\r\n vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue;\r\n vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // tenantItem\r\n //\r\n tenantItemTenantId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId;\r\n //\r\n // cloudRegionItem\r\n //\r\n cloudRegionItemCloudRegionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n notification.message = \"Invalid named-query response from AAI\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n } \r\n //\r\n // Extracted fields should not be null\r\n //\r\n if ((vnfItemVnfId == null) || (vnfItemVnfType == null) ||\r\n (vnfItemPersonaModelId == null) || (vnfItemModelName == null) ||\r\n (vnfItemModelVersion == null) || (vnfItemModelNameVersionId == null) ||\r\n (serviceItemServiceInstanceId == null) || (serviceItemModelName == null) ||\r\n (serviceItemModelType == null) || (serviceItemModelVersion == null) ||\r\n (serviceItemModelNameVersionId == null) || (vfModuleItemVfModuleName == null) ||\r\n (vfModuleItemPersonaModelId == null) || (vfModuleItemPersonaModelVersion == null) ||\r\n (vfModuleItemModelName == null) || (vfModuleItemModelNameVersionId == null) ||\r\n (tenantItemTenantId == null) || (cloudRegionItemCloudRegionId == null)) {\r\n //\r\n System.err.println(\"some fields are missing from AAI response.\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // We don\'t need them any more\r\n //\r\n retract($aainqf199ResponseWrapper);\r\n retract($aainqf199RequestWrapper); \r\n //\r\n // check the actor of this closed loop\r\n //\r\n switch ($params.getActor()) {\r\n case \"APPC\":\r\n {\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n // Hardcode genericVNF for now since AAI has not been ready for vFirewall demo case\r\n //\r\n String genericVNF = \"zdfw1fwl01pgn02\";\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n }\r\n break;\r\n case \"MSO\":\r\n {\r\n //\r\n // Construct an operation\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"createModuleInstance\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // Construct an MSO request\r\n //\r\n MSORequest request = new MSORequest();\r\n request.requestDetails = new MSORequestDetails();\r\n request.requestDetails.modelInfo = new MSOModelInfo();\r\n request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();\r\n request.requestDetails.requestInfo = new MSORequestInfo();\r\n request.requestDetails.requestParameters = new MSORequestParameters();\r\n request.requestDetails.requestParameters.userParams = null;\r\n //\r\n // cloudConfiguration\r\n //\r\n request.requestDetails.cloudConfiguration.lcpCloudRegionId = cloudRegionItemCloudRegionId;\r\n request.requestDetails.cloudConfiguration.tenantId = tenantItemTenantId;\r\n //\r\n // modelInfo\r\n //\r\n request.requestDetails.modelInfo.modelType = \"vfModule\";\r\n request.requestDetails.modelInfo.modelInvariantId = vfModuleItemPersonaModelId;\r\n request.requestDetails.modelInfo.modelNameVersionId = vfModuleItemModelNameVersionId;\r\n request.requestDetails.modelInfo.modelName = vfModuleItemModelName;\r\n request.requestDetails.modelInfo.modelVersion = vfModuleItemPersonaModelVersion;\r\n //\r\n // requestInfo\r\n //\r\n request.requestDetails.requestInfo.instanceName = vfModuleItemVfModuleName;\r\n request.requestDetails.requestInfo.source = \"POLICY\";\r\n request.requestDetails.requestInfo.suppressRollback = false;\r\n //\r\n // relatedInstanceList\r\n //\r\n MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();\r\n MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();\r\n relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();\r\n relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();\r\n //\r\n relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelType = \"service\";\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelName = serviceItemModelName;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;\r\n //\r\n relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelType = \"vnf\";\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelName = vnfItemModelName;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = vnfItemModelVersion;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = vnfItemVnfType;\r\n // \r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);\r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);\r\n //\r\n // print MSO request for debug\r\n //\r\n System.out.println(\"MSO request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n //\r\n //\r\n //\r\n if (request != null) {\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL\r\n //\r\n String MSOUrl = $params.getMsoURL() + \"/serviceInstances/v2/\" + serviceItemServiceInstanceId + \"/vnfs/\" + vnfItemVnfId + \"/vfModules\";\r\n //\r\n // Call MSO\r\n //\r\n MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);\r\n //\r\n if (response != null) {\r\n //\r\n // Assign requestId\r\n //\r\n request.requestId = $event.requestID.toString(); \r\n response.request.requestId = $event.requestID.toString();\r\n //\r\n // Insert facts\r\n //\r\n insert(operationWrapper);\r\n insert(request);\r\n insert(response);\r\n } else {\r\n //\r\n // MSO request not even accepted\r\n //\r\n notification.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n notification.history.add(operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n }\r\n } else {\r\n System.err.println(\"constructed MSO request is invalid.\");\r\n }\r\n }\r\n break; \r\n } \r\nend\r\n \r\n/*\r\n*\r\n* This rule responds to APPC Response Events\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.APPC.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : Request( getCommonHeader().RequestID == $event.requestID )\r\n $response : Response( getCommonHeader().RequestID == $event.requestID ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE is triggered.\");\r\n if ($response.Status == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n } \r\n //\r\n // Get the Response Code\r\n //\r\n ResponseCode code = ResponseCode.toResponseCode($response.Status.Code);\r\n if (code == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n }\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // Ok, let\'s figure out what APP-C\'s response is\r\n //\r\n switch (code) {\r\n case ACCEPT:\r\n $operationWrapper.operation.outcome = \"PROCESSING\";\r\n break;\r\n case ERROR:\r\n case REJECT:\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n break;\r\n case SUCCESS:\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n break;\r\n case FAILURE:\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n break;\r\n }\r\n if ($operationWrapper.operation.outcome.equals(\"SUCCESS\")) {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else if ($operationWrapper.operation.outcome.equals(\"PROCESSING\")) {\r\n retract($response);\r\n } else {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend \r\n\r\n/*\r\n*\r\n* This rule is used to clean up APPC response\r\n*\r\n*/ \r\nrule \"BRMSParamvLBDemoPolicy.APPC.RESPONSE.CLEANUP\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $response : Response($id : getCommonHeader().RequestID )\r\n not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE.CLEANUP is triggered.\");\r\n retract($response);\r\nend\r\n\r\n/*\r\n*\r\n* This rule responds to MSO Response Events\r\n*\r\n*/\r\nrule \"BRMSParamvLBDemoPolicy.MSO.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : MSORequest( requestId == $event.requestID.toString() )\r\n $response : MSOResponse( request.requestId == $event.requestID.toString() ) \r\n then\r\n System.out.println(\"rule MSO.RESPONSE is triggered.\");\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"com\";\r\n notification.policyVersion = \"1\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // The operation can either be succeeded or failed\r\n // \r\n if($response.request.requestStatus.requestState.equals(\"Completed\")) {\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else {\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend \nrule \"Params\" \n salience 1000 \n when\n then\n Params params = new Params();\n params.setAaiPatternMatch(0);\n params.setAppcTopic(\"APPC-CL\");\n params.setAaiURL(\"https://aai.api.simpledemo.openecomp.org:8443\");\n params.setMsoPassword(\"password1$\");\n params.setClosedLoopControlName(\"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\");\n params.setAaiUsername(\"POLICY\");\n params.setMsoURL(\"http://vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra\");\n params.setActor(\"MSO\");\n params.setMsoUsername(\"InfraPortalClient\");\n params.setAaiNamedQueryUUID(\"f199cb88-5e69-4b1f-93e0-6f257877d066\");\n params.setAaiPassword(\"POLICY\");\n params.setNotificationTopic(\"POLICY-CL-MGT\");\n insert(params);\nend\r\n','OTHER','com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt','doACPolicyPut','2017-02-09 17:16:17',0,'','doACPolicyPut','2017-02-09 17:16:17',1),(3156,'{\"service\":\"TcaMetrics\",\"location\":\"SampleServiceLocation\",\"uuid\":\"/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall\",\"policyName\":\"vFirewall\",\"description\":\"Micro Service vFirewall Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:\",\"configName\":\"SampleConfigName\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"1.0.0.5\",\"priority\":\"1\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop\",\"content\":{\"thresholds\":[{\"severity\":\"MAJOR\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn\",\"thresholdValue\":\"300\",\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"version\":\"1.0.2\",\"direction\":\"LESS_OR_EQUAL\"},{\"severity\":\"CRITICAL\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn\",\"thresholdValue\":\"700\",\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"version\":\"1.0.2\",\"direction\":\"GREATER_OR_EQUAL\"}],\"functionalRole\":\"vFirewall\",\"name\":\"0\"}}\r\n','JSON','com.Config_MS_vFirewall.1.json','doACPolicyPut','2017-02-09 17:19:38',0,'','doACPolicyPut','2017-02-09 17:19:38',1),(3158,'{\"service\":\"TcaMetrics\",\"location\":\"SampleServiceLocation\",\"uuid\":\"/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer\",\"policyName\":\"vLoadBalancer\",\"description\":\"Micro Service vLoadBalancer Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:\",\"configName\":\"SampleConfigName\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"1.0.0.5\",\"priority\":\"1\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop\",\"content\":{\"thresholds\":[{\"severity\":\"MAJOR\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn\",\"thresholdValue\":\"200\",\"closedLoopControlName\":\"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"version\":\"1.0.2\",\"direction\":\"GREATER_OR_EQUAL\"}],\"functionalRole\":\"vLoadBalancer\",\"name\":\"0\"}}\r\n','JSON','com.Config_MS_vLoadBalancer.1.json','doACPolicyPut','2017-02-09 17:21:15',0,'','doACPolicyPut','2017-02-09 17:21:15',1);
+
+INSERT INTO `policyversion` VALUES (1,'com/Config_BRMS_Param_BRMSParamvFWDemoPolicy',1,1,'2017-02-09 17:13:43','demo','2017-02-09 17:13:43','demo'),(2,'com/Config_BRMS_Param_BRMSParamvLBDemoPolicy',1,1,'2017-02-09 17:16:19','demo','2017-02-09 17:16:19','demo'),(3,'com/Config_MS_vFirewall',1,1,'2017-02-09 17:19:40','demo','2017-02-09 17:19:40','demo'),(4,'com/Config_MS_vLoadBalancer',1,1,'2017-02-09 17:21:17','demo','2017-02-09 17:21:17','demo');
+
+INSERT INTO `brmsparamtemplate` VALUES (5,'ControlLoopDemo__closedLoopControlName','ControlLoopDemo__closedLoopControlName','\r\n\r\n/*-\r\n * ============LICENSE_START=======================================================\r\n * archetype-closed-loop-demo-rules\r\n * ================================================================================\r\n * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r\n * ================================================================================\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ============LICENSE_END=========================================================\r\n */\r\n\r\npackage org.openecomp.policy.controlloop;\r\n\r\nimport java.util.LinkedList;\r\nimport java.util.Map;\r\nimport java.util.HashMap;\r\nimport java.util.UUID;\r\n\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopEvent;\r\nimport org.openecomp.policy.controlloop.ControlLoopEventStatus;\r\nimport org.openecomp.policy.controlloop.VirtualControlLoopNotification;\r\nimport org.openecomp.policy.controlloop.ControlLoopNotificationType;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperation;\r\nimport org.openecomp.policy.controlloop.ControlLoopOperationWrapper;\r\nimport org.openecomp.policy.template.demo.ControlLoopException;\r\n\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199CloudRegion;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperties;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperty;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199GenericVNF;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InstanceFilters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItems;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Manager;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199NamedQuery;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199QueryParameters;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Request;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199RequestWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Response;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ResponseWrapper;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199ServiceInstance;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199Tenant;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VfModule;\r\nimport org.openecomp.policy.aai.AAINQF199.AAINQF199VServer;\r\nimport org.openecomp.policy.aai.util.Serialization;\r\n\r\nimport org.openecomp.policy.appc.CommonHeader;\r\nimport org.openecomp.policy.appc.Request;\r\nimport org.openecomp.policy.appc.Response;\r\nimport org.openecomp.policy.appc.ResponseCode;\r\nimport org.openecomp.policy.appc.ResponseStatus;\r\nimport org.openecomp.policy.appc.ResponseValue;\r\n\r\nimport org.openecomp.policy.template.demo.EventManager;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGRequest;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStream;\r\nimport org.openecomp.policy.vnf.trafficgenerator.PGStreams;\r\n\r\nimport org.openecomp.policy.mso.MSOManager;\r\nimport org.openecomp.policy.mso.MSORequest;\r\nimport org.openecomp.policy.mso.MSORequestStatus;\r\nimport org.openecomp.policy.mso.MSORequestDetails;\r\nimport org.openecomp.policy.mso.MSOModelInfo;\r\nimport org.openecomp.policy.mso.MSOCloudConfiguration;\r\nimport org.openecomp.policy.mso.MSORequestInfo;\r\nimport org.openecomp.policy.mso.MSORequestParameters;\r\nimport org.openecomp.policy.mso.MSORelatedInstanceListElement;\r\nimport org.openecomp.policy.mso.MSORelatedInstance;\r\nimport org.openecomp.policy.mso.MSOResponse;\r\n\r\nimport org.openecomp.policy.drools.system.PolicyEngine;\r\n\r\n//\r\n// These parameters are required to build the runtime policy\r\n//\r\ndeclare Params\r\n closedLoopControlName : String\r\n actor : String\r\n aaiURL : String\r\n aaiUsername : String\r\n aaiPassword : String\r\n msoURL : String\r\n msoUsername : String\r\n msoPassword : String\r\n aaiNamedQueryUUID : String\r\n aaiPatternMatch : int \r\n notificationTopic : String\r\n appcTopic : String\r\nend\r\n\r\n/*\r\n*\r\n* Called once and only once to insert the parameters into working memory for this Closed Loop policy.\r\n* (Comment SETUP rule out for the first ECOMP opensource release since policy BRMS_GW already puts a Params fact in there)\r\n*\r\n*\r\n*rule \"${policyName}.SETUP\"\r\n* when\r\n* then\r\n* System.out.println(\"rule SETUP is triggered.\");\r\n* Params params = new Params();\r\n* params.setClosedLoopControlName(\"${closedLoopControlName}\");\r\n* params.setActor(\"${actor}\");\r\n* params.setAaiURL(\"${aaiURL}\");\r\n* params.setAaiUsername(\"${aaiUsername}\");\r\n* params.setAaiPassword(\"${aaiPassword}\");\r\n* params.setMsoURL(\"${msoURL}\");\r\n* params.setMsoUsername(\"${msoUsername}\");\r\n* params.setMsoPassword(\"${msoPassword}\");\r\n* params.setAaiNamedQueryUUID(\"${aaiNamedQueryUUID}\");\r\n* params.setAaiPatternMatch(${aaiPatternMatch});\r\n* params.setNotificationTopic(\"${notificationTopic}\");\r\n* params.setAppcTopic(\"${appcTopic}\");\r\n* //\r\n* // This stays in memory as long as the rule is alive and running\r\n* //\r\n* insert(params);\r\n*end\r\n*/\r\n/*\r\n*\r\n* This rule responds to DCAE Events\r\n*\r\n*/\r\nrule \"${policyName}.EVENT\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n not ( EventManager( closedLoopControlName == $event.closedLoopControlName ))\r\n then\r\n System.out.println(\"rule EVENT is triggered.\");\r\n try {\r\n // \r\n // Check the requestID in the event to make sure it is not null before we create the EventManager. \r\n // The EventManager will do extra syntax checking as well check if the closed loop is disabled/\r\n //\r\n if ($event.requestID == null) {\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.from = \"policy\";\r\n notification.message = \"Missing requestID from DCAE event\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n System.out.println(\"Event with requestID=null has been retracted.\");\r\n } else {\r\n //\r\n // Create an EventManager\r\n //\r\n EventManager manager = new EventManager($params.getClosedLoopControlName(), $event.requestID, $event.target);\r\n //\r\n // Determine if EventManager can actively process the event (i.e. syntax)\r\n //\r\n VirtualControlLoopNotification notification = manager.activate($event);\r\n notification.from = \"policy\"; \r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n //\r\n // Are we actively pursuing this event?\r\n //\r\n if (notification.notification == ControlLoopNotificationType.ACTIVE) {\r\n //\r\n // Insert Event Manager into memory, this will now kick off processing.\r\n //\r\n insert(manager);\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n } \r\n } else {\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n }\r\n //\r\n // Retract it from memory\r\n //\r\n retract($event);\r\n }\r\n //\r\n // Now that the manager is inserted into Drools working memory, we\'ll wait for\r\n // another rule to fire in order to continue processing. This way we can also\r\n // then screen for additional ONSET and ABATED events for this same RequestIDs \r\n // and for different RequestIDs but with the same closedLoopControlName and target.\r\n //\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n //\r\n //\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract the event\r\n //\r\n retract($event);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled and an Event Manager\r\n* is created. We can start the operations for this closed loop.\r\n*\r\n*/\r\nrule \"${policyName}.EVENT.MANAGER\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER is triggered.\");\r\n //\r\n // Check which event this is.\r\n //\r\n EventManager.NEW_EVENT_STATUS eventStatus = $manager.onNewEvent($event);\r\n //\r\n // We only want the initial ONSET event in memory,\r\n // all the other events need to be retracted to support\r\n // cleanup and avoid the other rules being fired for this event.\r\n //\r\n if (eventStatus != EventManager.NEW_EVENT_STATUS.FIRST_ONSET) {\r\n System.out.println(\"Retracting \"+eventStatus+\" Event.\");\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // Now the event in memory is first onset event\r\n //\r\n try {\r\n //\r\n // Pull the known AAI field from the Event\r\n //\r\n // generic-vnf is needed for vFirewall case\r\n // vserver-name is needed for vLoadBalancer case\r\n //\r\n String genericVNF = $event.AAI.get(\"generic-vnf.vnf-id\");\r\n String vserver = $event.AAI.get(\"vserver.vserver-name\");\r\n //\r\n // Check if we are implementing a simple pattern match.\r\n //\r\n if ($params.getAaiPatternMatch() == 1) {\r\n //\r\n // Yes\r\n //\r\n //Basic naming characteristics:\r\n //VF Name (9 char)+VM name (13 char total)+VFC (19 char total)\r\n //Example: \r\n //VF Name (9 characters): cscf0001v\r\n //VM Name(13 characters): cscf0001vm001\r\n //VFC name(19 characters): cscf0001vm001cfg001\r\n //\r\n // zdfw1fwl01fwl02 or zdfw1fwl01fwl01 \r\n // replaced with\r\n // zdfw1fwl01pgn02 or zdfw1fwl01pgn01\r\n //\r\n int index = genericVNF.lastIndexOf(\"fwl\");\r\n if (index == -1) {\r\n System.err.println(\"The generic-vnf.vnf-id from DCAE Event is not valid.\");\r\n } else {\r\n genericVNF = genericVNF.substring(0, index) + \"pgn\" + genericVNF.substring(index+\"fwl\".length());\r\n }\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n //\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n //\r\n } else {\r\n //\r\n // create AAI named-query request with UUID started with \"F199\"\r\n //\r\n AAINQF199Request aainqf199request = new AAINQF199Request();\r\n AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();\r\n AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();\r\n AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();\r\n //\r\n // queryParameters\r\n //\r\n aainqf199namedquery.namedQueryUUID = UUID.fromString($params.getAaiNamedQueryUUID()); \r\n aainqf199queryparam.namedQuery = aainqf199namedquery;\r\n aainqf199request.queryParameters = aainqf199queryparam;\r\n //\r\n // instanceFilters\r\n //\r\n Map aainqf199instancefiltermap = new HashMap();\r\n Map aainqf199instancefiltermapitem = new HashMap();\r\n aainqf199instancefiltermapitem.put(\"vserver-name\", vserver); \r\n aainqf199instancefiltermap.put(\"vserver\", aainqf199instancefiltermapitem);\r\n aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);\r\n aainqf199request.instanceFilters = aainqf199instancefilter;\r\n //\r\n // print aainqf199request for debug\r\n //\r\n System.out.println(\"AAI Request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(aainqf199request));\r\n //\r\n // Create AAINQF199RequestWrapper\r\n //\r\n AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper($event.requestID, aainqf199request);\r\n //\r\n // insert aainqf199request into memory\r\n //\r\n insert(aainqf199RequestWrapper);\r\n }\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid ONSET, closed loop is enabled, an Event Manager\r\n* is created, AAI Manager and AAI Request are ready in memory. We can start sending query to AAI and then wait for response.\r\n*\r\n*/\r\nrule \"${policyName}.EVENT.MANAGER.AAINQF199REQUEST\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199REQUEST is triggered.\");\r\n //\r\n // send the request\r\n //\r\n AAINQF199Response aainqf199response = AAINQF199Manager.postQuery($params.getAaiURL(), $params.getAaiUsername(), $params.getAaiPassword(),\r\n $aainqf199RequestWrapper.aainqf199request, $event.requestID);\r\n //\r\n // Check AAI response\r\n //\r\n if (aainqf199response == null) {\r\n System.err.println(\"Failed to get AAI response\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n retract($aainqf199RequestWrapper);\r\n } else {\r\n //\r\n // Create AAINQF199ResponseWrapper\r\n //\r\n AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper($event.requestID, aainqf199response);\r\n //\r\n // insert aainqf199ResponseWrapper to memeory\r\n //\r\n insert(aainqf199ResponseWrapper);\r\n }\r\nend\r\n\r\n/*\r\n*\r\n* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.\r\n*\r\n*/\r\nrule \"${policyName}.EVENT.MANAGER.AAINQF199RESPONSE\"\r\n when \r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)\r\n $aainqf199ResponseWrapper : AAINQF199ResponseWrapper(requestID == $event.requestID)\r\n then\r\n System.out.println(\"rule EVENT.MANAGER.AAINQF199RESPONSE is triggered.\");\r\n //\r\n // Extract related fields out of AAINQF199RESPONSE\r\n //\r\n String vnfItemVnfId, vnfItemVnfType, vnfItemPersonaModelId, vnfItemPersonaModelVersion, vnfItemModelName, \r\n vnfItemModelVersion, vnfItemModelNameVersionId, serviceItemServiceInstanceId, serviceItemPersonaModelId,\r\n serviceItemModelName, serviceItemModelType, serviceItemModelVersion, serviceItemModelNameVersionId,\r\n vfModuleItemVfModuleName, vfModuleItemPersonaModelId, vfModuleItemPersonaModelVersion, vfModuleItemModelName, \r\n vfModuleItemModelNameVersionId, tenantItemTenantId, cloudRegionItemCloudRegionId;\r\n try {\r\n //\r\n // vnfItem\r\n //\r\n vnfItemVnfId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID;\r\n vnfItemVnfType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType;\r\n vnfItemVnfType = vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf(\"/\")+1);\r\n vnfItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId;\r\n vnfItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion;\r\n vnfItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n vnfItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue;\r\n vnfItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // serviceItem\r\n //\r\n serviceItemServiceInstanceId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID;\r\n serviceItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId;\r\n serviceItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;\r\n serviceItemModelType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue;\r\n serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion;\r\n serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // This comes from the base module\r\n //\r\n vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName;\r\n vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace(\"Vfmodule\", \"vDNS\");\r\n //\r\n // vfModuleItem - NOT the base module\r\n //\r\n vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId;\r\n vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion;\r\n vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue;\r\n vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue;\r\n //\r\n // tenantItem\r\n //\r\n tenantItemTenantId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId;\r\n //\r\n // cloudRegionItem\r\n //\r\n cloudRegionItemCloudRegionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;\r\n //\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.REJECTED;\r\n notification.message = \"Exception occurred \" + e.getMessage();\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n notification.message = \"Invalid named-query response from AAI\";\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e1) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e1.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n } \r\n //\r\n // Extracted fields should not be null\r\n //\r\n if ((vnfItemVnfId == null) || (vnfItemVnfType == null) ||\r\n (vnfItemPersonaModelId == null) || (vnfItemModelName == null) ||\r\n (vnfItemModelVersion == null) || (vnfItemModelNameVersionId == null) ||\r\n (serviceItemServiceInstanceId == null) || (serviceItemModelName == null) ||\r\n (serviceItemModelType == null) || (serviceItemModelVersion == null) ||\r\n (serviceItemModelNameVersionId == null) || (vfModuleItemVfModuleName == null) ||\r\n (vfModuleItemPersonaModelId == null) || (vfModuleItemPersonaModelVersion == null) ||\r\n (vfModuleItemModelName == null) || (vfModuleItemModelNameVersionId == null) ||\r\n (tenantItemTenantId == null) || (cloudRegionItemCloudRegionId == null)) {\r\n //\r\n System.err.println(\"some fields are missing from AAI response.\");\r\n //\r\n // Fail and retract everything\r\n //\r\n retract($aainqf199RequestWrapper);\r\n retract($aainqf199ResponseWrapper);\r\n retract($manager);\r\n retract($event);\r\n return;\r\n }\r\n //\r\n // We don\'t need them any more\r\n //\r\n retract($aainqf199ResponseWrapper);\r\n retract($aainqf199RequestWrapper); \r\n //\r\n // check the actor of this closed loop\r\n //\r\n switch ($params.getActor()) {\r\n case \"APPC\":\r\n {\r\n //\r\n // Construct an APPC request\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"ModifyConfig\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // insert operationWrapper into memory\r\n //\r\n insert(operationWrapper);\r\n //\r\n Request request = new Request();\r\n request.CommonHeader = new CommonHeader();\r\n request.CommonHeader.RequestID = $event.requestID;\r\n request.Action = operation.operation;\r\n request.Payload = new HashMap<String, Object>();\r\n //\r\n // Fill in the payload\r\n // Hardcode genericVNF for now since AAI has not been ready for vFirewall demo case\r\n //\r\n String genericVNF = \"zdfw1fwl01pgn02\";\r\n request.Payload.put(\"generic-vnf.vnf-id\", genericVNF);\r\n //\r\n PGRequest pgRequest = new PGRequest();\r\n pgRequest.pgStreams = new PGStreams();\r\n \r\n PGStream pgStream;\r\n for(int i = 0; i < 5; i++){\r\n pgStream = new PGStream();\r\n pgStream.streamId = \"fw_udp\"+(i+1);\r\n pgStream.isEnabled = \"true\";\r\n pgRequest.pgStreams.pgStream.add(pgStream);\r\n }\r\n request.Payload.put(\"pg-streams\", pgRequest.pgStreams);\r\n \r\n if (request != null) {\r\n //\r\n // Insert request into memory\r\n //\r\n insert(request);\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n // message and history ??\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Now send the operation request\r\n //\r\n if (request instanceof Request) {\r\n try {\r\n System.out.println(\"APPC request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n PolicyEngine.manager.deliver($params.getAppcTopic(), request);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"Can\'t deliver request: \" + request);\r\n }\r\n }\r\n } else {\r\n //\r\n // what happens if it is null\r\n //\r\n }\r\n }\r\n break;\r\n case \"MSO\":\r\n {\r\n //\r\n // Construct an operation\r\n //\r\n ControlLoopOperation operation = new ControlLoopOperation();\r\n operation.actor = $params.getActor();\r\n operation.operation = \"createModuleInstance\";\r\n operation.target = $event.target;\r\n //\r\n // Create operationWrapper\r\n //\r\n ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);\r\n //\r\n // Construct an MSO request\r\n //\r\n MSORequest request = new MSORequest();\r\n request.requestDetails = new MSORequestDetails();\r\n request.requestDetails.modelInfo = new MSOModelInfo();\r\n request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();\r\n request.requestDetails.requestInfo = new MSORequestInfo();\r\n request.requestDetails.requestParameters = new MSORequestParameters();\r\n request.requestDetails.requestParameters.userParams = null;\r\n //\r\n // cloudConfiguration\r\n //\r\n request.requestDetails.cloudConfiguration.lcpCloudRegionId = cloudRegionItemCloudRegionId;\r\n request.requestDetails.cloudConfiguration.tenantId = tenantItemTenantId;\r\n //\r\n // modelInfo\r\n //\r\n request.requestDetails.modelInfo.modelType = \"vfModule\";\r\n request.requestDetails.modelInfo.modelInvariantId = vfModuleItemPersonaModelId;\r\n request.requestDetails.modelInfo.modelNameVersionId = vfModuleItemModelNameVersionId;\r\n request.requestDetails.modelInfo.modelName = vfModuleItemModelName;\r\n request.requestDetails.modelInfo.modelVersion = vfModuleItemPersonaModelVersion;\r\n //\r\n // requestInfo\r\n //\r\n request.requestDetails.requestInfo.instanceName = vfModuleItemVfModuleName;\r\n request.requestDetails.requestInfo.source = \"POLICY\";\r\n request.requestDetails.requestInfo.suppressRollback = false;\r\n //\r\n // relatedInstanceList\r\n //\r\n MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();\r\n MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();\r\n relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();\r\n relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();\r\n //\r\n relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelType = \"service\";\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelName = serviceItemModelName;\r\n relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;\r\n //\r\n relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelType = \"vnf\";\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelName = vnfItemModelName;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = vnfItemModelVersion;\r\n relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = vnfItemVnfType;\r\n // \r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);\r\n request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);\r\n //\r\n // print MSO request for debug\r\n //\r\n System.out.println(\"MSO request sent:\");\r\n System.out.println(Serialization.gsonPretty.toJson(request));\r\n //\r\n //\r\n //\r\n if (request != null) {\r\n //\r\n // Tell interested parties we are performing this Operation\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.notification = ControlLoopNotificationType.OPERATION;\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL\r\n //\r\n String MSOUrl = $params.getMsoURL() + \"/serviceInstances/v2/\" + serviceItemServiceInstanceId + \"/vnfs/\" + vnfItemVnfId + \"/vfModules\";\r\n //\r\n // Call MSO\r\n //\r\n MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);\r\n //\r\n if (response != null) {\r\n //\r\n // Assign requestId\r\n //\r\n request.requestId = $event.requestID.toString(); \r\n response.request.requestId = $event.requestID.toString();\r\n //\r\n // Insert facts\r\n //\r\n insert(operationWrapper);\r\n insert(request);\r\n insert(response);\r\n } else {\r\n //\r\n // MSO request not even accepted\r\n //\r\n notification.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.message = operationWrapper.operation.toMessage();\r\n operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n notification.history.add(operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // Retract everything\r\n //\r\n retract($event);\r\n retract($manager);\r\n }\r\n } else {\r\n System.err.println(\"constructed MSO request is invalid.\");\r\n }\r\n }\r\n break; \r\n } \r\nend\r\n \r\n/*\r\n*\r\n* This rule responds to APPC Response Events\r\n*\r\n*/\r\nrule \"${policyName}.APPC.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : Request( getCommonHeader().RequestID == $event.requestID )\r\n $response : Response( getCommonHeader().RequestID == $event.requestID ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE is triggered.\");\r\n if ($response.Status == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n } \r\n //\r\n // Get the Response Code\r\n //\r\n ResponseCode code = ResponseCode.toResponseCode($response.Status.Code);\r\n if (code == null) {\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n }\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // Ok, let\'s figure out what APP-C\'s response is\r\n //\r\n switch (code) {\r\n case ACCEPT:\r\n $operationWrapper.operation.outcome = \"PROCESSING\";\r\n break;\r\n case ERROR:\r\n case REJECT:\r\n $operationWrapper.operation.outcome = \"FAILURE_EXCEPTION\";\r\n $manager.setControlLoopResult(\"FAILURE_EXCEPTION\");\r\n break;\r\n case SUCCESS:\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n break;\r\n case FAILURE:\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n break;\r\n }\r\n if ($operationWrapper.operation.outcome.equals(\"SUCCESS\")) {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else if ($operationWrapper.operation.outcome.equals(\"PROCESSING\")) {\r\n retract($response);\r\n } else {\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend \r\n\r\n/*\r\n*\r\n* This rule is used to clean up APPC response\r\n*\r\n*/ \r\nrule \"${policyName}.APPC.RESPONSE.CLEANUP\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $response : Response($id : getCommonHeader().RequestID )\r\n not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) ) \r\n then\r\n System.out.println(\"rule APPC.RESPONSE.CLEANUP is triggered.\");\r\n retract($response);\r\nend\r\n\r\n/*\r\n*\r\n* This rule responds to MSO Response Events\r\n*\r\n*/\r\nrule \"${policyName}.MSO.RESPONSE\"\r\n when\r\n $params : Params( getClosedLoopControlName() == \"${closedLoopControlName}\" )\r\n $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )\r\n $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )\r\n $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )\r\n $request : MSORequest( requestId == $event.requestID.toString() )\r\n $response : MSOResponse( request.requestId == $event.requestID.toString() ) \r\n then\r\n System.out.println(\"rule MSO.RESPONSE is triggered.\");\r\n //\r\n // Construct notification\r\n //\r\n VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);\r\n notification.from = \"policy\";\r\n notification.policyName = drools.getRule().getName();\r\n notification.policyScope = \"${policyScope}\";\r\n notification.policyVersion = \"${policyVersion}\";\r\n notification.message = $operationWrapper.operation.toMessage();\r\n $operationWrapper.operation.message = $operationWrapper.operation.toMessage();\r\n //\r\n // The operation can either be succeeded or failed\r\n // \r\n if($response.request.requestStatus.requestState.equals(\"Completed\")) {\r\n $operationWrapper.operation.outcome = \"SUCCESS\";\r\n $manager.setControlLoopResult(\"SUCCESS\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n } else {\r\n $operationWrapper.operation.outcome = \"FAILURE\";\r\n $manager.setControlLoopResult(\"FAILURE\");\r\n notification.history.add($operationWrapper.operation);\r\n notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n notification.notification = ControlLoopNotificationType.FINAL_FAILURE;\r\n //\r\n // Let interested parties know\r\n //\r\n try {\r\n System.out.println(Serialization.gsonPretty.toJson(notification));\r\n PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);\r\n } catch (Exception e) {\r\n System.out.println(\"Can\'t deliver notification: \" + notification);\r\n e.printStackTrace();\r\n }\r\n //\r\n // We are going to retract these objects from memory\r\n //\r\n System.out.println(\"Retracting everything\");\r\n retract($operationWrapper);\r\n retract($request);\r\n retract($response);\r\n retract($event);\r\n retract($manager);\r\n }\r\n \r\nend ','2017-02-09 17:11:42','demo');
+
+insert into sequence (seq_name, seq_count) values ('SEQ_GEN', 3050);
+
+set foreign_key_checks=1;
+commit;
diff --git a/packages/base/src/files/install/servers/brmsgw/client.properties b/packages/base/src/files/install/servers/brmsgw/client.properties
new file mode 100644
index 000000000..0b8dc258e
--- /dev/null
+++ b/packages/base/src/files/install/servers/brmsgw/client.properties
@@ -0,0 +1,22 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+python=test,MASTER
+PyPDPServer=test,MASTER \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/brmsgw/config.properties b/packages/base/src/files/install/servers/brmsgw/config.properties
new file mode 100644
index 000000000..f46a27840
--- /dev/null
+++ b/packages/base/src/files/install/servers/brmsgw/config.properties
@@ -0,0 +1,87 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+BRMSGW_JMX_PORT=${{BRMSGW_JMX_PORT}}
+COMPONENT_X_MX_MB=${{COMPONENT_X_MX_MB}}
+COMPONENT_X_MS_MB=${{COMPONENT_X_MS_MB}}
+
+PDP_URL = ${{REST_PDP_ID}} , ${{PDP_HTTP_USER_ID}} , ${{PDP_HTTP_PASSWORD}}
+PAP_URL = ${{REST_PAP_URL}} , ${{PDP_PAP_PDP_HTTP_USER_ID}} , ${{PDP_PAP_PDP_HTTP_PASSWORD}}
+NOTIFICATION_TYPE=websocket
+NOTIFICATION_UEB_SERVERS=
+CLIENT_ID=${{CLIENT_ID}}
+CLIENT_KEY=${{CLIENT_KEY}}
+# Environment should be Set either DEV, TEST or PROD
+ENVIRONMENT=${{ENVIRONMENT}}
+
+# BRMS Properties.
+## defaultName is the default group name to which the rule gets pushed if no artifactID is specified.
+defaultName = default
+## repositoryID
+repositoryID = ${{releaseRepositoryID}}
+## reposiroryName
+repositoryName = ${{releaseRepositoryName}}
+## repositoryURL
+repositoryURL = ${{releaseRepositoryURL}}
+repositoryUsername = ${{repositoryUsername}}
+repositoryPassword = ${{repositoryPassword}}
+## policyKeyID the value of Policy Key whose value will be the group Name.
+policyKeyID = controller
+# UEB Notification Details.
+UEB_URL=${{UEB_URL}}
+UEB_TOPIC=${{UEB_TOPIC}}
+UEB_API_KEY=${{UEB_API_KEY}}
+UEB_API_SECRET=${{UEB_API_SECRET}}
+## GroupNames can be comma separated values.
+groupNames = default, vFW , vDNS
+
+default.groupID = ${{groupID}}
+default.artifactID = ${{artifactID}}
+vFW.groupID= ${{VFW_GROUP_ID}}
+vFW.artifactID= ${{VFW_ARTIFACT_ID}}
+vDNS.groupID= ${{VDNS_GROUP_ID}}
+vDNS.artifactID= ${{VDNS_ARTIFACT_ID}}
+
+#Integrity Monitor values
+#database driver for Integrity Monitor
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+#database URL for Integrity Monitor
+javax.persistence.jdbc.url=${{JDBC_URL}}
+#database username for Integrity Monitor
+javax.persistence.jdbc.user=${{JDBC_USER}}
+#database password for Integrity Monitor
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+#resource name
+RESOURCE_NAME=${{resource_name}}
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
+
+ping_interval=30000
+
+brms.dependency.version=1.0.0-SNAPSHOT
+
+CLIENT_FILE=client.properties
diff --git a/packages/base/src/files/install/servers/brmsgw/config/policyLogger.properties b/packages/base/src/files/install/servers/brmsgw/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/brmsgw/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/brmsgw/init.d/brmsgw b/packages/base/src/files/install/servers/brmsgw/init.d/brmsgw
new file mode 100644
index 000000000..c3b406b42
--- /dev/null
+++ b/packages/base/src/files/install/servers/brmsgw/init.d/brmsgw
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+BRMSGW_BASE=${POLICY_HOME}/servers/brmsgw/
+COMPONENT=brmsgw
+brmsgw_RUNNING="pgrep -f "${BRMSGW_BASE}""
+
+RETVAL=0
+
+function update_monitor() {
+ COMPONENT=$1
+ STATUS=$2
+ if [[ -f ${POLICY_HOME}/etc/monitor/monitor.cfg ]]; then
+ /bin/sed -i.bak \
+ -e "s/^${COMPONENT}=.*/${COMPONENT}=${STATUS}/g" \
+ ${POLICY_HOME}/etc/monitor/monitor.cfg
+ fi
+}
+
+# unmonitored stop, does not change monitor status (immutable)
+function um_stop() {
+ pid=$(pgrep -f "${BRMSGW_BASE}" 2> /dev/null)
+ kill -9 "${pid}"
+ RETVAL=$?
+}
+
+function stop() {
+ um_stop
+ if [[ ${RETVAL} != 0 ]]; then
+ update_monitor ${COMPONENT} on
+ else
+ update_monitor ${COMPONENT} off
+ fi
+}
+
+# unmonitored start, does not change monitor status (immutable)
+function um_start() {
+ unset JMX_JAVA_OPTS JVM_SECURITY
+ JMX_JAVA_OPTS+=("-Dcom.sun.management.jmxremote")
+ JMX_JAVA_OPTS+=("-Dcom.sun.management.jmxremote.port=$BRMSGW_JMX_PORT")
+ JMX_JAVA_OPTS+=("-Dcom.sun.management.jmxremote.ssl=false")
+ JMX_JAVA_OPTS+=("-Dcom.sun.management.jmxremote.authenticate=false")
+ JVM_JAVA_OPTS=("-Xms${COMPONENT_X_MS_MB}M" "-Xmx${COMPONENT_X_MX_MB}M")
+ JVM_SECURITY+=("-Djavax.net.ssl.keyStore=${POLICY_HOME}/etc/ssl/policy-keystore")
+ JVM_SECURITY+=("-Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWD}")
+ JVM_SECURITY+=("-Djavax.net.ssl.trustStore=${POLICY_HOME}/etc/ssl/policy-keystore")
+ JVM_SECURITY+=("-Djavax.net.ssl.trustStorePassword=${KEYSTORE_PASSWD}")
+
+ JAVA_OPTS=("${JVM_JAVA_OPTS[@]}" "${JMX_JAVA_OPTS[@]}" "${JVM_SECURITY[@]}")
+
+ cd $POLICY_HOME/servers/brmsgw
+ nohup $JAVA_HOME/bin/java -jar "${JAVA_OPTS[@]}" $POLICY_HOME/servers/brmsgw/BRMSGateway.jar>> $POLICY_HOME/logs/brmsgw.log 2>&1 &
+ RETVAL=$?
+}
+
+function start() {
+ um_start
+ if [[ ${RETVAL} != 0 ]]; then
+ update_monitor ${COMPONENT} off
+ else
+ update_monitor ${COMPONENT} on
+ fi
+}
+
+function status() {
+ # check status
+ pid=$(pgrep -f "${BRMSGW_BASE}" 2> /dev/null)
+ RETVAL=$?
+
+ # If the PID was returned means the application is running
+ if [ ${RETVAL} -eq 0 ]; then
+ echo "running with pid ${pid}"
+ else
+ echo "stopped"
+ fi
+}
+
+
+# main
+
+COMPONENT=$(basename $0)
+
+CONF_FILE="${POLICY_HOME}/servers/${COMPONENT}/config.properties"
+
+# read properties
+
+shopt -s extglob
+configfile="dos_or_unix" # set the actual path name of your (DOS or Unix) config file
+while IFS='= ' read lhs rhs
+do
+ if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then
+ rhs="${rhs%%\#*}" # Del in line right comments
+ rhs="${rhs%%*( )}" # Del trailing spaces
+ rhs="${rhs%\"*}" # Del opening string quotes
+ rhs="${rhs#\"*}" # Del closing string quotes
+ if [[ $lhs != *"."* ]]; then
+ declare $lhs="$rhs"
+ fi
+ fi
+done < "${CONF_FILE}"
+
+
+if [ $? -ne 0 ]; then
+ echo "error: cannot source configuration ${CONF_FILE}"
+ exit 1
+fi
+
+case "$1" in
+ status)
+ status
+ ;;
+ restart)
+ stop
+ sleep 2
+ start
+ ;;
+ start)
+ start
+ ;;
+ umstart)
+ um_start
+ ;;
+ stop)
+ stop
+ ;;
+ umstop)
+ um_stop
+ ;;
+ *)
+ echo "error: invalid option $@"
+ RETVAL=1
+ ;;
+esac
+
+exit ${RETVAL}
diff --git a/packages/base/src/files/install/servers/common/logparser/init.d/logparserd b/packages/base/src/files/install/servers/common/logparser/init.d/logparserd
new file mode 100755
index 000000000..37221b9c3
--- /dev/null
+++ b/packages/base/src/files/install/servers/common/logparser/init.d/logparserd
@@ -0,0 +1,131 @@
+#!/bin/bash
+#
+# init script for a Java application
+#
+
+function update_monitor() {
+ COMPONENT=$1
+ STATUS=$2
+ if [[ -f ${POLICY_HOME}/etc/monitor/monitor.cfg ]]; then
+ /bin/sed -i.bak \
+ -e "s/^${COMPONENT}=.*/${COMPONENT}=${STATUS}/g" \
+ ${POLICY_HOME}/etc/monitor/monitor.cfg
+ fi
+}
+
+# unmonitored start, does not change monitor status (immutable)
+function um_start() {
+ JMX_JAVA_OPTS="-Dcom.sun.management.jmxremote"
+ JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.port=${LOGPARSER_JMX_PORT}"
+ JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
+ JMX_JAVA_OPTS="${JMX_JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
+ JVM_JAVA_OPTS="-Xms${LOGPARSER_X_MS_MB}M -Xmx${LOGPARSER_X_MX_MB}M"
+
+ JAVA_OPTS="${JAVA_OPTS} ${JMX_JAVA_OPTS} ${JVM_JAVA_OPTS}"
+
+ # Redirects default and error output to a log file
+ cd ${POLICY_HOME}/servers/${COMPONENT}/bin
+ nohup $JAVA_HOME/bin/java -jar ${JAVA_OPTS} ${SERVICE} ${SERVER} ${LOGTYPE} >> ${POLICY_HOME}/servers/${COMPONENT}/logs/stdout 2>&1 &
+RETVAL=$?
+ RETVAL=$?
+}
+
+# Starts the application
+function start() {
+ um_start
+ if [[ ${RETVAL} != 0 ]]; then
+ update_monitor ${COMPONENT} off
+ else
+ update_monitor ${COMPONENT} on
+ fi
+}
+
+# unmonitored stop, does not change monitor status (immutable)
+function um_stop() {
+ # Kills the application process
+ pkill -u ${POLICY_USER} -f "${SERVICE} ${SERVER} ${LOGTYPE}" -TERM
+ RETVAL=$?
+ if [[ ${RETVAL} != 0 ]]; then
+ sleep 2
+ pkill -u ${POLICY_USER} -f "${SERVICE} ${SERVER} ${LOGTYPE}" -KILL
+ RETVAL=$?
+ fi
+}
+
+# Stops the application
+function stop() {
+ um_stop
+ update_monitor ${COMPONENT} off
+}
+
+# Show the application status
+function status() {
+ # check status
+ pid=$(pgrep -f -u ${POLICY_USER} "${SERVICE} ${SERVER} ${LOGTYPE}" 2> /dev/null)
+ RETVAL=$?
+
+ # If the PID was returned means the application is running
+ if [ ${RETVAL} -eq 0 ] ; then
+ echo "running with pid ${pid}"
+ else
+ echo "stopped"
+ fi
+}
+
+# Main logic, a simple case to call functions
+
+# determine if this is a paplp or pdplp component
+COMPONENT=$(basename $0)
+
+CONF_FILE="${POLICY_HOME}/servers/${COMPONENT}/bin/parserlog.properties"
+SERVICE="${POLICY_HOME}/servers/${COMPONENT}/bin/logparser.jar"
+
+# read properties
+shopt -s extglob
+configfile="dos_or_unix" # set the actual path name of your (DOS or Unix) config file
+while IFS='= ' read lhs rhs
+do
+ if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then
+ rhs="${rhs%%\#*}" # Del in line right comments
+ rhs="${rhs%%*( )}" # Del trailing spaces
+ rhs="${rhs%\"*}" # Del opening string quotes
+ rhs="${rhs#\"*}" # Del closing string quotes
+ if [[ $lhs != *"."* ]]; then
+ declare $lhs="$rhs"
+ fi
+ fi
+done < "${CONF_FILE}"
+if [ $? -ne 0 ]; then
+ echo "error: cannot source configuration ${CONF_FILE}"
+ exit 1
+fi
+
+case "$1" in
+ status)
+ status
+ ;;
+ restart)
+ stop
+ sleep 2
+ start
+ ;;
+ start)
+ start
+ ;;
+ umstart)
+ um_start
+ ;;
+ stop)
+ stop
+ ;;
+ umstop)
+ um_stop
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|umstart|umstop|restart|status}"
+ RETVAL=1
+ ;;
+esac
+
+exit ${RETVAL}
+
diff --git a/packages/base/src/files/install/servers/common/tomcat/bin/setenv.sh b/packages/base/src/files/install/servers/common/tomcat/bin/setenv.sh
new file mode 100644
index 000000000..154b2a544
--- /dev/null
+++ b/packages/base/src/files/install/servers/common/tomcat/bin/setenv.sh
@@ -0,0 +1,31 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote"
+CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote.port=${{TOMCAT_JMX_PORT}}"
+CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
+CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
+CATALINA_OPTS="${CATALINA_OPTS} -Djavax.net.ssl.keyStore=${POLICY_HOME}/etc/ssl/policy-keystore"
+CATALINA_OPTS="${CATALINA_OPTS} -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWD}"
+CATALINA_OPTS="${CATALINA_OPTS} -Djavax.net.ssl.trustStore=${POLICY_HOME}/etc/ssl/policy-keystore"
+CATALINA_OPTS="${CATALINA_OPTS} -Djavax.net.ssl.trustStorePassword=${KEYSTORE_PASSWD}"
+CATALINA_OPTS="${CATALINA_OPTS} -Xms${{TOMCAT_X_MS_MB}}M"
+CATALINA_OPTS="${CATALINA_OPTS} -Xmx${{TOMCAT_X_MX_MB}}M"
+export CATALINA_OPTS
diff --git a/packages/base/src/files/install/servers/common/tomcat/conf/server.xml b/packages/base/src/files/install/servers/common/tomcat/conf/server.xml
new file mode 100644
index 000000000..e45450024
--- /dev/null
+++ b/packages/base/src/files/install/servers/common/tomcat/conf/server.xml
@@ -0,0 +1,167 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!-- Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/server.html
+ -->
+<Server port="${{TOMCAT_SHUTDOWN_PORT}}" shutdown="SHUTDOWN">
+ <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
+ <!-- Security listener. Documentation at /docs/config/listeners.html
+ <Listener className="org.apache.catalina.security.SecurityListener" />
+ -->
+ <!--APR library loader. Documentation at /docs/apr.html -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+ <!-- Global JNDI resources
+ Documentation at /docs/jndi-resources-howto.html
+ -->
+ <GlobalNamingResources>
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users
+ -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved"
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+ pathname="conf/tomcat-users.xml" />
+ </GlobalNamingResources>
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" Note: A "Service" is not itself a "Container",
+ so you may not define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/service.html
+ -->
+ <Service name="Catalina">
+
+ <!--The connectors can use a shared executor, you can define one or more named thread pools-->
+ <!--
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+ maxThreads="150" minSpareThreads="4"/>
+ -->
+
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Documentation at :
+ Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
+ Java AJP Connector: /docs/config/ajp.html
+ APR (HTTP/AJP) Connector: /docs/apr.html
+ Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
+
+ <Connector port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+ -->
+ <!-- A "Connector" using the shared thread pool-->
+ <!--
+ <Connector executor="tomcatThreadPool"
+ port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+ -->
+ <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
+ This connector uses the NIO implementation that requires the JSSE
+ style configuration. When using the APR/native implementation, the
+ OpenSSL style configuration is required as described in the APR/native
+ documentation -->
+
+ <!-- Use http instead of https
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
+ clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2"
+ keystoreFile="${{POLICY_HOME}}/etc/ssl/policy-keystore" keystorePass="${{KEYSTORE_PASSWD}}"/>
+ -->
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" />
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector port="${{SSL_AJP_CONNECTOR_PORT}}" protocol="AJP/1.3" redirectPort="${{SSL_AJP_CONNECTOR_REDIRECT_PORT}}" />
+
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host).
+ Documentation at /docs/config/engine.html -->
+
+ <!-- You should set jvmRoute to support load-balancing via AJP ie :
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
+ -->
+ <Engine name="Catalina" defaultHost="localhost">
+
+ <!--For clustering, please take a look at documentation at:
+ /docs/cluster-howto.html (simple how to)
+ /docs/config/cluster.html (reference documentation) -->
+ <!--
+ <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
+ -->
+
+ <!-- Use the LockOutRealm to prevent attempts to guess user passwords
+ via a brute-force attack -->
+ <Realm className="org.apache.catalina.realm.LockOutRealm">
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ resourceName="UserDatabase"/>
+ </Realm>
+
+ <Host name="localhost" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- SingleSignOn valve, share authentication between web applications
+ Documentation at: /docs/config/valve.html -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
+
+ <!-- Access log processes all example.
+ Documentation at: /docs/config/valve.html
+ Note: The pattern used is equivalent to using pattern="common" -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ prefix="localhost_access_log" suffix=".txt"
+ pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+
+ </Host>
+ </Engine>
+ </Service>
+</Server>
diff --git a/packages/base/src/files/install/servers/common/tomcat/init.d/tomcatd b/packages/base/src/files/install/servers/common/tomcat/init.d/tomcatd
new file mode 100644
index 000000000..114f8a77e
--- /dev/null
+++ b/packages/base/src/files/install/servers/common/tomcat/init.d/tomcatd
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+function update_monitor() {
+ COMPONENT=$1
+ STATUS=$2
+ if [[ -f ${POLICY_HOME}/etc/monitor/monitor.cfg ]]; then
+ /bin/sed -i.bak \
+ -e "s/^${COMPONENT}=.*/${COMPONENT}=${STATUS}/g" \
+ ${POLICY_HOME}/etc/monitor/monitor.cfg
+ fi
+}
+
+# unmonitored stop, does not change monitor status (immutable)
+function um_stop() {
+ cd ${TOMCAT_BASE}/bin/
+ ${TOMCAT_BASE}/bin/catalina.sh stop -force
+
+ # make sure ..
+ pid=$(pgrep -f -u ${POLICY_USER} "${TOMCAT_RUNNING}" 2> /dev/null)
+ RETVAL=$?
+ if [[ ${RETVAL} == 0 ]]; then
+ pkill -u ${POLICY_USER} -f "${TOMCAT_RUNNING}" -KILL
+ RETVAL=$?
+ fi
+}
+
+function stop() {
+ um_stop
+ update_monitor ${{COMPONENT_TYPE}} off
+}
+
+# unmonitored start, does not change monitor status (immutable)
+function um_start() {
+ cd ${TOMCAT_BASE}/bin/
+ ${TOMCAT_BASE}/bin/catalina.sh start
+ RETVAL=$?
+}
+
+function start() {
+ um_start
+ if [[ ${RETVAL} != 0 ]]; then
+ update_monitor ${{COMPONENT_TYPE}} off
+ else
+ update_monitor ${{COMPONENT_TYPE}} on
+ fi
+}
+
+TOMCAT_BASE=${POLICY_HOME}/servers/${{COMPONENT_TYPE}}
+TOMCAT_RUNNING="^$JAVA_HOME/bin/java .* -Dcatalina.base=${TOMCAT_BASE} .* start$"
+
+PWD_ENTER=${PWD}
+RETVAL=0
+
+. ${POLICY_HOME}/etc/profile.d/env.sh
+
+case "$1" in
+ status)
+ pid=$(pgrep -f -u ${POLICY_USER} "${TOMCAT_RUNNING}" 2> /dev/null)
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ echo "running with pid ${pid}"
+ else
+ echo "stopped"
+ fi
+ ;;
+ restart)
+ stop
+ sleep 2
+ start
+ ;;
+ start)
+ start
+ ;;
+ umstart)
+ um_start
+ ;;
+ stop)
+ stop
+ ;;
+ umstop)
+ um_stop
+ ;;
+ *)
+ cd ${TOMCAT_BASE}/bin/
+ ${TOMCAT_BASE}/bin/catalina.sh "$@"
+ RETVAL=$?
+ ;;
+esac
+
+cd ${PWD_ENTER}
+exit ${RETVAL}
diff --git a/packages/base/src/files/install/servers/configs/conf/server.xml b/packages/base/src/files/install/servers/configs/conf/server.xml
new file mode 100644
index 000000000..acda634ef
--- /dev/null
+++ b/packages/base/src/files/install/servers/configs/conf/server.xml
@@ -0,0 +1,169 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!-- Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/server.html
+ -->
+<Server port="${{TOMCAT_SHUTDOWN_PORT}}" shutdown="SHUTDOWN">
+ <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
+ <!-- Security listener. Documentation at /docs/config/listeners.html
+ <Listener className="org.apache.catalina.security.SecurityListener" />
+ -->
+ <!--APR library loader. Documentation at /docs/apr.html -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+ <!-- Global JNDI resources
+ Documentation at /docs/jndi-resources-howto.html
+ -->
+ <GlobalNamingResources>
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users
+ -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved"
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+ pathname="conf/tomcat-users.xml" />
+ </GlobalNamingResources>
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" Note: A "Service" is not itself a "Container",
+ so you may not define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/service.html
+ -->
+ <Service name="Catalina">
+
+ <!--The connectors can use a shared executor, you can define one or more named thread pools-->
+ <!--
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+ maxThreads="150" minSpareThreads="4"/>
+ -->
+
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Documentation at :
+ Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
+ Java AJP Connector: /docs/config/ajp.html
+ APR (HTTP/AJP) Connector: /docs/apr.html
+ Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
+ -->
+
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="${{SSL_HTTP_CONNECTOR_REDIRECT_PORT}}" />
+
+ <!-- A "Connector" using the shared thread pool-->
+ <!--
+ <Connector executor="tomcatThreadPool"
+ port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+ -->
+ <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
+ This connector uses the NIO implementation that requires the JSSE
+ style configuration. When using the APR/native implementation, the
+ OpenSSL style configuration is required as described in the APR/native
+ documentation -->
+
+ <!--
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
+ clientAuth="false" sslProtocol="TLS"
+ keystoreFile="${{POLICY_HOME}}/etc/ssl/policy-keystore" keystorePass="${{KEYSTORE_PASSWD}}"/>
+ -->
+
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <!--
+ <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
+ -->
+
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host).
+ Documentation at /docs/config/engine.html -->
+
+ <!-- You should set jvmRoute to support load-balancing via AJP ie :
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
+ -->
+ <Engine name="Catalina" defaultHost="localhost">
+
+ <!--For clustering, please take a look at documentation at:
+ /docs/cluster-howto.html (simple how to)
+ /docs/config/cluster.html (reference documentation) -->
+ <!--
+ <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
+ -->
+
+ <!-- Use the LockOutRealm to prevent attempts to guess user passwords
+ via a brute-force attack -->
+ <Realm className="org.apache.catalina.realm.LockOutRealm">
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ resourceName="UserDatabase"/>
+ </Realm>
+
+ <Host name="localhost" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- SingleSignOn valve, share authentication between web applications
+ Documentation at: /docs/config/valve.html -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
+
+ <!-- Access log processes all example.
+ Documentation at: /docs/config/valve.html
+ Note: The pattern used is equivalent to using pattern="common" -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ prefix="localhost_access_log" suffix=".txt"
+ pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+
+ </Host>
+ </Engine>
+ </Service>
+</Server>
diff --git a/packages/base/src/files/install/servers/console/bin/JSONConfig.json b/packages/base/src/files/install/servers/console/bin/JSONConfig.json
new file mode 100644
index 000000000..4b90f4ebf
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/JSONConfig.json
@@ -0,0 +1,132 @@
+[
+ {
+ "serviceTypePolicyName": "Registration Failure(Trinity)",
+ "verticaMetrics": "DATETIMEUTC\n VNFC_NAME\n BW_SIP_STATS_REGISTER_RESPONSE_CODE_VALUE \nBW_SIP_STATS_REGISTER_RESPONSE_INS \n BW_SIP_STATS_REGISTER_RESPONSE_OUTS",
+ "attributes": {
+ "Onset&abatement anomaly detection": {
+ "PtileLimit": "Percentile value used by anomaly detection model",
+ "Threshold": "initial value for the quantile at percentile(PtileLimit) used by the anomaly detection model",
+ "Window": "Number of weeks anomaly detection model keeps in memory to estimate Threshold",
+ "Training": "Number of historical weeks anomaly detection model needs for training ",
+ "FractionSamplePerDay": "This corresponds to the minimum number of samples per day to be used in the daily percentile computation when updating the distribution tail crossing model. When there are less samples than that threshold, the model is not updated with these samples. "
+ },
+ "Onset signature trigger": {
+ "ConsecutiveInterval": "Number of consecutive intervals normalized metric must trigger the anomaly detection model before resulting in an action",
+ "RetryTimer": "Minimum interval between policy triggers"
+ },
+ "Abatement signature trigger": {
+ "Consecutiveinterval": "Number of consecutive intervals normalized metric does not trigger the anomaly detection model after onset signature was triggered"
+ },
+ "Onset & abatement UEB notification": {
+ "OnsetMessage": "Value of field OnSetMessage sent by Analytics Engine published on UEB",
+ "AbatementMessage": "Value of field AbatementMessage sent by Analytics Engine published on UEB",
+ "PolicyName": "Value of field PolicyName sent by Analytics Engine published on UEB"
+ }
+ },
+ "policyDescription": "Policy to detect instances where SIP registration rate exceeds a normal level over a number of consecutive sampling periods. \n Notes \n (1) Vertica metrics normalized and combined in a SIP registration failure probability per Site and per VM. \n (2) Anomaly detection model operates on SIP registration failure probability. \n (3) Anomaly detection consists of an estimated distribution percentile threshold crossing. \n (4) Actions: Send email and/or UEB notification"
+ },
+ {
+ "serviceTypePolicyName": "International Fraud(Trinity)",
+ "verticaMetrics": "INTERVAL_START_TS\n CUSTOMER\n A_SITE\n A_SBG\n BW\n Z_COUNTRY\n CALL_COUNT\n MINUTES_OF_USE",
+ "attributes": {
+ "Onset&abatement anomaly detection": {
+ "PtileLimit": "Percentile value used by anomaly detection model",
+ "Threshold": "initial value for the quantile at percentile(PtileLimit) used by the anomaly detection model",
+ "Window": "Number of weeks anomaly detection model keeps in memory to estimate Threshold",
+ "Training": "Number of historical weeks anomaly detection model needs for training ",
+ "FractionSamplePerDay": "This corresponds to the minimum number of samples per day to be used in the daily percentile computation when updating the distribution tail crossing model. When there are less samples than that threshold, the model is not updated with these samples. "
+ },
+ "Onset signature trigger": {
+ "ConsecutiveInterval": "Number of consecutive intervals normalized metric must trigger the anomaly detection model before resulting in an action",
+ "RetryTimer": "Minimum interval between policy triggers"
+ },
+ "Abatement signature trigger": {
+ "Consecutiveinterval": "Number of consecutive intervals normalized metric does not trigger the anomaly detection model after onset signature was triggered"
+ },
+ "Onset & abatement UEB notification ": {
+ "OnsetMessage": "Value of field OnSetMessage sent by Analytics Engine published on UEB",
+ "AbatementMessage": "Value of field AbatementMessage sent by Analytics Engine published on UEB",
+ "PolicyName": "Value of field PolicyName sent by Analytics Engine published on UEB"
+ }
+ },
+ "policyDescription": "Policy to detect instances where count of calls towards an international destination exceeds a normal level over a number of consecutive sampling periods. \n Notes \n (1) Vertica metrics normalized and combined in a SIP registration failure probability per Customer, per Site and per VM. \n (2) Anomaly detection model operates on counts towards an international destination. \n (3) Anomaly detection consists of an estimated distribution percentile threshold crossing. \n (4) Actions: Send email and/or UEB notification"
+ },
+ {
+ "serviceTypePolicyName": "No dial tone(Trinity)",
+ "verticaMetrics": "INTERVAL_START_TS\n SUM(CALLS_ATTEMPTED)\n SUM(NO_ANSWER_OR_VOICE_MAIL)\n A_SITE or A_SBG or BW or CUSTOMER",
+ "attributes": {
+ "Onset&abatement anomaly detection": {
+ "PtileLimit": "Percentile value used by anomaly detection model",
+ "Threshold": "initial value for the quantile at percentile(PtileLimit) used by the anomaly detection model",
+ "Window": "Number of weeks anomaly detection model keeps in memory to estimate Threshold",
+ "Training": "Number of historical weeks anomaly detection model needs for training ",
+ "FractionSamplePerDay": "This corresponds to the minimum number of samples per day to be used in the daily percentile computation when updating the distribution tail crossing model. When there are less samples than that threshold, the model is not updated with these samples. "
+ },
+ "Onset signature trigger": {
+ "ConsecutiveInterval": "Number of consecutive intervals normalized metric must trigger the anomaly detection model before resulting in an action",
+ "RetryTimer": "Minimum interval between policy triggers"
+ },
+ "Abatement signature trigger": {
+ "Consecutiveinterval": "Number of consecutive intervals normalized metric does not trigger the anomaly detection model after onset signature was triggered"
+ },
+ "Onset & abatement UEB notification ": {
+ "OnsetMessage": "Value of field OnSetMessage sent by Analytics Engine published on UEB",
+ "AbatementMessage": "Value of field AbatementMessage sent by Analytics Engine published on UEB",
+ "PolicyName": "Value of field PolicyName sent by Analytics Engine published on UEB"
+ }
+ },
+ "policyDescription": "Policy to detect ? \n Notes:\n (1) Actions: Send email and/or UEB notification"
+ },
+ {
+ "serviceTypePolicyName": "Call storm(Trinity)",
+ "verticaMetrics": "",
+ "attributes": {
+ "Onset&abatement anomaly detection": {
+ "SeasonLength": "Metric seasonality (5min sampling period with 7 days seasonality: 7*288) used by Holt-Winters model",
+ "TrainLength": "Training length (5min sampling period with 7 days seasonality and 5 cycles training: 7*288*5) used by Holt-Winters",
+ "Alpha": "Smoothing parameter (range 0-1, default 0.2)",
+ "Beta": "Trend parameter (range 0-1, default 0) ",
+ "Gamma": "Seasonality (range 0-1, default 0.05)",
+ "Deviation Threshold": "Approximately a limit on the factor by how much current value has deviated compared to expected variance"
+ },
+ "Onset signature trigger": {
+ "RetryTimer": "Minimum interval between policy triggers"
+ },
+ "Abatement signature trigger": {
+ "Hw-Timeout": "Maximum time for an HealthCheck response (measured from the time a positive App-C response was received)",
+ "OnSetMessage": "Value of field Message sent by Analytics Engine published on UEB "
+ },
+ "Onset & abatement UEB notification ": {
+ "AbatementMessage": "Value of field AbatementMessage sent by Analytics Engine published on UEB",
+ "PolicyName": "Value of field PolicyName sent by Analytics Engine published on UEB"
+ }
+ },
+ "policyDescription": "Policy to detect instances where count of Formatted table ? exceeds a predicted level. \n Notes \n (1) Vertica metrics normalized and combined in ? per Customer, per Site and per VM. \n (2) Anomaly detection model operates on ? \n (3) Anomaly detection consists of detecting deviations from Holt-Winters predictions. \n (4) Actions: Send email and/or UEB notification"
+ },
+ {
+ "serviceTypePolicyName": "Registration storm(Trinity)",
+ "verticaMetrics": "",
+ "attributes": {
+ "Onset&abatement anomaly detection": {
+ "SeasonLength": "Metric seasonality (5min sampling period with 7 days seasonality: 7*288) used by Holt-Winters model",
+ "TrainLength": "Training length (5min sampling period with 7 days seasonality and 5 cycles training: 7*288*5) used by Holt-Winters",
+ "Alpha": "Smoothing parameter (range 0-1, default 0.2)",
+ "Beta": "Trend parameter (range 0-1, default 0) ",
+ "Gamma": "Seasonality (range 0-1, default 0.05)",
+ "Deviation Threshold": "Approximately a limit on the factor by how much current value has deviated compared to expected variance"
+ },
+ "Onset signature trigger": {
+ "RetryTimer": "Minimum interval between policy triggers"
+ },
+ "Abatement signature trigger": {
+ "Hw-Timeout": "Maximum time for an HealthCheck response (measured from the time a positive App-C response was received)",
+ "OnSetMessage": "Value of field Message sent by Analytics Engine published on UEB "
+ },
+ "Onset & abatement UEB notification ": {
+ "AbatementMessage": "Value of field AbatementMessage sent by Analytics Engine published on UEB",
+ "PolicyName": "Value of field PolicyName sent by Analytics Engine published on UEB"
+ }
+ },
+ "policyDescription": "Policy to detect instances where count of Formatted table ? exceeds a predicted level. \n Notes \n (1) Vertica metrics normalized and combined in ? per Customer, per Site and per VM. \n (2) Anomaly detection model operates on ? \n (3) Anomaly detection consists of detecting deviations from Holt-Winters predictions. \n (4) Actions: Send email and/or UEB notification"
+ }
+] \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/console/bin/Policy-Admin.xml b/packages/base/src/files/install/servers/console/bin/Policy-Admin.xml
new file mode 100644
index 000000000..b2d70de9b
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/Policy-Admin.xml
@@ -0,0 +1,565 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<PolicySet xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicySetId="urn:com:att:xacml:policy:id:3db6785b-9343-4d1f-aa87-1470f7c64e42" Version="2" PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:first-applicable">
+ <Description>Extremely simple policy for accessing the admin console. If you are &quot;admin&quot; you can do anything. If you are &quot;editor&quot;, you can edit policies and the dictionaries. If you are &quot;guest&quot;, you can only read or view information.</Description>
+ <Target/>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:70a20f17-e538-4d07-8a2a-89bbdb6ca9e3" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Admin policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:07e4ea58-b2b7-41e4-a600-ebd5fb1c3114" Effect="Permit">
+ <Description>PERMIT - application access.</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e84e5501-0f73-445c-b5de-04f2947e0637" Effect="Permit">
+ <Description>PERMIT - any action on the admin</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b66-a23e-f475c41f2d91" Effect="Permit">
+ <Description>PERMIT - any action on the roles</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">workspace</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b66-a23e-f475c41f2d41" Effect="Permit">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">dictionaries</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b69-a23e-f475c41f2d51" Effect="Permit">
+ <Description>PERMIT - any action on the pdp</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pdp_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b69-a23e-f475c41f2d81" Effect="Permit">
+ <Description>PERMIT - any action on the pip</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pip_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e4541019-4503-490f-97e0-b94251fdc669" Effect="Permit">
+ <Description>PERMIT - admin can read</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:80422fdf-5094-4609-925e-289ad226e2aa" Effect="Deny">
+ <Description>DENY - default</Description>
+ <Target/>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b66-a23e-f475c41f2d10" Effect="Deny">
+ <Description>DENY- any action on manage scopes</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">manage_scopes</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:70a20f17-e538-4d07-8a2a-89bbdb6ca9e4" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Super Admin policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">super-admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:13067c96-14f7-4ab0-bea3-65d8cb0970b2" Effect="Permit">
+ <Description>PERMIT - superadmin can do everything in the admin console.</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:6edb392a-0d8f-4cbo-a965-229292fd1122" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Editor Policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">editor</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:07e4ea58-b2b7-41e4-a600-ebd5fb1c3144" Effect="Permit">
+ <Description>PERMIT - application access.</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:9c9ce992-196a-4da4-bbf6-4f4a88436635" Effect="Permit">
+ <Description>PERMIT - R/W workspace</Description>
+ <Target/>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Description>The action is read or write AND the resource is the workspace.</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
+ <Description>Action is Read OR Write</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>Is action = read?</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>Is action = write?</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">write</AttributeValue>
+ </Apply>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>resource is workspace</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">workspace</AttributeValue>
+ </Apply>
+ </Apply>
+ </Condition>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e84e5501-0f73-445c-b5de-04f2947e0677" Effect="Permit">
+ <Description>PERMIT - any action on the editor</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">editor</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b66-a23e-f475c41f2d11" Effect="Deny">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">dictionaries</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b69-a23e-f475c41f2d11" Effect="Permit">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pdp_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e4541019-4503-490f-97e0-b94251fdc629" Effect="Permit">
+ <Description>PERMIT - editor can read</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:80422fdf-5094-4609-925e-289ad226e2aa" Effect="Deny">
+ <Description>DENY - default</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:6edb392a-0d8f-4cbo-a965-229292fd1122" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Super Editor Policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">super-editor</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:07e4ea58-b2b7-41e4-a600-ebd5fb1c3144" Effect="Permit">
+ <Description>PERMIT - application access.</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:9c9ce992-196a-4da4-bbf6-4f4a88436635" Effect="Permit">
+ <Description>PERMIT - R/W workspace</Description>
+ <Target/>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Description>The action is read or write AND the resource is the workspace.</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
+ <Description>Action is Read OR Write</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>Is action = read?</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>Is action = write?</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">write</AttributeValue>
+ </Apply>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <Description>resource is workspace</Description>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <Description>Un-bag</Description>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">workspace</AttributeValue>
+ </Apply>
+ </Apply>
+ </Condition>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e84e5501-0f73-445c-b5de-04f2947e0677" Effect="Permit">
+ <Description>PERMIT - any action on the super editor</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">super-editor</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b66-a23e-f475c41f2d11" Effect="Deny">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">dictionaries</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b69-a23e-f475c41f2d11" Effect="Permit">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pdp_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e4541019-4503-490f-97e0-b94251fdc629" Effect="Permit">
+ <Description>PERMIT - super editor can read</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:80422fdf-5094-4609-925e-289ad226e2aa" Effect="Deny">
+ <Description>DENY - default</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:980c728d-fb53-4f2f-ba5f-823e594302eb" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Guest policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">guest</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:07e4ea58-b2b7-41e4-a600-ebd5fb1c3144" Effect="Permit">
+ <Description>PERMIT - application access.</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e4541019-4503-490f-97e0-b94251fdc629" Effect="Permit">
+ <Description>PERMIT - guest can access</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b67-a23e-f475c41f2d12s" Effect="Permit">
+ <Description>PERMIT - guest to access pdp</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pdp_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b68-a23e-f475c41f2d11" Effect="Permit">
+ <Description>PERMIT - any action on the policymanagement</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:80004328-a1fc-4238-b2a8-906f6b8ae572" Effect="Deny">
+ <Description>DENY - default</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:980c728d-fb53-4f2f-ba5f-823e594302eb" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>super guest policy</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">super-guest</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:att:xacml:rule:id:07e4ea58-b2b7-41e4-a600-ebd5fb1c3144" Effect="Permit">
+ <Description>PERMIT - application access.</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:e4541019-4503-490f-97e0-b94251fdc629" Effect="Permit">
+ <Description>PERMIT - super guest can access</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">access</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b67-a23e-f475c41f2d12s" Effect="Permit">
+ <Description>PERMIT - super guest to access pdp</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">pdp_admin</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:da1cf042-5949-4b68-a23e-f475c41f2d11" Effect="Permit">
+ <Description>PERMIT - any action on the dictionaries</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">application</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ </Rule>
+ <Rule RuleId="urn:com:att:xacml:rule:id:80004328-a1fc-4238-b2a8-906f6b8ae572" Effect="Deny">
+ <Description>DENY - default</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+ <Policy PolicyId="urn:com:att:xacml:policy:id:54702055-e0ce-456b-854b-ffab1ff0c7e9" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
+ <Description>Unknown user id</Description>
+ <Target/>
+ <Rule RuleId="urn:com:att:xacml:rule:id:5b6029cf-5c33-4948-8dc9-fd758f85db29" Effect="Deny">
+ <Description>DENY</Description>
+ <Target/>
+ </Rule>
+ </Policy>
+</PolicySet>
diff --git a/packages/base/src/files/install/servers/console/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/console/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/console/bin/model.properties b/packages/base/src/files/install/servers/console/bin/model.properties
new file mode 100644
index 000000000..ce448b9ed
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/model.properties
@@ -0,0 +1,22 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+ControllerServiceCollectorSdnlService=ControllerServiceCollectorSdnlServiceConfiguration,VirtualMachineServiceInstance
+VirtualMachineTEST=VirtualMachineServiceTest \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/console/bin/sql/log.h2.db b/packages/base/src/files/install/servers/console/bin/sql/log.h2.db
new file mode 100644
index 000000000..d203aec9d
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/sql/log.h2.db
Binary files differ
diff --git a/packages/base/src/files/install/servers/console/bin/sql/xacml.h2.db b/packages/base/src/files/install/servers/console/bin/sql/xacml.h2.db
new file mode 100644
index 000000000..f3d08adad
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/sql/xacml.h2.db
Binary files differ
diff --git a/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml
new file mode 100644
index 000000000..d4bc19eaa
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:708de148-2cfb-4211-930a-44b446c2d781" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides">
+ <Description>vFW Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DROOLS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ECOMPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">BRMS_PARAM_RULE</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskType" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskLevel" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="guard" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="TTLDate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:817128cd-2880-4e85-997b-1abff0eae822" Effect="Permit">
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="BRMSPARAMID" AppliesTo="Permit">
+ <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="URLID" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">$URL/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="PolicyName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.xml</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="VersionNumber" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ECOMPName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DROOLS</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ConfigName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">BRMS_PARAM_RULE</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="key:controller" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">vFW</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskType" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskLevel" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="guard" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="TTLDate" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy>
diff --git a/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml
new file mode 100644
index 000000000..f3bb31456
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:95afb43f-13f2-475c-9501-7e022d15b8a7" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides">
+ <Description>vLB Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DROOLS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ECOMPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">BRMS_PARAM_RULE</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskType" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskLevel" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="guard" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="TTLDate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:69f687f8-1f6e-485f-a4e8-5cb9beb28ba4" Effect="Permit">
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="BRMSPARAMID" AppliesTo="Permit">
+ <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="URLID" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">$URL/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="PolicyName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.xml</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="VersionNumber" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ECOMPName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DROOLS</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ConfigName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">BRMS_PARAM_RULE</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="key:controller" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">vDNS</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskType" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskLevel" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="guard" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="TTLDate" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy>
diff --git a/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vFirewall.1.xml b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vFirewall.1.xml
new file mode 100644
index 000000000..7081ebc67
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vFirewall.1.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:a1c91d9b-b5d2-4b04-b3a9-afcac74a8161" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides">
+ <Description>Micro Service vFirewall Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_MS_vFirewall.1.xml</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DCAE</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ECOMPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleConfigName</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TcaMetrics-v1.0.0.5</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="service" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="uuid" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleServiceLocation</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="location" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskType" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskLevel" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="guard" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="TTLDate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:2af7b2a1-6427-4765-ac5f-0d5e3c7d059f" Effect="Permit">
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="MSID" AppliesTo="Permit">
+ <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="URLID" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">$URL/Config/com.Config_MS_vFirewall.1.json</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="PolicyName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_MS_vFirewall.1.xml</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="VersionNumber" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ECOMPName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DCAE</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ConfigName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleConfigName</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:service" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TcaMetrics-v1.0.0.5</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:uuid" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:Location" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleServiceLocation</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="Priority" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskType" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskLevel" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="guard" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="TTLDate" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy>
diff --git a/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vLoadBalancer.1.xml b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vLoadBalancer.1.xml
new file mode 100644
index 000000000..8128ffbbd
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/workspace/admin/repository/com/Config_MS_vLoadBalancer.1.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:4fd0d4bd-729b-42dd-9c39-d63fea7c9655" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides">
+ <Description>Micro Service vLoadBalancer Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_MS_vLoadBalancer.1.xml</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ <AllOf>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DCAE</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ECOMPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleConfigName</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TcaMetrics-v1.0.0.5</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="service" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="uuid" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleServiceLocation</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="location" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskType" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="RiskLevel" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">False</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="guard" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="org.openecomp.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="TTLDate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:69d31737-09d4-429f-9e1d-6bcf39da90a1" Effect="Permit">
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="MSID" AppliesTo="Permit">
+ <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="URLID" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">$URL/Config/com.Config_MS_vLoadBalancer.1.json</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="PolicyName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Config_MS_vLoadBalancer.1.xml</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="VersionNumber" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ECOMPName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DCAE</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:ConfigName" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleConfigName</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:service" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TcaMetrics-v1.0.0.5</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:uuid" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="matching:Location" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleServiceLocation</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="Priority" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskType" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SampleRiskType</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="RiskLevel" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="guard" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1</AttributeValue>
+ </AttributeAssignmentExpression>
+ <AttributeAssignmentExpression AttributeId="TTLDate" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" Issuer="">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NA</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy>
diff --git a/packages/base/src/files/install/servers/console/bin/xacml.admin.properties b/packages/base/src/files/install/servers/console/bin/xacml.admin.properties
new file mode 100644
index 000000000..8a214a8ab
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/bin/xacml.admin.properties
@@ -0,0 +1,203 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# This file is set to the defaults one can use to run the XACML-PAP-ADMIN for testing and development.
+#
+# It is not recommended to modify this file directly, but rather copy it to another location and make any modifications
+# necessary to run the application in a development or a production environment. You can set the Java VM System
+# property to change where the application can find the file. For example:
+#
+#-Dxacml.properties=/opt/app/xacml/etc/xacml.admin.properties
+#
+#
+# Standard API Factories
+#
+xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory
+xacml.pdpEngineFactory=com.att.research.xacmlatt.pdp.ATTPDPEngineFactory
+xacml.pepEngineFactory=com.att.research.xacml.std.pep.StdEngineFactory
+xacml.pipFinderFactory=com.att.research.xacml.std.pip.StdPIPFinderFactory
+#
+# AT&T PDP Implementation Factories
+#
+xacml.att.evaluationContextFactory=com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory
+xacml.att.combiningAlgorithmFactory=com.att.research.xacmlatt.pdp.std.StdCombiningAlgorithmFactory
+xacml.att.functionDefinitionFactory=org.openecomp.policy.xacml.custom.EcompFunctionDefinitionFactory
+xacml.att.policyFinderFactory=com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory
+
+#
+# This is an extremely simple policy to demonstrate authorization
+# within the Admin Console.
+#
+xacml.rootPolicies=${{ROOT_POLICIES}}
+admin.file=${{ADMIN_FILE}}
+
+#
+# PAP Servlet properties
+#
+xacml.PAP.papEngineFactory=org.openecomp.policy.xacml.std.pap.StdEngineFactory
+
+#
+# Admin Console properties
+#
+xacml.AC.papEngineFactory=org.openecomp.policy.xacml.admin.util.RESTfulPAPFactory
+
+# Set your domain here:
+
+xacml.rest.admin.domain=${{REST_ADMIN_DOMAIN}}
+#
+# Location where the GIT repository is located
+#
+xacml.rest.admin.repository=${{REST_ADMIN_REPOSITORY}}
+#
+# Location where all the user workspaces are located.
+#
+xacml.rest.admin.workspace=${{REST_ADMIN_WORKSPACE}}
+
+
+xacml.rest.admin.closedLoopJSON =JSONConfig.json
+xacml.rest.admin.microServiceModel=model.properties
+xacm.restful.interface.file=RESTful.interface.properties
+#
+#
+# Property to declare the max time frame for logs.
+#
+xacml.log.timeframe=${{LOG_TIMEFRAME}}
+
+#Log DB information
+xacml.log.db.driver=${{JDBC_DRIVER}}
+xacml.log.db.url=${{JDBC_LOG_URL}}
+xacml.log.db.user=${{JDBC_USER}}
+xacml.log.db.password=${{JDBC_PASSWORD}}
+
+# Dashboard refresh rate in miliseconds
+xacml.refresh.rate=${{REFRESH_RATE}}
+
+# Number of visable rows for users in MicroService Policy
+xacml.user.column.count=${{COLUMN_COUNT}}
+
+#the page length for the sqlcontainer used on Dashbaord
+xacml.sqlcontainer.page.length=75
+
+#Patter to identify if a attribute is ready. Currently just a place holder
+xacm.xcor.required.pattern=1,1
+
+#The time to hold the cache of values for the attributes retrieved from Remote dictionary
+xacm.cache.live.time=2
+
+#The largest value that priority can be set in on the UI
+xacml.max.priority.count=10
+#The max Model Leve Displayed on the UI
+xacml.model.level=4
+#
+# These can be set so the Admin Console knows who is logged on. Ideally, you can run the console in a J2EE
+# container and setup authentication as you please. Setting HttpSession attribute values will override these
+# values set in the properties files.
+#
+# ((HttpServletRequest) request).getSession().setAttribute("xacml.rest.admin.user.name", "Homer");
+#
+# The default policy: Policy-Admin.xml is extremely simple.
+#
+# You can test authorization within the Admin Console by changing the user id.
+# There are 3 supported user ids:
+# guest - Read only access
+# editor - Read/Write access
+# admin - Read/Write/Admin access
+#
+# An empty or null value for xacml.rest.admin.user.id results in no access to the application at all.
+#
+# This is for development/demonstration purposes only. A production environment should provide authentication which is
+# outside the scope of this application. This application can be used to develop a XACML policy for user authorization
+# within this application.
+#
+
+xacml.rest.admin.user.name=${{REST_ADMIN_USER_NAME}}
+xacml.rest.admin.user.id=${{REST_ADMIN_USER_ID}}
+xacml.rest.admin.user.email=
+
+#
+# URL location for the PAP servlet.
+#
+
+xacml.rest.pap.url=${{REST_PAP_URL}}
+
+xacml.rest.config.home=${{REST_CONFIG_HOME}}
+xacml.rest.action.home=${{REST_ACTION_HOME}}
+xacml.rest.config.url=${{REST_CONFIG_URL}}
+xacml.rest.config.webapps=${{REST_CONFIG_WEBAPPS}}
+
+# PAP account information
+xacml.rest.pap.userid=${{CONSOLE_PAP_HTTP_USER_ID}}
+xacml.rest.pap.password=${{CONSOLE_PAP_HTTP_PASSWORD}}
+
+# pdps file - Needs to have the location of the PDPs File of the PAP-REST
+xacml.rest.pdp.idfile=${{POLICY_HOME}}/servers/pap/bin/test.properties
+
+#Template Versions
+xacml.rest.closedLoopFault=OpenSource.version.1
+xacml.rest.closedLoopPM=OpenSource.version.1
+xacml.rest.microServices=OpenSource.version.1
+xacml.rest.gocPolicy=OpenSource.version.1
+xacml.rest.firewallPolicy=OpenSource.version.1
+
+#***Properties for IntegrityMonitor integration defined in XACMLRestProperties.java***
+#The name of the Admin. Must be unique across the system
+xacml.rest.admin.resource.name=${{resource_name}}
+
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
+
+# The (optional) period of time in seconds between executions of the integrity audit.
+# Value < 0 : Audit does not run (default value if property is not present = -1)
+# Value = 0 : Audit runs continuously
+# Value > 0 : The period of time in seconds between execution of the audit on a particular node
+integrity_audit_period_seconds=${{integrity_audit_period_seconds}}
+
+#Automatic Policy Distribution
+xacml.att.automatic.push = ${{automatic_push}}
+
+
+#Dashboard Tab Limit
+xacml.ecomp.dashboard.logTableLimit = 5000
+xacml.ecomp.dashboard.systemAlertTableLimit = 2000
+
+#Diff of policies for Firewall feature
+FW_GETURL=${{FW_GETURL}}
+FW_AUTHOURL=${{FW_AUTHOURL}}
+FW_PROXY=${{FW_PROXY}}
+FW_PORT=${{FW_PORT}}
+
+#SMTP Server Details for Java Mail
+ecomp.smtp.host = ${{ecomp_smtp_host}}
+ecomp.smtp.port = ${{ecomp_smtp_port}}
+ecomp.smtp.userName = ${{ecomp_smtp_userName}}
+ecomp.smtp.password = ${{ecomp_smtp_password}}
+ecomp.smtp.emailExtension=${{ecomp_smtp_emailExtension}}
+ecomp.application.name = ${{ecomp_application_name}}
+
+#Dialect for Database
+ecomp.dialect = org.hibernate.dialect.MySQLDialect
diff --git a/packages/base/src/files/install/servers/console/conf/server.xml b/packages/base/src/files/install/servers/console/conf/server.xml
new file mode 100644
index 000000000..f45c5646c
--- /dev/null
+++ b/packages/base/src/files/install/servers/console/conf/server.xml
@@ -0,0 +1,172 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!-- Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/server.html
+ -->
+<Server port="${{TOMCAT_SHUTDOWN_PORT}}" shutdown="SHUTDOWN">
+ <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
+ <!-- Security listener. Documentation at /docs/config/listeners.html
+ <Listener className="org.apache.catalina.security.SecurityListener" />
+ -->
+ <!--APR library loader. Documentation at /docs/apr.html -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+ <!-- Global JNDI resources
+ Documentation at /docs/jndi-resources-howto.html
+ -->
+ <GlobalNamingResources>
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users
+ -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved"
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+ pathname="conf/tomcat-users.xml" />
+ </GlobalNamingResources>
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" Note: A "Service" is not itself a "Container",
+ so you may not define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/service.html
+ -->
+ <Service name="Catalina">
+
+ <!--The connectors can use a shared executor, you can define one or more named thread pools-->
+ <!--
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+ maxThreads="150" minSpareThreads="4"/>
+ -->
+
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Documentation at :
+ Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
+ Java AJP Connector: /docs/config/ajp.html
+ APR (HTTP/AJP) Connector: /docs/apr.html
+ Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
+ -->
+ <!--
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="${{SSL_HTTP_CONNECTOR_REDIRECT_PORT}}" />
+ -->
+
+ <!-- A "Connector" using the shared thread pool-->
+ <!--
+ <Connector executor="tomcatThreadPool"
+ port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+ -->
+ <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
+ This connector uses the NIO implementation that requires the JSSE
+ style configuration. When using the APR/native implementation, the
+ OpenSSL style configuration is required as described in the APR/native
+ documentation
+ -->
+
+ <!-- ECOMP portal currently using http instead of https
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
+ clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2"
+ keystoreFile="${{POLICY_HOME}}/etc/ssl/policy-keystore" keystorePass="${{KEYSTORE_PASSWD}}"/>
+ -->
+ <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" />
+
+
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector port="${{SSL_AJP_CONNECTOR_PORT}}" protocol="AJP/1.3" redirectPort="${{SSL_AJP_CONNECTOR_REDIRECT_PORT}}" />
+
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host).
+ Documentation at /docs/config/engine.html -->
+
+ <!-- You should set jvmRoute to support load-balancing via AJP ie :
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
+ -->
+ <Engine name="Catalina" defaultHost="localhost">
+
+ <!--For clustering, please take a look at documentation at:
+ /docs/cluster-howto.html (simple how to)
+ /docs/config/cluster.html (reference documentation) -->
+ <!--
+ <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
+ -->
+
+ <!-- Use the LockOutRealm to prevent attempts to guess user passwords
+ via a brute-force attack -->
+ <Realm className="org.apache.catalina.realm.LockOutRealm">
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ resourceName="UserDatabase"/>
+ </Realm>
+
+ <Host name="localhost" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- SingleSignOn valve, share authentication between web applications
+ Documentation at: /docs/config/valve.html -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
+
+ <!-- Access log processes all example.
+ Documentation at: /docs/config/valve.html
+ Note: The pattern used is equivalent to using pattern="common" -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ prefix="localhost_access_log" suffix=".txt"
+ pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+
+ </Host>
+ </Engine>
+ </Service>
+</Server>
diff --git a/packages/base/src/files/install/servers/ecomp/WEB-INF/classes/portal.properties b/packages/base/src/files/install/servers/ecomp/WEB-INF/classes/portal.properties
new file mode 100644
index 000000000..54c5cb1df
--- /dev/null
+++ b/packages/base/src/files/install/servers/ecomp/WEB-INF/classes/portal.properties
@@ -0,0 +1,73 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# Properties read by ECOMP Framework library, ecompFW.jar
+
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
+
+portal.api.prefix = /api
+max.idle.time = 5
+user.attribute.name = user_attribute
+
+# CSP settings
+csp_cookie_name = attESSec
+csp_gate_keeper_prod_key = PROD
+testing=testing
+
+#Use REST API instead of UEB to fetch the functional menu data
+use_rest_for_functional_menu=true
+
+##########################################################################
+# The following properties MUST be changed by partner applications.
+##########################################################################
+
+# Name of java class that implements the OnBoardingApiService interface.
+portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImplPolicy
+
+# CSP Global Log On for single sign on
+ecomp_redirect_url = ${{ECOMP_REDIRECT_URL}}
+
+# URL of the ECOMP Portal REST API
+# ecomp.homer.com is a development machine
+ecomp_rest_url = ${{ECOMP_REST_URL}}
+
+# Applications do not need to run a UEB listener in 1610.
+ueb_listeners_enable = false
+
+# UEB Configuration
+# In release 1607, all 6 entries below were required.
+# In release 1610, if key ueb_listeners_enable is set to false,
+# then only the ueb_app_key is required.
+# UEB servers
+ueb_url_list = ${{ECOMP_UEB_URL_LIST}}
+# ECOMP Portal listens on this UEB topic
+ecomp_portal_inbox_name = ${{ECOMP_PORTAL_INBOX_NAME}}
+# Replace these 3 default values with the ones for your specific App,
+# as shown on the on-boarding page on the ECOMP Portal web application.
+ueb_app_key = ${{ECOMP_UEB_APP_KEY}}
+ueb_app_secret = ${{ECOMP_UEB_APP_SECRET}}
+ueb_app_mailbox_name = ${{ECOMP_UEB_APP_MAILBOX_NAME}}
+# Consumer group name for UEB topic.
+# Use the special tag '{UUID}' to generate a unique one for each sdk-app server.
+ueb_app_consumer_group_name = {UUID}
+
+decryption_key = AGLDdG4D04BKm2IxIWEr8o==
diff --git a/packages/base/src/files/install/servers/ecomp/WEB-INF/conf/system.properties b/packages/base/src/files/install/servers/ecomp/WEB-INF/conf/system.properties
new file mode 100644
index 000000000..a6f915783
--- /dev/null
+++ b/packages/base/src/files/install/servers/ecomp/WEB-INF/conf/system.properties
@@ -0,0 +1,84 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# Properties read by ECOMP Core library, ecompSDK-core.jar
+
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
+
+application_user_id = 30000
+post_default_role_id = 16
+clustered = true
+
+#Enable Fusion Mobile capabilities for the application
+mobile_enable = false
+
+# Cache config file is needed on the classpath
+cache_config_file_path = /WEB-INF/classes/cache.ccf
+cache_switch = 199
+cache_load_on_startup = false
+
+user_name = fullName
+decryption_key = AGLDdG4D04BKm2IxIWEr8o==
+
+#DB Info
+#mysql
+db.driver = ${{JDBC_DRIVER}}
+db.connectionURL = ${{JDBC_URL}}
+db.userName = ${{JDBC_USER}}
+db.password = ${{JDBC_PASSWORD}}
+db.min_pool_size = 5
+db.max_pool_size = 100
+hb.dialect = org.hibernate.dialect.MySQLDialect
+hb.show_sql = false
+hb.idle_connection_test_period = 3600
+
+app_display_name = ${{APP_DISPLAY_NAME}}
+files_path = /tmp
+
+#element map files
+element_map_file_path = /tmp
+element_map_icon_path = app/fusionapp/icons/
+
+#Cron Schedules
+log_cron = 0 0/1 * * * ?;
+mylogins_feed_cron = 0 0/60 * * * ?;
+#sessiontimeout_feed_cron = 0 * * * * ? *
+my_login_feed_output_dir = /tmp/MyLogins
+
+# ECOMP Portal Shared Context REST API URL
+ecomp_shared_context_rest_url= ${{ECOMP_SHARED_CONTEXT_REST_URL}}
+
+# Link shown in Help menu
+contact_us_link =
+
+# An Unique 128-bit value defined to identify a specific version
+# of an application deployed on a specific virtual machine.
+# This value must be generated and updated by the application
+# which is using the ECOMP SDK at the time of its deployment.
+# Online Unique UUID generator - https://www.uuidgenerator.net/
+instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d
+
+# R Cloud feature
+guard_notebook_url=
+
+#authenticate user server
+authenticate_user_server=${{AUTHENTICATE_USER_SERVERS}} \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/ecomp/app/policyApp/Properties/config.json b/packages/base/src/files/install/servers/ecomp/app/policyApp/Properties/config.json
new file mode 100644
index 000000000..d16c5c269
--- /dev/null
+++ b/packages/base/src/files/install/servers/ecomp/app/policyApp/Properties/config.json
@@ -0,0 +1,3 @@
+{
+ "PAP_URL" : "${{REST_PAPURL_WITH_AUTH_PASSWORD}}"
+}
diff --git a/packages/base/src/files/install/servers/pap/bin/autopush.properties b/packages/base/src/files/install/servers/pap/bin/autopush.properties
new file mode 100644
index 000000000..8d780842f
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/bin/autopush.properties
@@ -0,0 +1,22 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+default.policyType=
+default.policyScope= \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/pap/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/pap/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/pap/bin/test.properties b/packages/base/src/files/install/servers/pap/bin/test.properties
new file mode 100644
index 000000000..e983c3b7c
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/bin/test.properties
@@ -0,0 +1,21 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+PDP_URL=${{PAP_PDP_URL}},${{PAP_PDP_HTTP_USER_ID}},${{PAP_PDP_HTTP_PASSWORD}}
diff --git a/packages/base/src/files/install/servers/pap/bin/xacml.pap.properties b/packages/base/src/files/install/servers/pap/bin/xacml.pap.properties
new file mode 100644
index 000000000..0393bdefa
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/bin/xacml.pap.properties
@@ -0,0 +1,132 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#
+# This is our factory that will create our engine
+#
+xacml.PAP.papEngineFactory=org.openecomp.policy.xacml.std.pap.StdEngineFactory
+
+#
+# Where we store our PAP PDP Group/Node information
+#
+xacml.pap.pdps=${{PAP_PDPS}}
+
+#
+# Need the PAP's url (how PDPs will reach it) configured here
+# because we need it to generate the URLs of the Policy Files
+# sent to the PDPs in the configuration when the PAP is first brought up.
+# (In other cases, such as the PDP calling the PAP, we could generate this URL,
+# but for startup there is no other way to get it.)
+#
+#
+xacml.rest.pap.url=${{PAP_URL}}
+
+#
+# Upon startup, have the PAP servlet send latest configuration information to all
+# the PDP nodes it knows about.
+#
+xacml.rest.pap.initiate.pdp=${{PAP_INITIATE_PDP}}
+#
+# Heartbeat from PAP to PDPs
+#
+# How much time (in milliseconds) between heartbeats
+# (i.e. the time between completing the heartbeat with all PDPs and starting the next cycle)
+#
+xacml.rest.pap.heartbeat.interval=${{PAP_HEARTBEAT_INTERVAL}}
+#
+# Heartbeat connection timeout (in milliseconds)
+#
+xacml.rest.pap.heartbeat.timeout=${{PAP_HEARTBEAT_TIMEOUT}}
+
+################################################################################################
+# Adding properties for getting properties previously used by PAP-ADMIN for creating Policies
+# THis is part of the Policy Creation API project
+################################################################################################
+
+# Set your domain here:
+xacml.rest.pap.domain=${{REST_ADMIN_DOMAIN}}
+
+# Location where all the user workspaces are located.
+xacml.rest.pap.workspace=${{REST_ADMIN_WORKSPACE}}
+
+# Location where the GIT repository is located
+xacml.rest.pap.repository=${{REST_ADMIN_REPOSITORY}}
+
+# PAP-REST webapps Location here.
+xacml.rest.config.webapps=${{POLICY_HOME}}/servers/pap/webapps
+
+# id
+xacml.rest.pap.userid=${{PAP_HTTP_USER_ID}}
+# pass
+xacml.rest.pap.password=${{PAP_HTTP_PASSWORD}}
+# pdps file
+xacml.rest.pdp.idfile=test.properties
+
+#New values added 10-21-2015
+#database driver for PAP
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+#database URL for PAP
+javax.persistence.jdbc.url=${{JDBC_URL}}
+#database username for PAP
+javax.persistence.jdbc.user=${{JDBC_USER}}
+#database password for PAP
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+#Time in ms which a Policy DB transaction will wait to get the transaction lock object
+xacml.rest.pap.transaction.waitms=${{PROP_PAP_TRANS_WAIT}}
+#Policy DB transaction timeout in ms after it has obtained the transaction lock object
+xacml.rest.pap.transaction.timeoutms=${{PROP_PAP_TRANS_TIMEOUT}}
+#Policy Audit timeout in ms after it has obtained the transaction lock object
+xacml.rest.pap.audit.timeoutms=${{PROP_PAP_AUDIT_TIMEOUT}}
+#Turning audit ON (set to true) will synchronize the policies in the filesystem with those in the database.
+#Turning audit OFF (set to false) will not synchronize policies
+xacml.rest.pap.run.audit.flag=${{PROP_PAP_RUN_AUDIT_FLAG}}
+#The audit can run in two directions.
+# 1.The file system can duplicate the database: database>file system (set property to true)
+# 2.The database can duplicate the file system: file system>database (set property to false)
+xacml.rest.pap.filesystem.audit=${{PROP_PAP_AUDIT_FLAG}}
+#AutoPush Policy Flag
+xacml.rest.pap.autopush.flag=false
+#AutoPush Policy
+xacml.rest.pap.autopush.file=autopush.properties
+#Patter to identify if a attribute is ready. Currently just a place holder
+xacm.xcor.required.pattern=1,1
+
+#***Properties for IntegrityMonitor integration defined in XACMLRestProperties.java***
+#The name of the PAP. Must be unique across the system
+xacml.rest.pap.resource.name=${{resource_name}}
+
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+dependency_groups=${{dependency_groups}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
+
+# The (optional) period of time in seconds between executions of the integrity audit.
+# Value < 0 : Audit does not run (default value if property is not present = -1)
+# Value = 0 : Audit runs continuously
+# Value > 0 : The period of time in seconds between execution of the audit on a particular node
+integrity_audit_period_seconds=${{integrity_audit_period_seconds}}
+# Environment should be Set either DEV, TEST or PROD
+ENVIRONMENT=${{ENVIRONMENT}} \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt
new file mode 100644
index 000000000..42b67999f
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvFWDemoPolicy.1.txt
@@ -0,0 +1,1116 @@
+/* Autogenerated Code Please Don't change/remove this comment section. This is for the UI purpose.
+ <$%BRMSParamTemplate=ControlLoopDemo__closedLoopControlName%$>
+ */
+
+
+/*-
+ * ============LICENSE_START=======================================================
+ * archetype-closed-loop-demo-rules
+ * ================================================================================
+ * Copyright (C) 2017 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.policy.controlloop;
+
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.openecomp.policy.controlloop.VirtualControlLoopEvent;
+import org.openecomp.policy.controlloop.ControlLoopEventStatus;
+import org.openecomp.policy.controlloop.VirtualControlLoopNotification;
+import org.openecomp.policy.controlloop.ControlLoopNotificationType;
+import org.openecomp.policy.controlloop.ControlLoopOperation;
+import org.openecomp.policy.controlloop.ControlLoopOperationWrapper;
+import org.openecomp.policy.template.demo.ControlLoopException;
+
+import org.openecomp.policy.aai.AAINQF199.AAINQF199CloudRegion;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperties;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperty;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199GenericVNF;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InstanceFilters;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItems;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Manager;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199NamedQuery;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199QueryParameters;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Request;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199RequestWrapper;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Response;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ResponseWrapper;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ServiceInstance;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Tenant;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199VfModule;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199VServer;
+import org.openecomp.policy.aai.util.Serialization;
+
+import org.openecomp.policy.appc.CommonHeader;
+import org.openecomp.policy.appc.Request;
+import org.openecomp.policy.appc.Response;
+import org.openecomp.policy.appc.ResponseCode;
+import org.openecomp.policy.appc.ResponseStatus;
+import org.openecomp.policy.appc.ResponseValue;
+
+import org.openecomp.policy.template.demo.EventManager;
+import org.openecomp.policy.vnf.trafficgenerator.PGRequest;
+import org.openecomp.policy.vnf.trafficgenerator.PGStream;
+import org.openecomp.policy.vnf.trafficgenerator.PGStreams;
+
+import org.openecomp.policy.mso.MSOManager;
+import org.openecomp.policy.mso.MSORequest;
+import org.openecomp.policy.mso.MSORequestStatus;
+import org.openecomp.policy.mso.MSORequestDetails;
+import org.openecomp.policy.mso.MSOModelInfo;
+import org.openecomp.policy.mso.MSOCloudConfiguration;
+import org.openecomp.policy.mso.MSORequestInfo;
+import org.openecomp.policy.mso.MSORequestParameters;
+import org.openecomp.policy.mso.MSORelatedInstanceListElement;
+import org.openecomp.policy.mso.MSORelatedInstance;
+import org.openecomp.policy.mso.MSOResponse;
+
+import org.openecomp.policy.drools.system.PolicyEngine;
+
+//
+// These parameters are required to build the runtime policy
+//
+declare Params
+ closedLoopControlName : String
+ actor : String
+ aaiURL : String
+ aaiUsername : String
+ aaiPassword : String
+ msoURL : String
+ msoUsername : String
+ msoPassword : String
+ aaiNamedQueryUUID : String
+ aaiPatternMatch : int
+ notificationTopic : String
+ appcTopic : String
+end
+
+/*
+*
+* Called once and only once to insert the parameters into working memory for this Closed Loop policy.
+* (Comment SETUP rule out for the first ECOMP opensource release since policy BRMS_GW already puts a Params fact in there)
+*
+*
+*rule "BRMSParamvFWDemoPolicy.SETUP"
+* when
+* then
+* System.out.println("rule SETUP is triggered.");
+* Params params = new Params();
+* params.setClosedLoopControlName("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
+* params.setActor("APPC");
+* params.setAaiURL("null");
+* params.setAaiUsername("null");
+* params.setAaiPassword("null");
+* params.setMsoURL("null");
+* params.setMsoUsername("null");
+* params.setMsoPassword("null");
+* params.setAaiNamedQueryUUID("null");
+* params.setAaiPatternMatch(1);
+* params.setNotificationTopic("POLICY-CL-MGT");
+* params.setAppcTopic("APPC-CL");
+* //
+* // This stays in memory as long as the rule is alive and running
+* //
+* insert(params);
+*end
+*/
+/*
+*
+* This rule responds to DCAE Events
+*
+*/
+rule "BRMSParamvFWDemoPolicy.EVENT"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ not ( EventManager( closedLoopControlName == $event.closedLoopControlName ))
+ then
+ System.out.println("rule EVENT is triggered.");
+ try {
+ //
+ // Check the requestID in the event to make sure it is not null before we create the EventManager.
+ // The EventManager will do extra syntax checking as well check if the closed loop is disabled/
+ //
+ if ($event.requestID == null) {
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.from = "policy";
+ notification.message = "Missing requestID from DCAE event";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ //
+ // Retract it from memory
+ //
+ retract($event);
+ System.out.println("Event with requestID=null has been retracted.");
+ } else {
+ //
+ // Create an EventManager
+ //
+ EventManager manager = new EventManager($params.getClosedLoopControlName(), $event.requestID, $event.target);
+ //
+ // Determine if EventManager can actively process the event (i.e. syntax)
+ //
+ VirtualControlLoopNotification notification = manager.activate($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ // Are we actively pursuing this event?
+ //
+ if (notification.notification == ControlLoopNotificationType.ACTIVE) {
+ //
+ // Insert Event Manager into memory, this will now kick off processing.
+ //
+ insert(manager);
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ } else {
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ //
+ // Retract it from memory
+ //
+ retract($event);
+ }
+ //
+ // Now that the manager is inserted into Drools working memory, we'll wait for
+ // another rule to fire in order to continue processing. This way we can also
+ // then screen for additional ONSET and ABATED events for this same RequestIDs
+ // and for different RequestIDs but with the same closedLoopControlName and target.
+ //
+ }
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.message = "Exception occurred " + e.getMessage();
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ //
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ // Retract the event
+ //
+ retract($event);
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid ONSET, closed loop is enabled and an Event Manager
+* is created. We can start the operations for this closed loop.
+*
+*/
+rule "BRMSParamvFWDemoPolicy.EVENT.MANAGER"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)
+ then
+ System.out.println("rule EVENT.MANAGER is triggered.");
+ //
+ // Check which event this is.
+ //
+ EventManager.NEW_EVENT_STATUS eventStatus = $manager.onNewEvent($event);
+ //
+ // We only want the initial ONSET event in memory,
+ // all the other events need to be retracted to support
+ // cleanup and avoid the other rules being fired for this event.
+ //
+ if (eventStatus != EventManager.NEW_EVENT_STATUS.FIRST_ONSET) {
+ System.out.println("Retracting "+eventStatus+" Event.");
+ retract($event);
+ return;
+ }
+ //
+ // Now the event in memory is first onset event
+ //
+ try {
+ //
+ // Pull the known AAI field from the Event
+ //
+ // generic-vnf is needed for vFirewall case
+ // vserver-name is needed for vLoadBalancer case
+ //
+ String genericVNF = $event.AAI.get("generic-vnf.vnf-id");
+ String vserver = $event.AAI.get("vserver.vserver-name");
+ //
+ // Check if we are implementing a simple pattern match.
+ //
+ if ($params.getAaiPatternMatch() == 1) {
+ //
+ // Yes
+ //
+ //Basic naming characteristics:
+ //VF Name (9 char)+VM name (13 char total)+VFC (19 char total)
+ //Example:
+ //VF Name (9 characters): cscf0001v
+ //VM Name(13 characters): cscf0001vm001
+ //VFC name(19 characters): cscf0001vm001cfg001
+ //
+ // zdfw1fwl01fwl02 or zdfw1fwl01fwl01
+ // replaced with
+ // zdfw1fwl01pgn02 or zdfw1fwl01pgn01
+ //
+ int index = genericVNF.lastIndexOf("fwl");
+ if (index == -1) {
+ System.err.println("The generic-vnf.vnf-id from DCAE Event is not valid.");
+ } else {
+ genericVNF = genericVNF.substring(0, index) + "pgn" + genericVNF.substring(index+"fwl".length());
+ }
+ //
+ // Construct an APPC request
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "ModifyConfig";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // insert operationWrapper into memory
+ //
+ insert(operationWrapper);
+ //
+ Request request = new Request();
+ request.CommonHeader = new CommonHeader();
+ request.CommonHeader.RequestID = $event.requestID;
+ request.Action = operation.operation;
+ request.Payload = new HashMap<String, Object>();
+ //
+ // Fill in the payload
+ //
+ request.Payload.put("generic-vnf.vnf-id", genericVNF);
+ //
+ PGRequest pgRequest = new PGRequest();
+ pgRequest.pgStreams = new PGStreams();
+
+ PGStream pgStream;
+ for(int i = 0; i < 5; i++){
+ pgStream = new PGStream();
+ pgStream.streamId = "fw_udp"+(i+1);
+ pgStream.isEnabled = "true";
+ pgRequest.pgStreams.pgStream.add(pgStream);
+ }
+ request.Payload.put("pg-streams", pgRequest.pgStreams);
+
+ if (request != null) {
+ //
+ // Insert request into memory
+ //
+ insert(request);
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ // message and history ??
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Now send the operation request
+ //
+ if (request instanceof Request) {
+ try {
+ System.out.println("APPC request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ PolicyEngine.manager.deliver($params.getAppcTopic(), request);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver request: " + request);
+ }
+ }
+ } else {
+ //
+ // what happens if it is null
+ //
+ }
+ //
+ } else {
+ //
+ // create AAI named-query request with UUID started with "F199"
+ //
+ AAINQF199Request aainqf199request = new AAINQF199Request();
+ AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();
+ AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();
+ AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();
+ //
+ // queryParameters
+ //
+ aainqf199namedquery.namedQueryUUID = UUID.fromString($params.getAaiNamedQueryUUID());
+ aainqf199queryparam.namedQuery = aainqf199namedquery;
+ aainqf199request.queryParameters = aainqf199queryparam;
+ //
+ // instanceFilters
+ //
+ Map aainqf199instancefiltermap = new HashMap();
+ Map aainqf199instancefiltermapitem = new HashMap();
+ aainqf199instancefiltermapitem.put("vserver-name", vserver);
+ aainqf199instancefiltermap.put("vserver", aainqf199instancefiltermapitem);
+ aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);
+ aainqf199request.instanceFilters = aainqf199instancefilter;
+ //
+ // print aainqf199request for debug
+ //
+ System.out.println("AAI Request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(aainqf199request));
+ //
+ // Create AAINQF199RequestWrapper
+ //
+ AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper($event.requestID, aainqf199request);
+ //
+ // insert aainqf199request into memory
+ //
+ insert(aainqf199RequestWrapper);
+ }
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid ONSET, closed loop is enabled, an Event Manager
+* is created, AAI Manager and AAI Request are ready in memory. We can start sending query to AAI and then wait for response.
+*
+*/
+rule "BRMSParamvFWDemoPolicy.EVENT.MANAGER.AAINQF199REQUEST"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
+ then
+ System.out.println("rule EVENT.MANAGER.AAINQF199REQUEST is triggered.");
+ //
+ // send the request
+ //
+ AAINQF199Response aainqf199response = AAINQF199Manager.postQuery($params.getAaiURL(), $params.getAaiUsername(), $params.getAaiPassword(),
+ $aainqf199RequestWrapper.aainqf199request, $event.requestID);
+ //
+ // Check AAI response
+ //
+ if (aainqf199response == null) {
+ System.err.println("Failed to get AAI response");
+ //
+ // Fail and retract everything
+ //
+ retract($event);
+ retract($manager);
+ retract($aainqf199RequestWrapper);
+ } else {
+ //
+ // Create AAINQF199ResponseWrapper
+ //
+ AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper($event.requestID, aainqf199response);
+ //
+ // insert aainqf199ResponseWrapper to memeory
+ //
+ insert(aainqf199ResponseWrapper);
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.
+*
+*/
+rule "BRMSParamvFWDemoPolicy.EVENT.MANAGER.AAINQF199RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
+ $aainqf199ResponseWrapper : AAINQF199ResponseWrapper(requestID == $event.requestID)
+ then
+ System.out.println("rule EVENT.MANAGER.AAINQF199RESPONSE is triggered.");
+ //
+ // Extract related fields out of AAINQF199RESPONSE
+ //
+ String vnfItemVnfId, vnfItemVnfType, vnfItemPersonaModelId, vnfItemPersonaModelVersion, vnfItemModelName,
+ vnfItemModelVersion, vnfItemModelNameVersionId, serviceItemServiceInstanceId, serviceItemPersonaModelId,
+ serviceItemModelName, serviceItemModelType, serviceItemModelVersion, serviceItemModelNameVersionId,
+ vfModuleItemVfModuleName, vfModuleItemPersonaModelId, vfModuleItemPersonaModelVersion, vfModuleItemModelName,
+ vfModuleItemModelNameVersionId, tenantItemTenantId, cloudRegionItemCloudRegionId;
+ try {
+ //
+ // vnfItem
+ //
+ vnfItemVnfId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID;
+ vnfItemVnfType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType;
+ vnfItemVnfType = vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf("/")+1);
+ vnfItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId;
+ vnfItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion;
+ vnfItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;
+ vnfItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue;
+ vnfItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // serviceItem
+ //
+ serviceItemServiceInstanceId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID;
+ serviceItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId;
+ serviceItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;
+ serviceItemModelType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue;
+ serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion;
+ serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // This comes from the base module
+ //
+ vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName;
+ vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace("Vfmodule", "vDNS");
+ //
+ // vfModuleItem - NOT the base module
+ //
+ vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId;
+ vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion;
+ vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue;
+ vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // tenantItem
+ //
+ tenantItemTenantId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId;
+ //
+ // cloudRegionItem
+ //
+ cloudRegionItemCloudRegionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.message = "Exception occurred " + e.getMessage();
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ notification.message = "Invalid named-query response from AAI";
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ // Retract everything
+ //
+ retract($aainqf199RequestWrapper);
+ retract($aainqf199ResponseWrapper);
+ retract($manager);
+ retract($event);
+ return;
+ }
+ //
+ // Extracted fields should not be null
+ //
+ if ((vnfItemVnfId == null) || (vnfItemVnfType == null) ||
+ (vnfItemPersonaModelId == null) || (vnfItemModelName == null) ||
+ (vnfItemModelVersion == null) || (vnfItemModelNameVersionId == null) ||
+ (serviceItemServiceInstanceId == null) || (serviceItemModelName == null) ||
+ (serviceItemModelType == null) || (serviceItemModelVersion == null) ||
+ (serviceItemModelNameVersionId == null) || (vfModuleItemVfModuleName == null) ||
+ (vfModuleItemPersonaModelId == null) || (vfModuleItemPersonaModelVersion == null) ||
+ (vfModuleItemModelName == null) || (vfModuleItemModelNameVersionId == null) ||
+ (tenantItemTenantId == null) || (cloudRegionItemCloudRegionId == null)) {
+ //
+ System.err.println("some fields are missing from AAI response.");
+ //
+ // Fail and retract everything
+ //
+ retract($aainqf199RequestWrapper);
+ retract($aainqf199ResponseWrapper);
+ retract($manager);
+ retract($event);
+ return;
+ }
+ //
+ // We don't need them any more
+ //
+ retract($aainqf199ResponseWrapper);
+ retract($aainqf199RequestWrapper);
+ //
+ // check the actor of this closed loop
+ //
+ switch ($params.getActor()) {
+ case "APPC":
+ {
+ //
+ // Construct an APPC request
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "ModifyConfig";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // insert operationWrapper into memory
+ //
+ insert(operationWrapper);
+ //
+ Request request = new Request();
+ request.CommonHeader = new CommonHeader();
+ request.CommonHeader.RequestID = $event.requestID;
+ request.Action = operation.operation;
+ request.Payload = new HashMap<String, Object>();
+ //
+ // Fill in the payload
+ // Hardcode genericVNF for now since AAI has not been ready for vFirewall demo case
+ //
+ String genericVNF = "zdfw1fwl01pgn02";
+ request.Payload.put("generic-vnf.vnf-id", genericVNF);
+ //
+ PGRequest pgRequest = new PGRequest();
+ pgRequest.pgStreams = new PGStreams();
+
+ PGStream pgStream;
+ for(int i = 0; i < 5; i++){
+ pgStream = new PGStream();
+ pgStream.streamId = "fw_udp"+(i+1);
+ pgStream.isEnabled = "true";
+ pgRequest.pgStreams.pgStream.add(pgStream);
+ }
+ request.Payload.put("pg-streams", pgRequest.pgStreams);
+
+ if (request != null) {
+ //
+ // Insert request into memory
+ //
+ insert(request);
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ // message and history ??
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Now send the operation request
+ //
+ if (request instanceof Request) {
+ try {
+ System.out.println("APPC request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ PolicyEngine.manager.deliver($params.getAppcTopic(), request);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver request: " + request);
+ }
+ }
+ } else {
+ //
+ // what happens if it is null
+ //
+ }
+ }
+ break;
+ case "MSO":
+ {
+ //
+ // Construct an operation
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "createModuleInstance";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // Construct an MSO request
+ //
+ MSORequest request = new MSORequest();
+ request.requestDetails = new MSORequestDetails();
+ request.requestDetails.modelInfo = new MSOModelInfo();
+ request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();
+ request.requestDetails.requestInfo = new MSORequestInfo();
+ request.requestDetails.requestParameters = new MSORequestParameters();
+ request.requestDetails.requestParameters.userParams = null;
+ //
+ // cloudConfiguration
+ //
+ request.requestDetails.cloudConfiguration.lcpCloudRegionId = cloudRegionItemCloudRegionId;
+ request.requestDetails.cloudConfiguration.tenantId = tenantItemTenantId;
+ //
+ // modelInfo
+ //
+ request.requestDetails.modelInfo.modelType = "vfModule";
+ request.requestDetails.modelInfo.modelInvariantId = vfModuleItemPersonaModelId;
+ request.requestDetails.modelInfo.modelNameVersionId = vfModuleItemModelNameVersionId;
+ request.requestDetails.modelInfo.modelName = vfModuleItemModelName;
+ request.requestDetails.modelInfo.modelVersion = vfModuleItemPersonaModelVersion;
+ //
+ // requestInfo
+ //
+ request.requestDetails.requestInfo.instanceName = vfModuleItemVfModuleName;
+ request.requestDetails.requestInfo.source = "POLICY";
+ request.requestDetails.requestInfo.suppressRollback = false;
+ //
+ // relatedInstanceList
+ //
+ MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();
+ MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();
+ relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();
+ relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();
+ //
+ relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;
+ relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service";
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelName = serviceItemModelName;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;
+ //
+ relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;
+ relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelType = "vnf";
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelName = vnfItemModelName;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = vnfItemModelVersion;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = vnfItemVnfType;
+ //
+ request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);
+ request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
+ //
+ // print MSO request for debug
+ //
+ System.out.println("MSO request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ //
+ //
+ //
+ if (request != null) {
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL
+ //
+ String MSOUrl = $params.getMsoURL() + "/serviceInstances/v2/" + serviceItemServiceInstanceId + "/vnfs/" + vnfItemVnfId + "/vfModules";
+ //
+ // Call MSO
+ //
+ MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);
+ //
+ if (response != null) {
+ //
+ // Assign requestId
+ //
+ request.requestId = $event.requestID.toString();
+ response.request.requestId = $event.requestID.toString();
+ //
+ // Insert facts
+ //
+ insert(operationWrapper);
+ insert(request);
+ insert(response);
+ } else {
+ //
+ // MSO request not even accepted
+ //
+ notification.message = operationWrapper.operation.toMessage();
+ operationWrapper.operation.message = operationWrapper.operation.toMessage();
+ operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ notification.history.add(operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Retract everything
+ //
+ retract($event);
+ retract($manager);
+ }
+ } else {
+ System.err.println("constructed MSO request is invalid.");
+ }
+ }
+ break;
+ }
+end
+
+/*
+*
+* This rule responds to APPC Response Events
+*
+*/
+rule "BRMSParamvFWDemoPolicy.APPC.RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
+ $request : Request( getCommonHeader().RequestID == $event.requestID )
+ $response : Response( getCommonHeader().RequestID == $event.requestID )
+ then
+ System.out.println("rule APPC.RESPONSE is triggered.");
+ if ($response.Status == null) {
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ }
+ //
+ // Get the Response Code
+ //
+ ResponseCode code = ResponseCode.toResponseCode($response.Status.Code);
+ if (code == null) {
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ }
+ //
+ // Construct notification
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ notification.message = $operationWrapper.operation.toMessage();
+ $operationWrapper.operation.message = $operationWrapper.operation.toMessage();
+ //
+ // Ok, let's figure out what APP-C's response is
+ //
+ switch (code) {
+ case ACCEPT:
+ $operationWrapper.operation.outcome = "PROCESSING";
+ break;
+ case ERROR:
+ case REJECT:
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ break;
+ case SUCCESS:
+ $operationWrapper.operation.outcome = "SUCCESS";
+ $manager.setControlLoopResult("SUCCESS");
+ break;
+ case FAILURE:
+ $operationWrapper.operation.outcome = "FAILURE";
+ $manager.setControlLoopResult("FAILURE");
+ break;
+ }
+ if ($operationWrapper.operation.outcome.equals("SUCCESS")) {
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ } else if ($operationWrapper.operation.outcome.equals("PROCESSING")) {
+ retract($response);
+ } else {
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ }
+
+end
+
+/*
+*
+* This rule is used to clean up APPC response
+*
+*/
+rule "BRMSParamvFWDemoPolicy.APPC.RESPONSE.CLEANUP"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $response : Response($id : getCommonHeader().RequestID )
+ not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) )
+ then
+ System.out.println("rule APPC.RESPONSE.CLEANUP is triggered.");
+ retract($response);
+end
+
+/*
+*
+* This rule responds to MSO Response Events
+*
+*/
+rule "BRMSParamvFWDemoPolicy.MSO.RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
+ $request : MSORequest( requestId == $event.requestID.toString() )
+ $response : MSOResponse( request.requestId == $event.requestID.toString() )
+ then
+ System.out.println("rule MSO.RESPONSE is triggered.");
+ //
+ // Construct notification
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ notification.message = $operationWrapper.operation.toMessage();
+ $operationWrapper.operation.message = $operationWrapper.operation.toMessage();
+ //
+ // The operation can either be succeeded or failed
+ //
+ if($response.request.requestStatus.requestState.equals("Completed")) {
+ $operationWrapper.operation.outcome = "SUCCESS";
+ $manager.setControlLoopResult("SUCCESS");
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ } else {
+ $operationWrapper.operation.outcome = "FAILURE";
+ $manager.setControlLoopResult("FAILURE");
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ }
+
+end
+rule "Params"
+ salience 1000
+ when
+ then
+ Params params = new Params();
+ params.setAaiPatternMatch(1);
+ params.setAppcTopic("APPC-CL");
+ params.setAaiURL("null");
+ params.setMsoPassword("null");
+ params.setClosedLoopControlName("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
+ params.setAaiUsername("null");
+ params.setMsoURL("null");
+ params.setActor("APPC");
+ params.setMsoUsername("null");
+ params.setAaiNamedQueryUUID("null");
+ params.setAaiPassword("null");
+ params.setNotificationTopic("POLICY-CL-MGT");
+ insert(params);
+end
diff --git a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt
new file mode 100644
index 000000000..2fdfa6736
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_BRMS_Param_BRMSParamvLBDemoPolicy.1.txt
@@ -0,0 +1,1116 @@
+/* Autogenerated Code Please Don't change/remove this comment section. This is for the UI purpose.
+ <$%BRMSParamTemplate=ControlLoopDemo__closedLoopControlName%$>
+ */
+
+
+/*-
+ * ============LICENSE_START=======================================================
+ * archetype-closed-loop-demo-rules
+ * ================================================================================
+ * Copyright (C) 2017 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.policy.controlloop;
+
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.openecomp.policy.controlloop.VirtualControlLoopEvent;
+import org.openecomp.policy.controlloop.ControlLoopEventStatus;
+import org.openecomp.policy.controlloop.VirtualControlLoopNotification;
+import org.openecomp.policy.controlloop.ControlLoopNotificationType;
+import org.openecomp.policy.controlloop.ControlLoopOperation;
+import org.openecomp.policy.controlloop.ControlLoopOperationWrapper;
+import org.openecomp.policy.template.demo.ControlLoopException;
+
+import org.openecomp.policy.aai.AAINQF199.AAINQF199CloudRegion;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperties;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ExtraProperty;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199GenericVNF;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InstanceFilters;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItem;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199InventoryResponseItems;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Manager;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199NamedQuery;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199QueryParameters;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Request;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199RequestWrapper;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Response;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ResponseWrapper;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199ServiceInstance;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199Tenant;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199VfModule;
+import org.openecomp.policy.aai.AAINQF199.AAINQF199VServer;
+import org.openecomp.policy.aai.util.Serialization;
+
+import org.openecomp.policy.appc.CommonHeader;
+import org.openecomp.policy.appc.Request;
+import org.openecomp.policy.appc.Response;
+import org.openecomp.policy.appc.ResponseCode;
+import org.openecomp.policy.appc.ResponseStatus;
+import org.openecomp.policy.appc.ResponseValue;
+
+import org.openecomp.policy.template.demo.EventManager;
+import org.openecomp.policy.vnf.trafficgenerator.PGRequest;
+import org.openecomp.policy.vnf.trafficgenerator.PGStream;
+import org.openecomp.policy.vnf.trafficgenerator.PGStreams;
+
+import org.openecomp.policy.mso.MSOManager;
+import org.openecomp.policy.mso.MSORequest;
+import org.openecomp.policy.mso.MSORequestStatus;
+import org.openecomp.policy.mso.MSORequestDetails;
+import org.openecomp.policy.mso.MSOModelInfo;
+import org.openecomp.policy.mso.MSOCloudConfiguration;
+import org.openecomp.policy.mso.MSORequestInfo;
+import org.openecomp.policy.mso.MSORequestParameters;
+import org.openecomp.policy.mso.MSORelatedInstanceListElement;
+import org.openecomp.policy.mso.MSORelatedInstance;
+import org.openecomp.policy.mso.MSOResponse;
+
+import org.openecomp.policy.drools.system.PolicyEngine;
+
+//
+// These parameters are required to build the runtime policy
+//
+declare Params
+ closedLoopControlName : String
+ actor : String
+ aaiURL : String
+ aaiUsername : String
+ aaiPassword : String
+ msoURL : String
+ msoUsername : String
+ msoPassword : String
+ aaiNamedQueryUUID : String
+ aaiPatternMatch : int
+ notificationTopic : String
+ appcTopic : String
+end
+
+/*
+*
+* Called once and only once to insert the parameters into working memory for this Closed Loop policy.
+* (Comment SETUP rule out for the first ECOMP opensource release since policy BRMS_GW already puts a Params fact in there)
+*
+*
+*rule "BRMSParamvLBDemoPolicy.SETUP"
+* when
+* then
+* System.out.println("rule SETUP is triggered.");
+* Params params = new Params();
+* params.setClosedLoopControlName("CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
+* params.setActor("MSO");
+* params.setAaiURL("https://aai.api.simpledemo.openecomp.org:8443");
+* params.setAaiUsername("POLICY");
+* params.setAaiPassword("POLICY");
+* params.setMsoURL("http://vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra");
+* params.setMsoUsername("InfraPortalClient");
+* params.setMsoPassword("password1$");
+* params.setAaiNamedQueryUUID("f199cb88-5e69-4b1f-93e0-6f257877d066");
+* params.setAaiPatternMatch(0);
+* params.setNotificationTopic("POLICY-CL-MGT");
+* params.setAppcTopic("APPC-CL");
+* //
+* // This stays in memory as long as the rule is alive and running
+* //
+* insert(params);
+*end
+*/
+/*
+*
+* This rule responds to DCAE Events
+*
+*/
+rule "BRMSParamvLBDemoPolicy.EVENT"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ not ( EventManager( closedLoopControlName == $event.closedLoopControlName ))
+ then
+ System.out.println("rule EVENT is triggered.");
+ try {
+ //
+ // Check the requestID in the event to make sure it is not null before we create the EventManager.
+ // The EventManager will do extra syntax checking as well check if the closed loop is disabled/
+ //
+ if ($event.requestID == null) {
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.from = "policy";
+ notification.message = "Missing requestID from DCAE event";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ //
+ // Retract it from memory
+ //
+ retract($event);
+ System.out.println("Event with requestID=null has been retracted.");
+ } else {
+ //
+ // Create an EventManager
+ //
+ EventManager manager = new EventManager($params.getClosedLoopControlName(), $event.requestID, $event.target);
+ //
+ // Determine if EventManager can actively process the event (i.e. syntax)
+ //
+ VirtualControlLoopNotification notification = manager.activate($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ // Are we actively pursuing this event?
+ //
+ if (notification.notification == ControlLoopNotificationType.ACTIVE) {
+ //
+ // Insert Event Manager into memory, this will now kick off processing.
+ //
+ insert(manager);
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ } else {
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver notification: " + notification);
+ }
+ //
+ // Retract it from memory
+ //
+ retract($event);
+ }
+ //
+ // Now that the manager is inserted into Drools working memory, we'll wait for
+ // another rule to fire in order to continue processing. This way we can also
+ // then screen for additional ONSET and ABATED events for this same RequestIDs
+ // and for different RequestIDs but with the same closedLoopControlName and target.
+ //
+ }
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.message = "Exception occurred " + e.getMessage();
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ //
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ // Retract the event
+ //
+ retract($event);
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid ONSET, closed loop is enabled and an Event Manager
+* is created. We can start the operations for this closed loop.
+*
+*/
+rule "BRMSParamvLBDemoPolicy.EVENT.MANAGER"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)
+ then
+ System.out.println("rule EVENT.MANAGER is triggered.");
+ //
+ // Check which event this is.
+ //
+ EventManager.NEW_EVENT_STATUS eventStatus = $manager.onNewEvent($event);
+ //
+ // We only want the initial ONSET event in memory,
+ // all the other events need to be retracted to support
+ // cleanup and avoid the other rules being fired for this event.
+ //
+ if (eventStatus != EventManager.NEW_EVENT_STATUS.FIRST_ONSET) {
+ System.out.println("Retracting "+eventStatus+" Event.");
+ retract($event);
+ return;
+ }
+ //
+ // Now the event in memory is first onset event
+ //
+ try {
+ //
+ // Pull the known AAI field from the Event
+ //
+ // generic-vnf is needed for vFirewall case
+ // vserver-name is needed for vLoadBalancer case
+ //
+ String genericVNF = $event.AAI.get("generic-vnf.vnf-id");
+ String vserver = $event.AAI.get("vserver.vserver-name");
+ //
+ // Check if we are implementing a simple pattern match.
+ //
+ if ($params.getAaiPatternMatch() == 1) {
+ //
+ // Yes
+ //
+ //Basic naming characteristics:
+ //VF Name (9 char)+VM name (13 char total)+VFC (19 char total)
+ //Example:
+ //VF Name (9 characters): cscf0001v
+ //VM Name(13 characters): cscf0001vm001
+ //VFC name(19 characters): cscf0001vm001cfg001
+ //
+ // zdfw1fwl01fwl02 or zdfw1fwl01fwl01
+ // replaced with
+ // zdfw1fwl01pgn02 or zdfw1fwl01pgn01
+ //
+ int index = genericVNF.lastIndexOf("fwl");
+ if (index == -1) {
+ System.err.println("The generic-vnf.vnf-id from DCAE Event is not valid.");
+ } else {
+ genericVNF = genericVNF.substring(0, index) + "pgn" + genericVNF.substring(index+"fwl".length());
+ }
+ //
+ // Construct an APPC request
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "ModifyConfig";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // insert operationWrapper into memory
+ //
+ insert(operationWrapper);
+ //
+ Request request = new Request();
+ request.CommonHeader = new CommonHeader();
+ request.CommonHeader.RequestID = $event.requestID;
+ request.Action = operation.operation;
+ request.Payload = new HashMap<String, Object>();
+ //
+ // Fill in the payload
+ //
+ request.Payload.put("generic-vnf.vnf-id", genericVNF);
+ //
+ PGRequest pgRequest = new PGRequest();
+ pgRequest.pgStreams = new PGStreams();
+
+ PGStream pgStream;
+ for(int i = 0; i < 5; i++){
+ pgStream = new PGStream();
+ pgStream.streamId = "fw_udp"+(i+1);
+ pgStream.isEnabled = "true";
+ pgRequest.pgStreams.pgStream.add(pgStream);
+ }
+ request.Payload.put("pg-streams", pgRequest.pgStreams);
+
+ if (request != null) {
+ //
+ // Insert request into memory
+ //
+ insert(request);
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ // message and history ??
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Now send the operation request
+ //
+ if (request instanceof Request) {
+ try {
+ System.out.println("APPC request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ PolicyEngine.manager.deliver($params.getAppcTopic(), request);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver request: " + request);
+ }
+ }
+ } else {
+ //
+ // what happens if it is null
+ //
+ }
+ //
+ } else {
+ //
+ // create AAI named-query request with UUID started with "F199"
+ //
+ AAINQF199Request aainqf199request = new AAINQF199Request();
+ AAINQF199QueryParameters aainqf199queryparam = new AAINQF199QueryParameters();
+ AAINQF199NamedQuery aainqf199namedquery = new AAINQF199NamedQuery();
+ AAINQF199InstanceFilters aainqf199instancefilter = new AAINQF199InstanceFilters();
+ //
+ // queryParameters
+ //
+ aainqf199namedquery.namedQueryUUID = UUID.fromString($params.getAaiNamedQueryUUID());
+ aainqf199queryparam.namedQuery = aainqf199namedquery;
+ aainqf199request.queryParameters = aainqf199queryparam;
+ //
+ // instanceFilters
+ //
+ Map aainqf199instancefiltermap = new HashMap();
+ Map aainqf199instancefiltermapitem = new HashMap();
+ aainqf199instancefiltermapitem.put("vserver-name", vserver);
+ aainqf199instancefiltermap.put("vserver", aainqf199instancefiltermapitem);
+ aainqf199instancefilter.instanceFilter.add(aainqf199instancefiltermap);
+ aainqf199request.instanceFilters = aainqf199instancefilter;
+ //
+ // print aainqf199request for debug
+ //
+ System.out.println("AAI Request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(aainqf199request));
+ //
+ // Create AAINQF199RequestWrapper
+ //
+ AAINQF199RequestWrapper aainqf199RequestWrapper = new AAINQF199RequestWrapper($event.requestID, aainqf199request);
+ //
+ // insert aainqf199request into memory
+ //
+ insert(aainqf199RequestWrapper);
+ }
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid ONSET, closed loop is enabled, an Event Manager
+* is created, AAI Manager and AAI Request are ready in memory. We can start sending query to AAI and then wait for response.
+*
+*/
+rule "BRMSParamvLBDemoPolicy.EVENT.MANAGER.AAINQF199REQUEST"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
+ then
+ System.out.println("rule EVENT.MANAGER.AAINQF199REQUEST is triggered.");
+ //
+ // send the request
+ //
+ AAINQF199Response aainqf199response = AAINQF199Manager.postQuery($params.getAaiURL(), $params.getAaiUsername(), $params.getAaiPassword(),
+ $aainqf199RequestWrapper.aainqf199request, $event.requestID);
+ //
+ // Check AAI response
+ //
+ if (aainqf199response == null) {
+ System.err.println("Failed to get AAI response");
+ //
+ // Fail and retract everything
+ //
+ retract($event);
+ retract($manager);
+ retract($aainqf199RequestWrapper);
+ } else {
+ //
+ // Create AAINQF199ResponseWrapper
+ //
+ AAINQF199ResponseWrapper aainqf199ResponseWrapper = new AAINQF199ResponseWrapper($event.requestID, aainqf199response);
+ //
+ // insert aainqf199ResponseWrapper to memeory
+ //
+ insert(aainqf199ResponseWrapper);
+ }
+end
+
+/*
+*
+* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.
+*
+*/
+rule "BRMSParamvLBDemoPolicy.EVENT.MANAGER.AAINQF199RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
+ $aainqf199ResponseWrapper : AAINQF199ResponseWrapper(requestID == $event.requestID)
+ then
+ System.out.println("rule EVENT.MANAGER.AAINQF199RESPONSE is triggered.");
+ //
+ // Extract related fields out of AAINQF199RESPONSE
+ //
+ String vnfItemVnfId, vnfItemVnfType, vnfItemPersonaModelId, vnfItemPersonaModelVersion, vnfItemModelName,
+ vnfItemModelVersion, vnfItemModelNameVersionId, serviceItemServiceInstanceId, serviceItemPersonaModelId,
+ serviceItemModelName, serviceItemModelType, serviceItemModelVersion, serviceItemModelNameVersionId,
+ vfModuleItemVfModuleName, vfModuleItemPersonaModelId, vfModuleItemPersonaModelVersion, vfModuleItemModelName,
+ vfModuleItemModelNameVersionId, tenantItemTenantId, cloudRegionItemCloudRegionId;
+ try {
+ //
+ // vnfItem
+ //
+ vnfItemVnfId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfID;
+ vnfItemVnfType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.vnfType;
+ vnfItemVnfType = vnfItemVnfType.substring(vnfItemVnfType.lastIndexOf("/")+1);
+ vnfItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelId;
+ vnfItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).genericVNF.personaModelVersion;
+ vnfItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;
+ vnfItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(2).propertyValue;
+ vnfItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // serviceItem
+ //
+ serviceItemServiceInstanceId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.serviceInstanceID;
+ serviceItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelId;
+ serviceItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(0).propertyValue;
+ serviceItemModelType = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(1).propertyValue;
+ serviceItemModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).serviceInstance.personaModelVersion;
+ serviceItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // This comes from the base module
+ //
+ vfModuleItemVfModuleName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).vfModule.vfModuleName;
+ vfModuleItemVfModuleName = vfModuleItemVfModuleName.replace("Vfmodule", "vDNS");
+ //
+ // vfModuleItem - NOT the base module
+ //
+ vfModuleItemPersonaModelId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelId;
+ vfModuleItemPersonaModelVersion = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).vfModule.personaModelVersion;
+ vfModuleItemModelName = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(0).propertyValue;
+ vfModuleItemModelNameVersionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(0).items.inventoryResponseItems.get(2).extraProperties.extraProperty.get(4).propertyValue;
+ //
+ // tenantItem
+ //
+ tenantItemTenantId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).tenant.tenantId;
+ //
+ // cloudRegionItem
+ //
+ cloudRegionItemCloudRegionId = $aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;
+ //
+ } catch (Exception e) {
+ e.printStackTrace();
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.REJECTED;
+ notification.message = "Exception occurred " + e.getMessage();
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ notification.message = "Invalid named-query response from AAI";
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e1) {
+ System.out.println("Can't deliver notification: " + notification);
+ e1.printStackTrace();
+ }
+ //
+ // Retract everything
+ //
+ retract($aainqf199RequestWrapper);
+ retract($aainqf199ResponseWrapper);
+ retract($manager);
+ retract($event);
+ return;
+ }
+ //
+ // Extracted fields should not be null
+ //
+ if ((vnfItemVnfId == null) || (vnfItemVnfType == null) ||
+ (vnfItemPersonaModelId == null) || (vnfItemModelName == null) ||
+ (vnfItemModelVersion == null) || (vnfItemModelNameVersionId == null) ||
+ (serviceItemServiceInstanceId == null) || (serviceItemModelName == null) ||
+ (serviceItemModelType == null) || (serviceItemModelVersion == null) ||
+ (serviceItemModelNameVersionId == null) || (vfModuleItemVfModuleName == null) ||
+ (vfModuleItemPersonaModelId == null) || (vfModuleItemPersonaModelVersion == null) ||
+ (vfModuleItemModelName == null) || (vfModuleItemModelNameVersionId == null) ||
+ (tenantItemTenantId == null) || (cloudRegionItemCloudRegionId == null)) {
+ //
+ System.err.println("some fields are missing from AAI response.");
+ //
+ // Fail and retract everything
+ //
+ retract($aainqf199RequestWrapper);
+ retract($aainqf199ResponseWrapper);
+ retract($manager);
+ retract($event);
+ return;
+ }
+ //
+ // We don't need them any more
+ //
+ retract($aainqf199ResponseWrapper);
+ retract($aainqf199RequestWrapper);
+ //
+ // check the actor of this closed loop
+ //
+ switch ($params.getActor()) {
+ case "APPC":
+ {
+ //
+ // Construct an APPC request
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "ModifyConfig";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // insert operationWrapper into memory
+ //
+ insert(operationWrapper);
+ //
+ Request request = new Request();
+ request.CommonHeader = new CommonHeader();
+ request.CommonHeader.RequestID = $event.requestID;
+ request.Action = operation.operation;
+ request.Payload = new HashMap<String, Object>();
+ //
+ // Fill in the payload
+ // Hardcode genericVNF for now since AAI has not been ready for vFirewall demo case
+ //
+ String genericVNF = "zdfw1fwl01pgn02";
+ request.Payload.put("generic-vnf.vnf-id", genericVNF);
+ //
+ PGRequest pgRequest = new PGRequest();
+ pgRequest.pgStreams = new PGStreams();
+
+ PGStream pgStream;
+ for(int i = 0; i < 5; i++){
+ pgStream = new PGStream();
+ pgStream.streamId = "fw_udp"+(i+1);
+ pgStream.isEnabled = "true";
+ pgRequest.pgStreams.pgStream.add(pgStream);
+ }
+ request.Payload.put("pg-streams", pgRequest.pgStreams);
+
+ if (request != null) {
+ //
+ // Insert request into memory
+ //
+ insert(request);
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ // message and history ??
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Now send the operation request
+ //
+ if (request instanceof Request) {
+ try {
+ System.out.println("APPC request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ PolicyEngine.manager.deliver($params.getAppcTopic(), request);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println("Can't deliver request: " + request);
+ }
+ }
+ } else {
+ //
+ // what happens if it is null
+ //
+ }
+ }
+ break;
+ case "MSO":
+ {
+ //
+ // Construct an operation
+ //
+ ControlLoopOperation operation = new ControlLoopOperation();
+ operation.actor = $params.getActor();
+ operation.operation = "createModuleInstance";
+ operation.target = $event.target;
+ //
+ // Create operationWrapper
+ //
+ ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
+ //
+ // Construct an MSO request
+ //
+ MSORequest request = new MSORequest();
+ request.requestDetails = new MSORequestDetails();
+ request.requestDetails.modelInfo = new MSOModelInfo();
+ request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();
+ request.requestDetails.requestInfo = new MSORequestInfo();
+ request.requestDetails.requestParameters = new MSORequestParameters();
+ request.requestDetails.requestParameters.userParams = null;
+ //
+ // cloudConfiguration
+ //
+ request.requestDetails.cloudConfiguration.lcpCloudRegionId = cloudRegionItemCloudRegionId;
+ request.requestDetails.cloudConfiguration.tenantId = tenantItemTenantId;
+ //
+ // modelInfo
+ //
+ request.requestDetails.modelInfo.modelType = "vfModule";
+ request.requestDetails.modelInfo.modelInvariantId = vfModuleItemPersonaModelId;
+ request.requestDetails.modelInfo.modelNameVersionId = vfModuleItemModelNameVersionId;
+ request.requestDetails.modelInfo.modelName = vfModuleItemModelName;
+ request.requestDetails.modelInfo.modelVersion = vfModuleItemPersonaModelVersion;
+ //
+ // requestInfo
+ //
+ request.requestDetails.requestInfo.instanceName = vfModuleItemVfModuleName;
+ request.requestDetails.requestInfo.source = "POLICY";
+ request.requestDetails.requestInfo.suppressRollback = false;
+ //
+ // relatedInstanceList
+ //
+ MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();
+ MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();
+ relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();
+ relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();
+ //
+ relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;
+ relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service";
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelName = serviceItemModelName;
+ relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;
+ //
+ relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;
+ relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelType = "vnf";
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelName = vnfItemModelName;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = vnfItemModelVersion;
+ relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = vnfItemVnfType;
+ //
+ request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);
+ request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
+ //
+ // print MSO request for debug
+ //
+ System.out.println("MSO request sent:");
+ System.out.println(Serialization.gsonPretty.toJson(request));
+ //
+ //
+ //
+ if (request != null) {
+ //
+ // Tell interested parties we are performing this Operation
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.notification = ControlLoopNotificationType.OPERATION;
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL
+ //
+ String MSOUrl = $params.getMsoURL() + "/serviceInstances/v2/" + serviceItemServiceInstanceId + "/vnfs/" + vnfItemVnfId + "/vfModules";
+ //
+ // Call MSO
+ //
+ MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);
+ //
+ if (response != null) {
+ //
+ // Assign requestId
+ //
+ request.requestId = $event.requestID.toString();
+ response.request.requestId = $event.requestID.toString();
+ //
+ // Insert facts
+ //
+ insert(operationWrapper);
+ insert(request);
+ insert(response);
+ } else {
+ //
+ // MSO request not even accepted
+ //
+ notification.message = operationWrapper.operation.toMessage();
+ operationWrapper.operation.message = operationWrapper.operation.toMessage();
+ operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ notification.history.add(operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // Retract everything
+ //
+ retract($event);
+ retract($manager);
+ }
+ } else {
+ System.err.println("constructed MSO request is invalid.");
+ }
+ }
+ break;
+ }
+end
+
+/*
+*
+* This rule responds to APPC Response Events
+*
+*/
+rule "BRMSParamvLBDemoPolicy.APPC.RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
+ $request : Request( getCommonHeader().RequestID == $event.requestID )
+ $response : Response( getCommonHeader().RequestID == $event.requestID )
+ then
+ System.out.println("rule APPC.RESPONSE is triggered.");
+ if ($response.Status == null) {
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ }
+ //
+ // Get the Response Code
+ //
+ ResponseCode code = ResponseCode.toResponseCode($response.Status.Code);
+ if (code == null) {
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ }
+ //
+ // Construct notification
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ notification.message = $operationWrapper.operation.toMessage();
+ $operationWrapper.operation.message = $operationWrapper.operation.toMessage();
+ //
+ // Ok, let's figure out what APP-C's response is
+ //
+ switch (code) {
+ case ACCEPT:
+ $operationWrapper.operation.outcome = "PROCESSING";
+ break;
+ case ERROR:
+ case REJECT:
+ $operationWrapper.operation.outcome = "FAILURE_EXCEPTION";
+ $manager.setControlLoopResult("FAILURE_EXCEPTION");
+ break;
+ case SUCCESS:
+ $operationWrapper.operation.outcome = "SUCCESS";
+ $manager.setControlLoopResult("SUCCESS");
+ break;
+ case FAILURE:
+ $operationWrapper.operation.outcome = "FAILURE";
+ $manager.setControlLoopResult("FAILURE");
+ break;
+ }
+ if ($operationWrapper.operation.outcome.equals("SUCCESS")) {
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ } else if ($operationWrapper.operation.outcome.equals("PROCESSING")) {
+ retract($response);
+ } else {
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ }
+
+end
+
+/*
+*
+* This rule is used to clean up APPC response
+*
+*/
+rule "BRMSParamvLBDemoPolicy.APPC.RESPONSE.CLEANUP"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $response : Response($id : getCommonHeader().RequestID )
+ not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) )
+ then
+ System.out.println("rule APPC.RESPONSE.CLEANUP is triggered.");
+ retract($response);
+end
+
+/*
+*
+* This rule responds to MSO Response Events
+*
+*/
+rule "BRMSParamvLBDemoPolicy.MSO.RESPONSE"
+ when
+ $params : Params( getClosedLoopControlName() == "CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8" )
+ $event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
+ $manager : EventManager( closedLoopControlName == $event.closedLoopControlName )
+ $operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
+ $request : MSORequest( requestId == $event.requestID.toString() )
+ $response : MSOResponse( request.requestId == $event.requestID.toString() )
+ then
+ System.out.println("rule MSO.RESPONSE is triggered.");
+ //
+ // Construct notification
+ //
+ VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
+ notification.from = "policy";
+ notification.policyName = drools.getRule().getName();
+ notification.policyScope = "com";
+ notification.policyVersion = "1";
+ notification.message = $operationWrapper.operation.toMessage();
+ $operationWrapper.operation.message = $operationWrapper.operation.toMessage();
+ //
+ // The operation can either be succeeded or failed
+ //
+ if($response.request.requestStatus.requestState.equals("Completed")) {
+ $operationWrapper.operation.outcome = "SUCCESS";
+ $manager.setControlLoopResult("SUCCESS");
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_SUCCESS;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ } else {
+ $operationWrapper.operation.outcome = "FAILURE";
+ $manager.setControlLoopResult("FAILURE");
+ notification.history.add($operationWrapper.operation);
+ notification.notification = ControlLoopNotificationType.OPERATION_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ notification.notification = ControlLoopNotificationType.FINAL_FAILURE;
+ //
+ // Let interested parties know
+ //
+ try {
+ System.out.println(Serialization.gsonPretty.toJson(notification));
+ PolicyEngine.manager.deliver($params.getNotificationTopic(), notification);
+ } catch (Exception e) {
+ System.out.println("Can't deliver notification: " + notification);
+ e.printStackTrace();
+ }
+ //
+ // We are going to retract these objects from memory
+ //
+ System.out.println("Retracting everything");
+ retract($operationWrapper);
+ retract($request);
+ retract($response);
+ retract($event);
+ retract($manager);
+ }
+
+end
+rule "Params"
+ salience 1000
+ when
+ then
+ Params params = new Params();
+ params.setAaiPatternMatch(0);
+ params.setAppcTopic("APPC-CL");
+ params.setAaiURL("https://aai.api.simpledemo.openecomp.org:8443");
+ params.setMsoPassword("password1$");
+ params.setClosedLoopControlName("CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
+ params.setAaiUsername("POLICY");
+ params.setMsoURL("http://vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra");
+ params.setActor("MSO");
+ params.setMsoUsername("InfraPortalClient");
+ params.setAaiNamedQueryUUID("f199cb88-5e69-4b1f-93e0-6f257877d066");
+ params.setAaiPassword("POLICY");
+ params.setNotificationTopic("POLICY-CL-MGT");
+ insert(params);
+end
diff --git a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vFirewall.1.json b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vFirewall.1.json
new file mode 100644
index 000000000..800c87a93
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vFirewall.1.json
@@ -0,0 +1 @@
+{"service":"TcaMetrics","location":"SampleServiceLocation","uuid":"/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vFirewall","policyName":"vFirewall","description":"Micro Service vFirewall Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:","configName":"SampleConfigName","templateVersion":"OpenSource.version.1","version":"1.0.0.5","priority":"1","policyScope":"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop","content":{"thresholds":[{"severity":"MAJOR","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn","thresholdValue":"300","closedLoopControlName":"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8","version":"1.0.2","direction":"LESS_OR_EQUAL"},{"severity":"CRITICAL","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn","thresholdValue":"700","closedLoopControlName":"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8","version":"1.0.2","direction":"GREATER_OR_EQUAL"}],"functionalRole":"vFirewall","name":"0"}}
diff --git a/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vLoadBalancer.1.json b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vLoadBalancer.1.json
new file mode 100644
index 000000000..d03206fc1
--- /dev/null
+++ b/packages/base/src/files/install/servers/pap/webapps/Config/com.Config_MS_vLoadBalancer.1.json
@@ -0,0 +1 @@
+{"service":"TcaMetrics","location":"SampleServiceLocation","uuid":"/services/cdap-tca-hi-lo/instances/demo/configuration/metricsPerFunctionalRole/vLoadBalancer","policyName":"vLoadBalancer","description":"Micro Service vLoadBalancer Demo Policy@CreatedBy:demo@CreatedBy:@ModifiedBy:demo@ModifiedBy:","configName":"SampleConfigName","templateVersion":"OpenSource.version.1","version":"1.0.0.5","priority":"1","policyScope":"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop","content":{"thresholds":[{"severity":"MAJOR","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn","thresholdValue":"200","closedLoopControlName":"CL-DNS-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8","version":"1.0.2","direction":"GREATER_OR_EQUAL"}],"functionalRole":"vLoadBalancer","name":"0"}}
diff --git a/packages/base/src/files/install/servers/paplp/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/paplp/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/paplp/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/paplp/bin/parserlog.properties b/packages/base/src/files/install/servers/paplp/bin/parserlog.properties
new file mode 100644
index 000000000..8dbd70e9b
--- /dev/null
+++ b/packages/base/src/files/install/servers/paplp/bin/parserlog.properties
@@ -0,0 +1,57 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# PAP LogParser properties
+
+# JVM specific parameters
+LOGPARSER_JMX_PORT=${{LOGPARSER_JMX_PORT}}
+LOGPARSER_X_MS_MB=${{LOGPARSER_X_MS_MB}}
+LOGPARSER_X_MX_MB=${{LOGPARSER_X_MX_MB}}
+
+SERVER=${{SERVER}}
+LOGTYPE=PAP
+LOGPATH=${{LOGPATH}}
+JDBC_DRIVER=${{JDBC_DRIVER}}
+JDBC_URL='${{JDBC_LOG_URL}}'
+JDBC_USER=${{JDBC_USER}}
+JDBC_PASSWORD=${{JDBC_PASSWORD}}
+PARSERLOGPATH=IntegrityMonitor.log
+
+
+#Integrity Monitor values
+#database driver for Integrity Monitor
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+#database URL for Integrity Monitor
+javax.persistence.jdbc.url=${{JDBC_URL}}
+#database username for Integrity Monitor
+javax.persistence.jdbc.user=${{JDBC_USER}}
+#database password for Integrity Monitor
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+#resource name
+RESOURCE_NAME=${{resource_name}}
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
diff --git a/packages/base/src/files/install/servers/pdp/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/pdp/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/pdp/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties b/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties
new file mode 100644
index 000000000..860107ff9
--- /dev/null
+++ b/packages/base/src/files/install/servers/pdp/bin/xacml.pdp.properties
@@ -0,0 +1,125 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# Default XACML Properties File for PDP RESTful servlet
+#
+# Standard API Factories
+#
+xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory
+xacml.pdpEngineFactory=com.att.research.xacmlatt.pdp.ATTPDPEngineFactory
+xacml.pepEngineFactory=com.att.research.xacml.std.pep.StdEngineFactory
+# NOT USED SEE BELOW xacml.pipFinderFactory=com.att.research.xacml.std.pip.StdPIPFinderFactory
+xacml.traceEngineFactory=com.att.research.xacml.std.trace.LoggingTraceEngineFactory
+#
+# AT&T PDP Implementation Factories
+#
+xacml.att.evaluationContextFactory=com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory
+xacml.att.combiningAlgorithmFactory=com.att.research.xacmlatt.pdp.std.StdCombiningAlgorithmFactory
+xacml.att.functionDefinitionFactory=org.openecomp.policy.xacml.custom.EcompFunctionDefinitionFactory
+# NOT USED SEE BELOW xacml.att.policyFinderFactory=com.att.research.xacmlatt.pdp.std.StdPolicyFinderFactory
+
+#
+# AT&T RESTful PDP Implementation Factories
+#
+xacml.pipFinderFactory=org.openecomp.policy.pdp.rest.impl.XACMLPdpPIPFinderFactory
+xacml.att.policyFinderFactory=org.openecomp.policy.pdp.rest.XACMLPdpPolicyFinderFactory
+#
+# When set to true, this flag tells the StdPolicyFinderFactory to combined all the root policy files into
+# into one PolicySet and use the given Policy Algorithm.
+#
+xacml.att.policyFinderFactory.combineRootPolicies=urn:com:att:xacml:3.0:policy-combining-algorithm:combined-deny-overrides
+#
+# PDP RESTful API properties
+#
+# Set this to the address where the XACML-PAP-REST servlet is running
+# http://localhost:9090/pap/
+xacml.rest.pap.url=${{REST_PAP_URL}}
+#if multiple paps exist, the xacml.rest.pap.url can be removed and they can be defined like this:
+#xacml.rest.pap.urls=http://localhost:9090/pap/,http://localhost:9091/pap/
+#
+# Give the running PDP an ID for the PAP. The url that its running as is a good choice.
+# The PAP identifies PDP's using the URL of the PDP.
+#
+xacml.rest.pdp.id=${{REST_PDP_ID}}
+#
+# Give the JMX port number used for the PDP
+xacml.jmx.port=${{TOMCAT_JMX_PORT}}
+#
+# Notifcation type: websocket or ueb
+#
+xacml.notification.type=websocket,UEB
+xacml.ueb.cluster=${{UEB_CLUSTER}}
+#
+# Set the directory where the PDP holds its Policy Cache and PIP Configuration
+#
+xacml.rest.pdp.config=${{REST_PDP_CONFIG}}
+
+xacml.rest.pdp.webapps=${{REST_PDP_WEBAPPS}}
+#
+# Initialize register with PAP servlet
+#
+xacml.rest.pdp.register=${{REST_PDP_REGISTER}}
+#
+# Sleep period in seconds between register attempts
+#
+xacml.rest.pdp.register.sleep=${{REST_PDP_REGISTER_SLEEP}}
+#
+# number of attempts to register. -1 means keep trying forever.
+#
+xacml.rest.pdp.register.retries=${{REST_PDP_REGISTER_RETRIES}}
+#
+# max number of bytes in a POST of a XML/JSON request
+#
+xacml.rest.pdp.maxcontent=${{REST_PDP_MAXCONTENT}}
+#
+# Set UserID here
+xacml.rest.pdp.userid=${{PDP_HTTP_USER_ID}}
+# Set Password here
+xacml.rest.pdp.password=${{PDP_HTTP_PASSWORD}}
+# id PAP
+xacml.rest.pap.userid=${{PDP_PAP_PDP_HTTP_USER_ID}}
+# pass PAP
+xacml.rest.pap.password=${{PDP_PAP_PDP_HTTP_PASSWORD}}
+# Delay for Notifications Don't change this. Value in milliSec.
+xacml.rest.notification.delay=30
+# Request Buffer Size.
+REQUEST_BUFFER_SIZE=5
+#***Properties for IntegrityMonitor integration defined in XACMLRestProperties.java***
+#The name of the PDP. Must be unique across the system
+xacml.rest.pdp.resource.name=${{resource_name}}
+
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+dependency_groups=${{dependency_groups}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
+
+#database properties needed by IntegrityMonitor
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+javax.persistence.jdbc.url=${{JDBC_URL}}
+javax.persistence.jdbc.user=${{JDBC_USER}}
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+# Environment should be Set either DEV, TEST or PROD
+ENVIRONMENT=${{ENVIRONMENT}}
diff --git a/packages/base/src/files/install/servers/pdplp/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/pdplp/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/pdplp/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/install/servers/pdplp/bin/parserlog.properties b/packages/base/src/files/install/servers/pdplp/bin/parserlog.properties
new file mode 100755
index 000000000..42c3ade32
--- /dev/null
+++ b/packages/base/src/files/install/servers/pdplp/bin/parserlog.properties
@@ -0,0 +1,57 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+# PDP LogParser properties
+
+# JVM specific parameters
+LOGPARSER_JMX_PORT=${{LOGPARSER_JMX_PORT}}
+LOGPARSER_X_MS_MB=${{LOGPARSER_X_MS_MB}}
+LOGPARSER_X_MX_MB=${{LOGPARSER_X_MX_MB}}
+
+SERVER=${{SERVER}}
+LOGTYPE=PDP
+LOGPATH=${{LOGPATH}}
+JDBC_DRIVER=${{JDBC_DRIVER}}
+JDBC_URL='${{JDBC_LOG_URL}}'
+JDBC_USER=${{JDBC_USER}}
+JDBC_PASSWORD=${{JDBC_PASSWORD}}
+PARSERLOGPATH=IntegrityMonitor.log
+
+
+#Integrity Monitor values
+#database driver for Integrity Monitor
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+#database URL for Integrity Monitor
+javax.persistence.jdbc.url=${{JDBC_URL}}
+#database username for Integrity Monitor
+javax.persistence.jdbc.user=${{JDBC_USER}}
+#database password for Integrity Monitor
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+#resource name
+RESOURCE_NAME=${{resource_name}}
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
diff --git a/packages/base/src/files/install/servers/pypdp/bin/client.properties b/packages/base/src/files/install/servers/pypdp/bin/client.properties
new file mode 100644
index 000000000..0b8dc258e
--- /dev/null
+++ b/packages/base/src/files/install/servers/pypdp/bin/client.properties
@@ -0,0 +1,22 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+python=test,MASTER
+PyPDPServer=test,MASTER \ No newline at end of file
diff --git a/packages/base/src/files/install/servers/pypdp/bin/config.properties b/packages/base/src/files/install/servers/pypdp/bin/config.properties
new file mode 100644
index 000000000..93f7b5d41
--- /dev/null
+++ b/packages/base/src/files/install/servers/pypdp/bin/config.properties
@@ -0,0 +1,51 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+#pypdp properties
+
+PDP_URL=${{PDP_URL}}
+PAP_URL=${{PAP_URL}}
+PYPDP_ID=${{PYPDP_ID}}
+PYPDP_PASSWORD=${{PYPDP_PASSWORD}}
+
+#Integrity Monitor values
+#database driver for Integrity Monitor
+javax.persistence.jdbc.driver=${{JDBC_DRIVER}}
+#database URL for Integrity Monitor
+javax.persistence.jdbc.url=${{JDBC_URL}}
+#database username for Integrity Monitor
+javax.persistence.jdbc.user=${{JDBC_USER}}
+#database password for Integrity Monitor
+javax.persistence.jdbc.password=${{JDBC_PASSWORD}}
+#resource name
+RESOURCE_NAME=${{resource_name}}
+#***Properties for IntegrityMonitor integration defined in IntegrityMonitorProperties.java***
+site_name=${{site_name}}
+node_type=${{node_type}}
+fp_monitor_interval=${{fp_monitor_interval}}
+failed_counter_threshold=${{failed_counter_threshold}}
+test_trans_interval=${{test_trans_interval}}
+write_fpc_interval=${{write_fpc_interval}}
+max_fpc_update_interval=${{max_fpc_update_interval}}
+test_via_jmx=${{test_via_jmx}}
+# Environment should be Set either DEV, TEST or PROD
+ENVIRONMENT=${{ENVIRONMENT}}
+
+CLIENT_FILE=${{CLIENT_FILE}}
diff --git a/packages/base/src/files/install/servers/pypdp/bin/config/policyLogger.properties b/packages/base/src/files/install/servers/pypdp/bin/config/policyLogger.properties
new file mode 100644
index 000000000..0deb1b3d6
--- /dev/null
+++ b/packages/base/src/files/install/servers/pypdp/bin/config/policyLogger.properties
@@ -0,0 +1,44 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# Copyright (C) 2017 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.
+# ============LICENSE_END=========================================================
+###
+
+################################### Set concurrentHashMap and timer info #######################
+#Timer initial delay and the delay between in milliseconds before task is to be execute.
+timer.delay.time=1000
+#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions.
+check.interval= 30000
+#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds.
+event.expired.time=86400
+#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed
+#to remove all expired records from this concurrentHashMap.
+concurrentHashMap.limit=5000
+#Size of the concurrentHashMap - when its size drops to this point, stop the Timer
+stop.check.point=2500
+################################### Set logging format #############################################
+# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println
+logger.type=EELF
+#################################### Set level for EELF or SYSTEMOUT logging ##################################
+# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all
+debugLogger.level=INFO
+# Set level for metrics file. Set OFF to disable; set ON to enable
+metricsLogger.level=ON
+# Set level for error file. Set OFF to disable; set ON to enable
+error.level=ON
+# Set level for audit file. Set OFF to disable; set ON to enable
+audit.level=ON
diff --git a/packages/base/src/files/m2/settings.xml b/packages/base/src/files/m2/settings.xml
new file mode 100644
index 000000000..df187efe5
--- /dev/null
+++ b/packages/base/src/files/m2/settings.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+ <profile>
+ <id>policy-profile</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <repositories>
+ <repository>
+ <id>${{snapshotRepositoryID}}</id>
+ <url>${{snapshotRepositoryURL}}</url>
+ <releases>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>${{releaseRepositoryID}}</id>
+ <url>${{releaseRepositoryURL}}</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>policy-profile</activeProfile>
+ </activeProfiles>
+
+ <servers>
+ <server>
+ <id>${{snapshotRepositoryID}}</id>
+ <username>${{repositoryUsername}}</username>
+ <password>${{repositoryPassword}}</password>
+ </server>
+ <server>
+ <id>${{releaseRepositoryID}}</id>
+ <username>${{repositoryUsername}}</username>
+ <password>${{repositoryPassword}}</password>
+ </server>
+ </servers>
+
+</settings>
diff --git a/packages/install/pom.xml b/packages/install/pom.xml
new file mode 100644
index 000000000..b18a83bfe
--- /dev/null
+++ b/packages/install/pom.xml
@@ -0,0 +1,71 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>packages</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>install</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Installation Package</name>
+ <description>D2 ECOMP Policy Base Installation Package</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/zip.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>base</artifactId>
+ <version>${project.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/packages/install/src/assembly/zip.xml b/packages/install/src/assembly/zip.xml
new file mode 100644
index 000000000..f98510c79
--- /dev/null
+++ b/packages/install/src/assembly/zip.xml
@@ -0,0 +1,42 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<assembly>
+ <id>zipfile</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/files</directory>
+ <outputDirectory>.</outputDirectory>
+ <fileMode>755</fileMode>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>org.openecomp.policy.engine:base:*</include>
+ </includes>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/packages/install/src/files/base.conf b/packages/install/src/files/base.conf
new file mode 100644
index 000000000..92c6d9015
--- /dev/null
+++ b/packages/install/src/files/base.conf
@@ -0,0 +1,19 @@
+JAVA_HOME=/usr/lib/jvm/java-8-oracle
+POLICY_HOME=/opt/app/policy
+KEYSTORE_PASSWD=PolicyR0ck$
+
+JDBC_DRIVER=com.mysql.jdbc.Driver
+JDBC_URL=jdbc:mysql://localhost:3306/xacml
+JDBC_LOG_URL=jdbc:mysql://localhost:3306/log
+JDBC_USER=policy_user
+JDBC_PASSWORD=
+
+site_name=site_1
+fp_monitor_interval=30
+failed_counter_threshold=3
+test_trans_interval=20
+write_fpc_interval=5
+max_fpc_update_interval=60
+test_via_jmx=false
+
+ENVIRONMENT=TEST
diff --git a/packages/install/src/files/brmsgw.conf b/packages/install/src/files/brmsgw.conf
new file mode 100644
index 000000000..9f2252ca4
--- /dev/null
+++ b/packages/install/src/files/brmsgw.conf
@@ -0,0 +1,42 @@
+# BRMSpep component installation configuration parameters
+BRMSGW_JMX_PORT=9989
+
+COMPONENT_X_MX_MB=1024
+COMPONENT_X_MS_MB=1024
+
+REST_PAP_URL=https://${{FQDN}}:9091/pap/
+REST_PDP_ID=https://${{FQDN}}:8081/pdp/
+
+PDP_HTTP_USER_ID=testpdp
+PDP_HTTP_PASSWORD=alpha123
+PDP_PAP_PDP_HTTP_USER_ID=testpap
+PDP_PAP_PDP_HTTP_PASSWORD=alpha123
+
+M2_HOME=/usr/share/maven
+snapshotRepositoryID=snapshots
+snapshotRepositoryName=Snapshots
+snapshotRepositoryURL=http://nexus:8081/nexus/content/repositories/snapshots
+releaseRepositoryID=releases
+releaseRepositoryName=Releases
+releaseRepositoryURL=http://nexus:8081/nexus/content/repositories/releases
+repositoryUsername=test
+repositoryPassword=test
+UEB_URL=vm1.mr.simpledemo.openecomp.org
+UEB_TOPIC=CLOSEDLOOP-DCAE-SAMPLE
+UEB_API_KEY=
+UEB_API_SECRET=
+
+groupID=org.openecomp.policy-engine
+artifactID=drlPDPGroup
+VFW_GROUP_ID=org.openecomp.policy-engine.drools.vFW
+VFW_ARTIFACT_ID=policy-vFW-rules
+VDNS_GROUP_ID=org.openecomp.policy-engine.drools.vDNS
+VDNS_ARTIFACT_ID=policy-vDNS-rules
+
+# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
+resource_name=brmsgw_1
+node_type=brms_gateway
+
+CLIENT_ID=PyPDPServer
+CLIENT_KEY=test
+ENVIRONMENT=DEVL
diff --git a/packages/install/src/files/console.conf b/packages/install/src/files/console.conf
new file mode 100644
index 000000000..39435fe26
--- /dev/null
+++ b/packages/install/src/files/console.conf
@@ -0,0 +1,134 @@
+# configs component installation configuration parameters
+
+# tomcat specific parameters
+
+TOMCAT_JMX_PORT=9993
+TOMCAT_SHUTDOWN_PORT=8090
+SSL_HTTP_CONNECTOR_PORT=8443
+SSL_HTTP_CONNECTOR_REDIRECT_PORT=8443
+SSL_AJP_CONNECTOR_PORT=8383
+SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
+
+TOMCAT_X_MS_MB=2048
+TOMCAT_X_MX_MB=2048
+
+# ------------------ console properties ---------------------------
+
+#
+# Authorization Policy
+
+ROOT_POLICIES=admin
+ADMIN_FILE=Policy-Admin.xml
+
+
+# Set your domain here:
+
+REST_ADMIN_DOMAIN=com
+
+#
+# Location where the GIT repository is located
+#
+REST_ADMIN_REPOSITORY=repository
+
+#
+# Location where all the user workspaces are located.
+#
+REST_ADMIN_WORKSPACE=${{POLICY_HOME}}/servers/console/bin/workspace
+#
+# These can be set so the Admin Console knows who is logged on. Ideally, you can run the console in a J2EE
+# container and setup authentication as you please. Setting HttpSession attribute values will override these
+# values set in the properties files.
+#
+# ((HttpServletRequest) request).getSession().setAttribute("xacml.rest.admin.user.name", "Homer");
+#
+# The default policy: Policy-Admin.xml is extremely simple.
+#
+# You can test authorization within the Admin Console by changing the user id.
+# There are 3 supported user ids:
+# guest - Read only access
+# editor - Read/Write access
+# admin - Read/Write/Admin access
+#
+# An empty or null value for xacml.rest.admin.user.id results in no access to the application at all.
+#
+# This is for development/demonstration purposes only. A production environment should provide authentication which is
+# outside the scope of this application. This application can be used to develop a XACML policy for user authorization
+# within this application.
+#
+
+REST_ADMIN_USER_NAME=Administrator
+REST_ADMIN_USER_ID=super-admin
+
+#
+#
+# Property to declare the max time frame for logs.
+#
+LOG_TIMEFRAME=30
+
+# Property to declare the number of visible rows for users in MicroService Policy
+COLUMN_COUNT=3
+
+# Dashboard refresh rate in miliseconds
+REFRESH_RATE=40000
+
+#
+# URL location for the PAP servlet.
+#
+
+
+REST_PAP_URL=https://${{FQDN}}:9091/pap/
+
+#
+# Config/Action Properties location.
+#
+
+REST_CONFIG_HOME=${{POLICY_HOME}}/servers/pap/webapps/Config/
+REST_ACTION_HOME=${{POLICY_HOME}}/servers/pap/webapps/Action/
+REST_CONFIG_URL=https://${{FQDN}}:9091/
+REST_CONFIG_WEBAPPS=${{POLICY_HOME}}/servers/pap/webapps/
+
+# PAP account information
+CONSOLE_PAP_HTTP_USER_ID=testpap
+CONSOLE_PAP_HTTP_PASSWORD=alpha123
+
+
+node_type=pap_admin
+resource_name=console_1
+
+# The (optional) period of time in seconds between executions of the integrity audit.
+# Value < 0 : Audit does not run (default value if property is not present = -1)
+# Value = 0 : Audit runs continuously
+# Value > 0 : The period of time in seconds between execution of the audit on a particular node
+integrity_audit_period_seconds=-1
+
+#Automatic Policy Distribution
+automatic_push=false
+
+#Diff of policies for Firewall feature
+FW_GETURL=https://localhost.com/v0/configs/firewall/pan/
+FW_AUTHOURL=https://localhost
+FW_PROXY=
+FW_PORT=
+
+#SMTP Server Details for Java Mail
+ecomp_smtp_host=
+ecomp_smtp_port=
+ecomp_smtp_userName=root@localhost
+ecomp_smtp_password=password123
+ecomp_application_name=Dev
+
+#-----------------------ECOMP-PORTAL-Properties----------------------
+
+ECOMP_REDIRECT_URL=https://localhost/ecompui/process_csp
+ECOMP_REST_URL=https://localhost:8443/ecompui/auxapi
+ECOMP_UEB_URL_LIST=localhost.com,localhost1.com
+ECOMP_PORTAL_INBOX_NAME=ECOMP-PORTAL-INBOX-TEST
+ECOMP_UEB_APP_KEY=FZpTlJbdRIibgSmg
+ECOMP_UEB_APP_SECRET=QMyKdILRBwj1c76UQONjSYOt
+ECOMP_UEB_APP_MAILBOX_NAME=ECOMP-PORTAL-OUTBOX-45601
+APP_DISPLAY_NAME=POLICY IST
+ECOMP_SHARED_CONTEXT_REST_URL=https://localhost:8443/ecompui/context
+
+#Add the Rest PAP url and pap auth password on adding delimiter @Auth@ *****Check the below assigned dummy example******
+
+REST_PAPURL_WITH_AUTH_PASSWORD=http://localhost:8070/pap/@Auth@dGVzdHBhcDphbHBoYTEyMw==
diff --git a/packages/install/src/files/mysql.conf b/packages/install/src/files/mysql.conf
new file mode 100755
index 000000000..28b9e3ca3
--- /dev/null
+++ b/packages/install/src/files/mysql.conf
@@ -0,0 +1,5 @@
+# mysql scripts component installation configuration parameters
+
+# Path to mysql bin
+MYSQL_BIN=/usr/local/mysql/bin
+
diff --git a/packages/install/src/files/pap.conf b/packages/install/src/files/pap.conf
new file mode 100644
index 000000000..80eb303a8
--- /dev/null
+++ b/packages/install/src/files/pap.conf
@@ -0,0 +1,52 @@
+# pap component installation configuration parameters
+
+# tomcat specific parameters
+
+TOMCAT_JMX_PORT=9990
+TOMCAT_SHUTDOWN_PORT=9405
+SSL_HTTP_CONNECTOR_PORT=9091
+SSL_AJP_CONNECTOR_PORT=8380
+SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
+
+TOMCAT_X_MS_MB=1024
+TOMCAT_X_MX_MB=1024
+
+# pap properties
+
+PAP_PDPS=${{POLICY_HOME}}/servers/pap/bin/pdps
+PAP_URL=https://${{FQDN}}:9091/pap/
+
+PAP_INITIATE_PDP=true
+PAP_HEARTBEAT_INTERVAL=10000
+PAP_HEARTBEAT_TIMEOUT=10000
+
+REST_ADMIN_DOMAIN=com
+REST_ADMIN_REPOSITORY=repository
+REST_ADMIN_WORKSPACE=workspace
+
+# PDP related properties
+
+PAP_PDP_URL=https://${{FQDN}}:8081/pdp/
+PAP_PDP_HTTP_USER_ID=testpdp
+PAP_PDP_HTTP_PASSWORD=alpha123
+
+PAP_HTTP_USER_ID=testpap
+PAP_HTTP_PASSWORD=alpha123
+
+#new values added 10-21-2015
+PROP_PAP_TRANS_WAIT=500000
+PROP_PAP_TRANS_TIMEOUT=5000
+PROP_PAP_AUDIT_TIMEOUT=300000
+PROP_PAP_RUN_AUDIT_FLAG=false
+PROP_PAP_AUDIT_FLAG=false
+
+
+node_type=pap
+resource_name=pap_1
+dependency_groups=console_1;paplp_1
+
+# The (optional) period of time in seconds between executions of the integrity audit.
+# Value < 0 : Audit does not run (default value if property is not present = -1)
+# Value = 0 : Audit runs continuously
+# Value > 0 : The period of time in seconds between execution of the audit on a particular node
+integrity_audit_period_seconds=-1
diff --git a/packages/install/src/files/paplp.conf b/packages/install/src/files/paplp.conf
new file mode 100755
index 000000000..f5a6d096b
--- /dev/null
+++ b/packages/install/src/files/paplp.conf
@@ -0,0 +1,12 @@
+# JVM specific parameters
+LOGPARSER_JMX_PORT=9996
+LOGPARSER_X_MS_MB=1024
+LOGPARSER_X_MX_MB=1024
+
+SERVER=https://${{FQDN}}:9091/pap/
+LOGPATH=${{POLICY_HOME}}/servers/pap/logs/pap-rest.log
+PARSERLOGPATH=IntegrityMonitor.log
+
+node_type=logparser
+# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
+resource_name=paplp_1
diff --git a/packages/install/src/files/pdp.conf b/packages/install/src/files/pdp.conf
new file mode 100644
index 000000000..1cfc62df8
--- /dev/null
+++ b/packages/install/src/files/pdp.conf
@@ -0,0 +1,36 @@
+# pdp component installation configuration parameters
+
+# tomcat specific parameters
+
+TOMCAT_JMX_PORT=9991
+TOMCAT_SHUTDOWN_PORT=8087
+SSL_HTTP_CONNECTOR_PORT=8081
+SSL_AJP_CONNECTOR_PORT=8381
+SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
+
+TOMCAT_X_MS_MB=1024
+TOMCAT_X_MX_MB=1024
+
+# pdp properties
+
+ATT_UEB_CLUSTER=localhost.com,localhost1.com
+
+REST_PAP_URL=https://${{FQDN}}:9091/pap/
+REST_PDP_ID=https://${{FQDN}}:8081/pdp/
+REST_PDP_CONFIG=${{POLICY_HOME}}/servers/pdp/bin/config
+REST_PDP_WEBAPPS=${{POLICY_HOME}}/servers/pdp/webapps
+REST_PDP_REGISTER=true
+REST_PDP_REGISTER_SLEEP=15
+REST_PDP_REGISTER_RETRIES=-1
+REST_PDP_MAXCONTENT=999999999
+
+# PDP related properties
+PDP_HTTP_USER_ID=testpdp
+PDP_HTTP_PASSWORD=alpha123
+PDP_PAP_PDP_HTTP_USER_ID=testpap
+PDP_PAP_PDP_HTTP_PASSWORD=alpha123
+
+node_type=pdp_xacml
+resource_name=pdp_1
+dependency_groups=pdplp_1;pypdp_1;brmsgw_1
+
diff --git a/packages/install/src/files/pdplp.conf b/packages/install/src/files/pdplp.conf
new file mode 100755
index 000000000..750537819
--- /dev/null
+++ b/packages/install/src/files/pdplp.conf
@@ -0,0 +1,12 @@
+# JVM specific parameters
+LOGPARSER_JMX_PORT=9997
+LOGPARSER_X_MS_MB=1024
+LOGPARSER_X_MX_MB=1024
+
+SERVER=https://${{FQDN}}:8081/pdp/
+LOGPATH=${{POLICY_HOME}}/servers/pdp/logs/pdp-rest.log
+PARSERLOGPATH=IntegrityMonitor.log
+
+node_type=logparser
+# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
+resource_name=pdplp_1
diff --git a/packages/install/src/files/pypdp.conf b/packages/install/src/files/pypdp.conf
new file mode 100644
index 000000000..2117ff8ba
--- /dev/null
+++ b/packages/install/src/files/pypdp.conf
@@ -0,0 +1,25 @@
+# pypdp component installation configuration parameters
+
+# tomcat specific parameters
+
+TOMCAT_JMX_PORT=9994
+TOMCAT_SHUTDOWN_PORT=8405
+SSL_HTTP_CONNECTOR_PORT=8480
+SSL_AJP_CONNECTOR_PORT=8384
+SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
+
+TOMCAT_X_MS_MB=1024
+TOMCAT_X_MX_MB=1024
+
+# pypdp parameters
+
+PDP_URL=https://${{FQDN}}:8081/pdp/,testpdp,alpha123
+PAP_URL=https://${{FQDN}}:9091/pap/
+PYPDP_ID=testrest
+PYPDP_PASSWORD=alpha123
+
+node_type=pypdp
+# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
+resource_name=pypdp_1
+
+CLIENT_FILE=client.properties
diff --git a/packages/pom.xml b/packages/pom.xml
new file mode 100644
index 000000000..a1e6997df
--- /dev/null
+++ b/packages/pom.xml
@@ -0,0 +1,66 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>PolicyEngineSuite</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.openecomp.policy.engine</groupId>
+ <artifactId>packages</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Policy Packages</name>
+ <description>D2 ECOMP Policy Installation Packages</description>
+
+ <profiles>
+ <!-- DO NOT CHANGE THE *ORDER* IN WHICH THESE PROFILES ARE DEFINED! -->
+
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>base</module>
+ <module>install</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>with-integration-tests</id>
+ <modules>
+ <module>base</module>
+ <module>install</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <modules>
+ <module>base</module>
+ <module>install</module>
+ </modules>
+</project>