summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-PAP-REST/src/main/resources')
-rw-r--r--ONAP-PAP-REST/src/main/resources/Decision_GuardBLPolicyTemplate.xml111
-rw-r--r--ONAP-PAP-REST/src/main/resources/Decision_GuardPolicyTemplate.xml107
-rw-r--r--ONAP-PAP-REST/src/main/resources/META-INF/drop.ddl7
-rw-r--r--ONAP-PAP-REST/src/main/resources/META-INF/generatedCreate.ddl119
-rw-r--r--ONAP-PAP-REST/src/main/resources/META-INF/generatedDrop.ddl118
-rw-r--r--ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml201
-rw-r--r--ONAP-PAP-REST/src/main/resources/log4j.properties71
-rw-r--r--ONAP-PAP-REST/src/main/resources/logback.xml254
-rw-r--r--ONAP-PAP-REST/src/main/resources/spring.xml46
9 files changed, 1034 insertions, 0 deletions
diff --git a/ONAP-PAP-REST/src/main/resources/Decision_GuardBLPolicyTemplate.xml b/ONAP-PAP-REST/src/main/resources/Decision_GuardBLPolicyTemplate.xml
new file mode 100644
index 000000000..19e567ddd
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/Decision_GuardBLPolicyTemplate.xml
@@ -0,0 +1,111 @@
+<?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:d56af069-6cf1-430c-ba07-e26602e06a52" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny">
+ <Description>${description}</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.onap.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${PolicyName}</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.onap.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${ONAPName}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ONAPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${actor}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="actor" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${recipe}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="recipe" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${clname}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="clname" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" 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">DECIDE</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>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+ <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:any-of">
+ <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="target" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag">
+ <!-- <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">vserver.vserver-name</AttributeValue>-->
+ ${blackListElement}
+ </Apply>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Condition>
+ </Rule>
+ <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" Effect="Deny">
+ <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">DECIDE</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>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+ <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:any-of">
+ <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="target" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag">
+ <!-- <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">vserver.vserver-name</AttributeValue>-->
+ ${blackListElement}
+ </Apply>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Condition>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="GUARD_BL_YAML" AppliesTo="Deny">
+ <AttributeAssignmentExpression AttributeId="guard.response" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Denied!</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy> \ No newline at end of file
diff --git a/ONAP-PAP-REST/src/main/resources/Decision_GuardPolicyTemplate.xml b/ONAP-PAP-REST/src/main/resources/Decision_GuardPolicyTemplate.xml
new file mode 100644
index 000000000..ed5b27b7d
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/Decision_GuardPolicyTemplate.xml
@@ -0,0 +1,107 @@
+<?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:d56af069-6cf1-430c-ba07-e26602e06a52" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny">
+ <Description>${description}</Description>
+ <Target>
+ <AnyOf>
+ <AllOf>
+ <Match MatchId="org.onap.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${PolicyName}</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.onap.function.regex-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${ONAPName}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ONAPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${actor}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="actor" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${recipe}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="recipe" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${targets}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="target" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">${clname}</AttributeValue>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="clname" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ </Match>
+ </AllOf>
+ </AnyOf>
+ </Target>
+ <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" 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">DECIDE</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>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+ <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="count" DataType="http://www.w3.org/2001/XMLSchema#integer" Issuer="org:onap:xacml:guard:historydb:tw:${twValue}:${twUnits}" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${limit}</AttributeValue>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Condition>
+ </Rule>
+ <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" Effect="Deny">
+ <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">DECIDE</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>
+ <Condition>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+ <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
+ </Apply>
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
+ <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="count" DataType="http://www.w3.org/2001/XMLSchema#integer" Issuer="org:onap:xacml:guard:historydb:tw:${twValue}:${twUnits}" MustBePresent="false"/>
+ </Apply>
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${limit}</AttributeValue>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Apply>
+ </Condition>
+ <AdviceExpressions>
+ <AdviceExpression AdviceId="GUARD_YAML" AppliesTo="Deny">
+ <AttributeAssignmentExpression AttributeId="guard.response" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
+ <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Denied!</AttributeValue>
+ </AttributeAssignmentExpression>
+ </AdviceExpression>
+ </AdviceExpressions>
+ </Rule>
+</Policy> \ No newline at end of file
diff --git a/ONAP-PAP-REST/src/main/resources/META-INF/drop.ddl b/ONAP-PAP-REST/src/main/resources/META-INF/drop.ddl
new file mode 100644
index 000000000..f7138ad52
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/META-INF/drop.ddl
@@ -0,0 +1,7 @@
+DROP TABLE IF EXISTS ConfigurationDataEntity
+DROP TABLE IF EXISTS PolicyEntity
+DROP TABLE IF EXISTS PolicyDBDaoEntity
+DROP TABLE IF EXISTS ActionBodyEntity
+DROP SEQUENCE IF EXISTS seqPolicy
+DROP SEQUENCE IF EXISTS seqConfig
+DROP SEQUENCE IF EXISTS seqActBody
diff --git a/ONAP-PAP-REST/src/main/resources/META-INF/generatedCreate.ddl b/ONAP-PAP-REST/src/main/resources/META-INF/generatedCreate.ddl
new file mode 100644
index 000000000..c12949aed
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/META-INF/generatedCreate.ddl
@@ -0,0 +1,119 @@
+CREATE TABLE PolicyEntity (policyId BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP, deleted BOOLEAN NOT NULL, description VARCHAR(2048) NOT NULL, modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, policyData TEXT, policyName VARCHAR(255) NOT NULL, policyVersion INTEGER, scope VARCHAR(255) NOT NULL, version INTEGER, actionBodyId BIGINT, configurationDataId BIGINT, PRIMARY KEY (policyId))
+CREATE TABLE ConfigurationDataEntity (configurationDataId BIGINT NOT NULL, configBody TEXT, configType VARCHAR(255) NOT NULL, configurationName VARCHAR(255) NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP, deleted BOOLEAN NOT NULL, description VARCHAR(2048) NOT NULL, modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, version INTEGER, PRIMARY KEY (configurationDataId))
+CREATE TABLE PolicyDBDaoEntity (policyDBDaoUrl VARCHAR NOT NULL, created_date TIMESTAMP, description VARCHAR(2048) NOT NULL, modified_date TIMESTAMP NOT NULL, password VARCHAR, username VARCHAR, PRIMARY KEY (policyDBDaoUrl))
+CREATE TABLE GroupEntity (groupKey BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP, defaultGroup BOOLEAN NOT NULL, deleted BOOLEAN NOT NULL, description VARCHAR(2048) NOT NULL, groupId VARCHAR NOT NULL, groupName VARCHAR(255) NOT NULL, modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, version INTEGER, PRIMARY KEY (groupKey))
+CREATE TABLE PdpEntity (pdpKey BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP, deleted BOOLEAN NOT NULL, description VARCHAR(2048) NOT NULL, jmxPort INTEGER NOT NULL, modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, pdpId VARCHAR(255) NOT NULL, pdpName VARCHAR(255) NOT NULL, groupKey BIGINT, PRIMARY KEY (pdpKey))
+CREATE TABLE ActionBodyEntity (actionBodyId BIGINT NOT NULL, actionBody TEXT, actionBodyName VARCHAR(255) NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP, deleted BOOLEAN NOT NULL, modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, version INTEGER, PRIMARY KEY (actionBodyId))
+CREATE TABLE DatabaseLockEntity (lock_key INTEGER NOT NULL, PRIMARY KEY (lock_key))
+CREATE TABLE PolicyVersion (id INTEGER NOT NULL, ACTIVE_VERSION INTEGER, CREATED_BY VARCHAR(45) NOT NULL, created_date TIMESTAMP NOT NULL, HIGHEST_VERSION INTEGER, modified_by VARCHAR(45) NOT NULL, modified_date TIMESTAMP NOT NULL, POLICY_NAME VARCHAR(255) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE POLICYSCORE (id INTEGER NOT NULL, POLICY_NAME VARCHAR NOT NULL, POLICY_SCORE VARCHAR, VERSIONEXTENSION VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE FunctionDefinition (id INTEGER NOT NULL, arg_lb INTEGER NOT NULL, arg_ub INTEGER NOT NULL, ho_arg_lb INTEGER, ho_arg_ub INTEGER, ho_primitive CHAR, is_bag_return INTEGER NOT NULL, is_higher_order INTEGER NOT NULL, short_name VARCHAR(64) NOT NULL, xacml_id VARCHAR(255) NOT NULL, return_datatype INTEGER, PRIMARY KEY (id))
+CREATE TABLE Attribute (id INTEGER NOT NULL, ATTRIBUTE_VALUE VARCHAR, created_date TIMESTAMP, description VARCHAR(2048), is_designator CHAR NOT NULL, modified_date TIMESTAMP NOT NULL, PRIORITY VARCHAR, selector_path VARCHAR(2048), xacml_id VARCHAR NOT NULL UNIQUE, category INTEGER, constraint_type INTEGER, datatype INTEGER, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE Category (id INTEGER NOT NULL, grouping VARCHAR(64) NOT NULL, is_standard CHAR NOT NULL, short_name VARCHAR(64) NOT NULL, xacml_id VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (id))
+CREATE TABLE ConstraintType (id INTEGER NOT NULL, constraint_type VARCHAR(64) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE ConstraintValues (id INTEGER NOT NULL, property VARCHAR, value VARCHAR, attribute_id INTEGER, PRIMARY KEY (id))
+CREATE TABLE Datatype (id INTEGER NOT NULL, is_standard CHAR NOT NULL, short_name VARCHAR(64) NOT NULL, xacml_id VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (id))
+CREATE TABLE FunctionArguments (id INTEGER NOT NULL, arg_index INTEGER NOT NULL, is_bag INTEGER NOT NULL, datatype_id INTEGER, function_id INTEGER, PRIMARY KEY (id))
+CREATE TABLE UserInfo (loginid VARCHAR(45) NOT NULL, name VARCHAR NOT NULL UNIQUE, PRIMARY KEY (loginid))
+CREATE TABLE ActionPolicyDict (id INTEGER NOT NULL, ATTRIBUTE_NAME VARCHAR NOT NULL, Body VARCHAR, created_date TIMESTAMP, description VARCHAR(2048), Headers VARCHAR, Method VARCHAR NOT NULL, modified_date TIMESTAMP NOT NULL, Type VARCHAR NOT NULL, URL VARCHAR NOT NULL, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE DecisionSettings (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, PRIORITY VARCHAR, xacml_id VARCHAR NOT NULL UNIQUE, datatype INTEGER, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE MicroServiceModels (id INTEGER NOT NULL, annotation VARCHAR(2000) NOT NULL, attributes VARCHAR(255) NOT NULL, dependency VARCHAR(2048), description VARCHAR(2048), enumValues VARCHAR(2000) NOT NULL, modelName VARCHAR NOT NULL UNIQUE, ref_attributes VARCHAR(255) NOT NULL, sub_attributes VARCHAR(2000) NOT NULL, version VARCHAR(2000) NOT NULL, imported_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE actionlist (id INTEGER NOT NULL, actionname VARCHAR NOT NULL, description VARCHAR, PRIMARY KEY (id))
+CREATE TABLE AddressGroup (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, prefixlist VARCHAR, PRIMARY KEY (id))
+CREATE TABLE AttributeAssignment (id INTEGER NOT NULL, attribute_id INTEGER, expression VARCHAR NOT NULL, OBADVICE_id INTEGER, PRIMARY KEY (id))
+CREATE TABLE BRMSParamTemplate (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), rule LONGVARCHAR NOT NULL, param_template_name VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE ClosedLoopD2Services (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, service_Name VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE ClosedLoopSite (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, site_Name VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE DCAEUsers (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE DCAEuuid (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE DescriptiveScope (Id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), scopename VARCHAR NOT NULL, modified_date TIMESTAMP NOT NULL, search VARCHAR, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (Id))
+CREATE TABLE OnapName (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, onap_Name VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE EnforcingType (id INTEGER NOT NULL, connectionQuery VARCHAR(255) NOT NULL, enforcingType VARCHAR NOT NULL UNIQUE, script VARCHAR(255) NOT NULL, valueQuery VARCHAR(255) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE GlobalRoleSettings (role VARCHAR(45) NOT NULL, lockdown BOOLEAN, PRIMARY KEY (role))
+CREATE TABLE GroupPolicyScopeList (id INTEGER NOT NULL, description VARCHAR, groupList VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE GroupServiceList (id INTEGER NOT NULL, name VARCHAR NOT NULL, serviceList VARCHAR, PRIMARY KEY (id))
+CREATE TABLE MicroServiceConfigName (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE MicroServiceLocation (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE Obadvice (id INTEGER NOT NULL, created_by VARCHAR(255) NOT NULL, created_date TIMESTAMP NOT NULL, description VARCHAR(2048), fulfill_on VARCHAR(32), modified_by VARCHAR(255) NOT NULL, modified_date TIMESTAMP NOT NULL, type VARCHAR NOT NULL, xacml_id VARCHAR(255) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE ObadviceExpressions (id INTEGER NOT NULL, type VARCHAR NOT NULL, obadvice_id INTEGER, attribute_id INTEGER, PRIMARY KEY (id))
+CREATE TABLE PEPOptions (Id INTEGER NOT NULL, Actions VARCHAR, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, PEP_NAME VARCHAR NOT NULL, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (Id))
+CREATE TABLE PIPConfigParams (id INTEGER NOT NULL, PARAM_DEFAULT VARCHAR(2048), PARAM_NAME VARCHAR(1024) NOT NULL, PARAM_VALUE VARCHAR(2048) NOT NULL, REQUIRED CHAR NOT NULL, PIP_ID INTEGER, PRIMARY KEY (id))
+CREATE TABLE PIPConfiguration (id INTEGER NOT NULL, CLASSNAME VARCHAR(2048) NOT NULL, CREATED_BY VARCHAR(255) NOT NULL, CREATED_DATE TIMESTAMP NOT NULL, DESCRIPTION VARCHAR(2048), ISSUER VARCHAR(1024), MODIFIED_BY VARCHAR(255) NOT NULL, MODIFIED_DATE TIMESTAMP NOT NULL, NAME VARCHAR(255) NOT NULL, READ_ONLY CHAR NOT NULL, REQUIRES_RESOLVER CHAR NOT NULL, TYPE INTEGER, PRIMARY KEY (id))
+CREATE TABLE PIPResolver (id INTEGER NOT NULL, CLASSNAME VARCHAR(2048) NOT NULL, CREATED_BY VARCHAR(255) NOT NULL, CREATED_DATE TIMESTAMP NOT NULL, DESCRIPTION VARCHAR(2048), ISSUER VARCHAR(1024), MODIFIED_BY VARCHAR(255) NOT NULL, MODIFIED_DATE TIMESTAMP NOT NULL, NAME VARCHAR(255) NOT NULL, READ_ONLY CHAR NOT NULL, PIP_ID INTEGER, PRIMARY KEY (id))
+CREATE TABLE PIPResolverParams (id INTEGER NOT NULL, PARAM_DEFAULT VARCHAR(2048), PARAM_NAME VARCHAR(1024) NOT NULL, PARAM_VALUE VARCHAR(2048) NOT NULL, REQUIRED CHAR NOT NULL, ID_RESOLVER INTEGER, PRIMARY KEY (id))
+CREATE TABLE PIPType (id INTEGER NOT NULL, type VARCHAR(45) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE PolicyAlgorithms (id INTEGER NOT NULL, is_standard CHAR NOT NULL, short_name VARCHAR(64) NOT NULL, xacml_id VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (id))
+CREATE TABLE policy_manangement (id INTEGER NOT NULL, CONFIG_NAME VARCHAR(45) NOT NULL, CREATE_DATE_TIME TIMESTAMP NOT NULL, CREATED_BY VARCHAR(45) NOT NULL, ONAP_NAME VARCHAR(45) NOT NULL, POLICY_NAME VARCHAR(45) NOT NULL, scope VARCHAR(45) NOT NULL, UPDATE_DATE_TIME TIMESTAMP NOT NULL, UPDATED_BY VARCHAR(45) NOT NULL, XML CLOB NOT NULL, PRIMARY KEY (id))
+CREATE TABLE PolicyScopeService (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE PolicyScopeType (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE PolicyScopeResource (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE PolicyScopeClosedLoop (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE portlist (id INTEGER NOT NULL, description VARCHAR, portname VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE protocollist (id INTEGER NOT NULL, description VARCHAR, protocolname VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE RemoteCatalogValues (id INTEGER NOT NULL, name VARCHAR NOT NULL, value VARCHAR, PRIMARY KEY (id))
+CREATE TABLE roles (id INTEGER NOT NULL, role VARCHAR(45) NOT NULL, scope VARCHAR(45), loginid VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE RuleAlgorithms (id INTEGER NOT NULL, is_standard CHAR NOT NULL, short_name VARCHAR(64) NOT NULL, xacml_id VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (id))
+CREATE TABLE securityzone (id INTEGER NOT NULL, name VARCHAR NOT NULL, value VARCHAR, PRIMARY KEY (id))
+CREATE TABLE servicegroup (id INTEGER NOT NULL, appprotocol VARCHAR, description VARCHAR, name VARCHAR NOT NULL, ports VARCHAR, transportprotocol VARCHAR, type VARCHAR, PRIMARY KEY (id))
+CREATE TABLE SystemLogDB (id INTEGER NOT NULL, date TIMESTAMP NOT NULL, description VARCHAR(2048), logtype VARCHAR(255) NOT NULL, remote VARCHAR(255) NOT NULL, system VARCHAR(255) NOT NULL, type VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE TERM (id INTEGER NOT NULL, action VARCHAR, created_date TIMESTAMP, destIPList VARCHAR, destPortList VARCHAR, fromzone VARCHAR, modified_date TIMESTAMP NOT NULL, portList VARCHAR, protocolList VARCHAR, srcIPList VARCHAR, srcPortList VARCHAR, description VARCHAR, termName VARCHAR NOT NULL, tozone VARCHAR, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE VarbindDictionary (Id INTEGER NOT NULL, created_date TIMESTAMP, modified_date TIMESTAMP NOT NULL, varbind_Description VARCHAR(2048), varbind_Name VARCHAR NOT NULL UNIQUE, varbind_oid VARCHAR NOT NULL, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (Id))
+CREATE TABLE VMType (id INTEGER NOT NULL, description VARCHAR, name VARCHAR NOT NULL, PRIMARY KEY (id))
+CREATE TABLE VNFType (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, vnf_type VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE VSCLAction (id INTEGER NOT NULL, created_date TIMESTAMP, description VARCHAR(2048), modified_date TIMESTAMP NOT NULL, vscl_action VARCHAR NOT NULL UNIQUE, created_by VARCHAR(45), modified_by VARCHAR(45), PRIMARY KEY (id))
+CREATE TABLE zone (id INTEGER NOT NULL, zonename VARCHAR NOT NULL, zonevalue VARCHAR, PRIMARY KEY (id))
+CREATE TABLE BackUpMonitorEntity (id INTEGER NOT NULL, flag VARCHAR NOT NULL, notification_record LONGVARCHAR, resource_name VARCHAR NOT NULL UNIQUE, node_name VARCHAR NOT NULL, last_seen TIMESTAMP, PRIMARY KEY (id))
+CREATE TABLE StateManagementEntity (id BIGINT NOT NULL, adminState VARCHAR(20) NOT NULL, availStatus VARCHAR(20) NOT NULL, created_Date TIMESTAMP, modifiedDate TIMESTAMP NOT NULL, opState VARCHAR(20) NOT NULL, resourceName VARCHAR(100) NOT NULL UNIQUE, standbyStatus VARCHAR(20) NOT NULL, PRIMARY KEY (id))
+CREATE TABLE ForwardProgressEntity (forwardProgressId BIGINT NOT NULL, created_date TIMESTAMP, fpc_count BIGINT NOT NULL, last_updated TIMESTAMP, resourceName VARCHAR(100) NOT NULL UNIQUE, PRIMARY KEY (forwardProgressId))
+CREATE TABLE ResourceRegistrationEntity (ResourceRegistrationId BIGINT NOT NULL, created_date TIMESTAMP, last_updated TIMESTAMP, nodeType VARCHAR(50), resourceName VARCHAR(100) NOT NULL UNIQUE, resourceUrl VARCHAR(255) NOT NULL UNIQUE, site VARCHAR(50), PRIMARY KEY (ResourceRegistrationId))
+CREATE TABLE IntegrityAuditEntity (id BIGINT NOT NULL, createdDate TIMESTAMP, designated BOOLEAN, jdbcDriver VARCHAR NOT NULL, jdbcPassword VARCHAR NOT NULL, jdbcUrl VARCHAR NOT NULL, jdbcUser VARCHAR NOT NULL, lastUpdated TIMESTAMP, nodeType VARCHAR, persistenceUnit VARCHAR NOT NULL, resourceName VARCHAR NOT NULL UNIQUE, site VARCHAR, PRIMARY KEY (id))
+CREATE TABLE PolicyGroupEntity (groupKey BIGINT NOT NULL, policyId BIGINT NOT NULL, PRIMARY KEY (groupKey, policyId))
+ALTER TABLE PolicyEntity ADD CONSTRAINT FK_PolicyEntity_configurationDataId FOREIGN KEY (configurationDataId) REFERENCES ConfigurationDataEntity (configurationDataId)
+ALTER TABLE PolicyEntity ADD CONSTRAINT FK_PolicyEntity_actionBodyId FOREIGN KEY (actionBodyId) REFERENCES ActionBodyEntity (actionBodyId)
+ALTER TABLE PdpEntity ADD CONSTRAINT FK_PdpEntity_groupKey FOREIGN KEY (groupKey) REFERENCES GroupEntity (groupKey)
+ALTER TABLE FunctionDefinition ADD CONSTRAINT FK_FunctionDefinition_return_datatype FOREIGN KEY (return_datatype) REFERENCES Datatype (id)
+ALTER TABLE Attribute ADD CONSTRAINT FK_Attribute_category FOREIGN KEY (category) REFERENCES Category (id)
+ALTER TABLE Attribute ADD CONSTRAINT FK_Attribute_constraint_type FOREIGN KEY (constraint_type) REFERENCES ConstraintType (id)
+ALTER TABLE Attribute ADD CONSTRAINT FK_Attribute_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE Attribute ADD CONSTRAINT FK_Attribute_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE Attribute ADD CONSTRAINT FK_Attribute_datatype FOREIGN KEY (datatype) REFERENCES Datatype (id)
+ALTER TABLE ConstraintValues ADD CONSTRAINT FK_ConstraintValues_attribute_id FOREIGN KEY (attribute_id) REFERENCES Attribute (id)
+ALTER TABLE FunctionArguments ADD CONSTRAINT FK_FunctionArguments_function_id FOREIGN KEY (function_id) REFERENCES FunctionDefinition (id)
+ALTER TABLE FunctionArguments ADD CONSTRAINT FK_FunctionArguments_datatype_id FOREIGN KEY (datatype_id) REFERENCES Datatype (id)
+ALTER TABLE ActionPolicyDict ADD CONSTRAINT FK_ActionPolicyDict_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ActionPolicyDict ADD CONSTRAINT FK_ActionPolicyDict_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE DecisionSettings ADD CONSTRAINT FK_DecisionSettings_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE DecisionSettings ADD CONSTRAINT FK_DecisionSettings_datatype FOREIGN KEY (datatype) REFERENCES Datatype (id)
+ALTER TABLE DecisionSettings ADD CONSTRAINT FK_DecisionSettings_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE MicroServiceModels ADD CONSTRAINT FK_MicroServiceModels_imported_by FOREIGN KEY (imported_by) REFERENCES UserInfo (loginid)
+ALTER TABLE AttributeAssignment ADD CONSTRAINT FK_AttributeAssignment_OBADVICE_id FOREIGN KEY (OBADVICE_id) REFERENCES Obadvice (id)
+ALTER TABLE BRMSParamTemplate ADD CONSTRAINT FK_BRMSParamTemplate_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ClosedLoopD2Services ADD CONSTRAINT FK_ClosedLoopD2Services_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ClosedLoopD2Services ADD CONSTRAINT FK_ClosedLoopD2Services_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ClosedLoopSite ADD CONSTRAINT FK_ClosedLoopSite_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ClosedLoopSite ADD CONSTRAINT FK_ClosedLoopSite_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE DescriptiveScope ADD CONSTRAINT FK_DescriptiveScope_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE DescriptiveScope ADD CONSTRAINT FK_DescriptiveScope_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE OnapName ADD CONSTRAINT FK_OnapName_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE OnapName ADD CONSTRAINT FK_OnapName_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE ObadviceExpressions ADD CONSTRAINT FK_ObadviceExpressions_obadvice_id FOREIGN KEY (obadvice_id) REFERENCES Obadvice (id)
+ALTER TABLE ObadviceExpressions ADD CONSTRAINT FK_ObadviceExpressions_attribute_id FOREIGN KEY (attribute_id) REFERENCES Attribute (id)
+ALTER TABLE PEPOptions ADD CONSTRAINT FK_PEPOptions_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE PEPOptions ADD CONSTRAINT FK_PEPOptions_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE PIPConfigParams ADD CONSTRAINT FK_PIPConfigParams_PIP_ID FOREIGN KEY (PIP_ID) REFERENCES PIPConfiguration (id)
+ALTER TABLE PIPConfiguration ADD CONSTRAINT FK_PIPConfiguration_TYPE FOREIGN KEY (TYPE) REFERENCES PIPType (id)
+ALTER TABLE PIPResolver ADD CONSTRAINT FK_PIPResolver_PIP_ID FOREIGN KEY (PIP_ID) REFERENCES PIPConfiguration (id)
+ALTER TABLE PIPResolverParams ADD CONSTRAINT FK_PIPResolverParams_ID_RESOLVER FOREIGN KEY (ID_RESOLVER) REFERENCES PIPResolver (id)
+ALTER TABLE roles ADD CONSTRAINT FK_roles_loginid FOREIGN KEY (loginid) REFERENCES UserInfo (loginid)
+ALTER TABLE TERM ADD CONSTRAINT FK_TERM_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE TERM ADD CONSTRAINT FK_TERM_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VarbindDictionary ADD CONSTRAINT FK_VarbindDictionary_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VarbindDictionary ADD CONSTRAINT FK_VarbindDictionary_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VNFType ADD CONSTRAINT FK_VNFType_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VNFType ADD CONSTRAINT FK_VNFType_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VSCLAction ADD CONSTRAINT FK_VSCLAction_modified_by FOREIGN KEY (modified_by) REFERENCES UserInfo (loginid)
+ALTER TABLE VSCLAction ADD CONSTRAINT FK_VSCLAction_created_by FOREIGN KEY (created_by) REFERENCES UserInfo (loginid)
+ALTER TABLE PolicyGroupEntity ADD CONSTRAINT FK_PolicyGroupEntity_policyId FOREIGN KEY (policyId) REFERENCES PolicyEntity (policyId)
+ALTER TABLE PolicyGroupEntity ADD CONSTRAINT FK_PolicyGroupEntity_groupKey FOREIGN KEY (groupKey) REFERENCES GroupEntity (groupKey)
+CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIMARY KEY (SEQ_NAME))
+INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)
diff --git a/ONAP-PAP-REST/src/main/resources/META-INF/generatedDrop.ddl b/ONAP-PAP-REST/src/main/resources/META-INF/generatedDrop.ddl
new file mode 100644
index 000000000..ce1769a4d
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/META-INF/generatedDrop.ddl
@@ -0,0 +1,118 @@
+ALTER TABLE PolicyEntity DROP CONSTRAINT FK_PolicyEntity_configurationDataId
+ALTER TABLE PolicyEntity DROP CONSTRAINT FK_PolicyEntity_actionBodyId
+ALTER TABLE PdpEntity DROP CONSTRAINT FK_PdpEntity_groupKey
+ALTER TABLE FunctionDefinition DROP CONSTRAINT FK_FunctionDefinition_return_datatype
+ALTER TABLE Attribute DROP CONSTRAINT FK_Attribute_category
+ALTER TABLE Attribute DROP CONSTRAINT FK_Attribute_constraint_type
+ALTER TABLE Attribute DROP CONSTRAINT FK_Attribute_created_by
+ALTER TABLE Attribute DROP CONSTRAINT FK_Attribute_modified_by
+ALTER TABLE Attribute DROP CONSTRAINT FK_Attribute_datatype
+ALTER TABLE ConstraintValues DROP CONSTRAINT FK_ConstraintValues_attribute_id
+ALTER TABLE FunctionArguments DROP CONSTRAINT FK_FunctionArguments_function_id
+ALTER TABLE FunctionArguments DROP CONSTRAINT FK_FunctionArguments_datatype_id
+ALTER TABLE ActionPolicyDict DROP CONSTRAINT FK_ActionPolicyDict_modified_by
+ALTER TABLE ActionPolicyDict DROP CONSTRAINT FK_ActionPolicyDict_created_by
+ALTER TABLE DecisionSettings DROP CONSTRAINT FK_DecisionSettings_created_by
+ALTER TABLE DecisionSettings DROP CONSTRAINT FK_DecisionSettings_datatype
+ALTER TABLE DecisionSettings DROP CONSTRAINT FK_DecisionSettings_modified_by
+ALTER TABLE MicroServiceModels DROP CONSTRAINT FK_MicroServiceModels_imported_by
+ALTER TABLE AttributeAssignment DROP CONSTRAINT FK_AttributeAssignment_OBADVICE_id
+ALTER TABLE BRMSParamTemplate DROP CONSTRAINT FK_BRMSParamTemplate_created_by
+ALTER TABLE ClosedLoopD2Services DROP CONSTRAINT FK_ClosedLoopD2Services_modified_by
+ALTER TABLE ClosedLoopD2Services DROP CONSTRAINT FK_ClosedLoopD2Services_created_by
+ALTER TABLE ClosedLoopSite DROP CONSTRAINT FK_ClosedLoopSite_modified_by
+ALTER TABLE ClosedLoopSite DROP CONSTRAINT FK_ClosedLoopSite_created_by
+ALTER TABLE DescriptiveScope DROP CONSTRAINT FK_DescriptiveScope_created_by
+ALTER TABLE DescriptiveScope DROP CONSTRAINT FK_DescriptiveScope_modified_by
+ALTER TABLE OnapName DROP CONSTRAINT FK_OnapName_modified_by
+ALTER TABLE OnapName DROP CONSTRAINT FK_OnapName_created_by
+ALTER TABLE ObadviceExpressions DROP CONSTRAINT FK_ObadviceExpressions_obadvice_id
+ALTER TABLE ObadviceExpressions DROP CONSTRAINT FK_ObadviceExpressions_attribute_id
+ALTER TABLE PEPOptions DROP CONSTRAINT FK_PEPOptions_modified_by
+ALTER TABLE PEPOptions DROP CONSTRAINT FK_PEPOptions_created_by
+ALTER TABLE PIPConfigParams DROP CONSTRAINT FK_PIPConfigParams_PIP_ID
+ALTER TABLE PIPConfiguration DROP CONSTRAINT FK_PIPConfiguration_TYPE
+ALTER TABLE PIPResolver DROP CONSTRAINT FK_PIPResolver_PIP_ID
+ALTER TABLE PIPResolverParams DROP CONSTRAINT FK_PIPResolverParams_ID_RESOLVER
+ALTER TABLE roles DROP CONSTRAINT FK_roles_loginid
+ALTER TABLE TERM DROP CONSTRAINT FK_TERM_modified_by
+ALTER TABLE TERM DROP CONSTRAINT FK_TERM_created_by
+ALTER TABLE VarbindDictionary DROP CONSTRAINT FK_VarbindDictionary_modified_by
+ALTER TABLE VarbindDictionary DROP CONSTRAINT FK_VarbindDictionary_created_by
+ALTER TABLE VNFType DROP CONSTRAINT FK_VNFType_modified_by
+ALTER TABLE VNFType DROP CONSTRAINT FK_VNFType_created_by
+ALTER TABLE VSCLAction DROP CONSTRAINT FK_VSCLAction_modified_by
+ALTER TABLE VSCLAction DROP CONSTRAINT FK_VSCLAction_created_by
+ALTER TABLE PolicyGroupEntity DROP CONSTRAINT FK_PolicyGroupEntity_policyId
+ALTER TABLE PolicyGroupEntity DROP CONSTRAINT FK_PolicyGroupEntity_groupKey
+DROP TABLE PolicyEntity
+DROP TABLE ConfigurationDataEntity
+DROP TABLE PolicyDBDaoEntity
+DROP TABLE GroupEntity
+DROP TABLE PdpEntity
+DROP TABLE ActionBodyEntity
+DROP TABLE DatabaseLockEntity
+DROP TABLE PolicyVersion
+DROP TABLE POLICYSCORE
+DROP TABLE FunctionDefinition
+DROP TABLE Attribute
+DROP TABLE Category
+DROP TABLE ConstraintType
+DROP TABLE ConstraintValues
+DROP TABLE Datatype
+DROP TABLE FunctionArguments
+DROP TABLE UserInfo
+DROP TABLE ActionPolicyDict
+DROP TABLE DecisionSettings
+DROP TABLE MicroServiceModels
+DROP TABLE actionlist
+DROP TABLE AddressGroup
+DROP TABLE AttributeAssignment
+DROP TABLE BRMSParamTemplate
+DROP TABLE ClosedLoopD2Services
+DROP TABLE ClosedLoopSite
+DROP TABLE DCAEUsers
+DROP TABLE DCAEuuid
+DROP TABLE DescriptiveScope
+DROP TABLE OnapName
+DROP TABLE EnforcingType
+DROP TABLE GlobalRoleSettings
+DROP TABLE GroupPolicyScopeList
+DROP TABLE GroupServiceList
+DROP TABLE MicroServiceConfigName
+DROP TABLE MicroServiceLocation
+DROP TABLE Obadvice
+DROP TABLE ObadviceExpressions
+DROP TABLE PEPOptions
+DROP TABLE PIPConfigParams
+DROP TABLE PIPConfiguration
+DROP TABLE PIPResolver
+DROP TABLE PIPResolverParams
+DROP TABLE PIPType
+DROP TABLE PolicyAlgorithms
+DROP TABLE policy_manangement
+DROP TABLE PolicyScopeService
+DROP TABLE PolicyScopeType
+DROP TABLE PolicyScopeResource
+DROP TABLE PolicyScopeClosedLoop
+DROP TABLE portlist
+DROP TABLE protocollist
+DROP TABLE RemoteCatalogValues
+DROP TABLE roles
+DROP TABLE RuleAlgorithms
+DROP TABLE securityzone
+DROP TABLE servicegroup
+DROP TABLE SystemLogDB
+DROP TABLE TERM
+DROP TABLE VarbindDictionary
+DROP TABLE VMType
+DROP TABLE VNFType
+DROP TABLE VSCLAction
+DROP TABLE zone
+DROP TABLE BackUpMonitorEntity
+DROP TABLE StateManagementEntity
+DROP TABLE ForwardProgressEntity
+DROP TABLE ResourceRegistrationEntity
+DROP TABLE IntegrityAuditEntity
+DROP TABLE PolicyGroupEntity
+DELETE FROM SEQUENCE WHERE SEQ_NAME = 'SEQ_GEN'
diff --git a/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml b/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 000000000..b0a76c40a
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
+ <persistence-unit name="XACML-PAP-REST">
+ <class>org.onap.policy.rest.jpa.PolicyEntity</class>
+ <class>org.onap.policy.rest.jpa.ConfigurationDataEntity</class>
+ <class>org.onap.policy.rest.jpa.PolicyDBDaoEntity</class>
+ <class>org.onap.policy.rest.jpa.GroupEntity</class>
+ <class>org.onap.policy.rest.jpa.PdpEntity</class>
+ <class>org.onap.policy.rest.jpa.ActionBodyEntity</class>
+ <class>org.onap.policy.rest.jpa.DatabaseLockEntity</class>
+ <class>org.onap.policy.rest.jpa.PolicyVersion</class>
+ <class>org.onap.policy.rest.jpa.PolicyScore</class>
+ <class>org.onap.policy.rest.jpa.FunctionDefinition</class>
+ <class>org.onap.policy.rest.jpa.Attribute</class>
+ <class>org.onap.policy.rest.jpa.Category</class>
+ <class>org.onap.policy.rest.jpa.ConstraintType</class>
+ <class>org.onap.policy.rest.jpa.ConstraintValue</class>
+ <class>org.onap.policy.rest.jpa.Datatype</class>
+ <class>org.onap.policy.rest.jpa.FunctionArgument</class>
+ <class>org.onap.policy.rest.jpa.UserInfo</class>
+ <class>org.onap.policy.rest.jpa.ActionPolicyDict</class>
+ <class>org.onap.policy.rest.jpa.DecisionSettings</class>
+ <class>org.onap.policy.rest.jpa.MicroServiceModels</class>
+ <class>org.onap.policy.rest.jpa.BRMSParamTemplate</class>
+ <class>org.onap.policy.rest.jpa.PolicyEditorScopes</class>
+ <!-- unique to PolicyEngineUtils - will be audited from PAP -->
+ <class>org.onap.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor - will be audited from PAP -->
+ <class>org.onap.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.onap.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.onap.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit - will be audited from PAP -->
+ <class>org.onap.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <exclude-unlisted-classes>false</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ <properties>
+ <!-- The properties defined below are the default settings to be used when someone initially
+ wants to start working with the XACML-PAP-ADMIN web gui. They are not intended for production
+ use.
+
+ They are setup to drop and create the tables and then load an initial set of data into the database
+ every time the application is deployed. So if you add anything to the dictionaries or PIP
+ configuration, they will get lost upon each deployment. It uses an H2 database engine configured
+ for a local file so you don't have to setup you're own SQL database environment to start.
+
+ Instead of modifying this file directly, please refer to the xacml.admin.properties file for
+ customizing the application settings.
+
+ -->
+ <!-- <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.create-source" value="metadata-then-script"/>
+ <property name="javax.persistence.schema-generation.create-script-source" value="META-INF/views.sql" />
+ <property name="javax.persistence.schema-generation.drop-source" value="script"/>
+ <property name="javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.sql" />
+ <property name="javax.persistence.sql-load-script-source" value="META-INF/data.sql" />-->
+
+
+
+ <!-- These properties should be set in the xacml.admin.properties file, so they can be re-used by non-JPA
+ database functionality. -->
+ <!--
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:file:sql/xacml"/>
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+ -->
+ </properties>
+ </persistence-unit>
+
+<persistence-unit name="auditPapPU">
+ <!-- This is the persistence unit used by IntegrityAudit to determine
+ which classes to audit. All the PAP classes are also included in
+ XACML-PAP-ADMIN, so they will be audited there rather than having a
+ duplicate audit run from the XACL-PAP-REST node -->
+ <!-- unique to PolicyEngineUtils - will be audited from PAP -->
+ <class>org.onap.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor - will be audited from PAP -->
+ <class>org.onap.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.onap.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.onap.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit - will be audited from PAP -->
+ <class>org.onap.policy.common.ia.jpa.IntegrityAuditEntity</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ </persistence-unit>
+
+ <persistence-unit name="testPapPU" transaction-type="RESOURCE_LOCAL">
+ <!-- This tests all the classes that will be audited in the XACML-PAP-REST and the XACML-PAP_ADMIN -->
+ <!-- XACML-PAP-REST -->
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.onap.policy.rest.jpa.PolicyEntity</class>
+ <class>org.onap.policy.rest.jpa.ConfigurationDataEntity</class>
+ <class>org.onap.policy.rest.jpa.PolicyDBDaoEntity</class>
+ <class>org.onap.policy.rest.jpa.GroupEntity</class>
+ <class>org.onap.policy.rest.jpa.PdpEntity</class>
+ <class>org.onap.policy.rest.jpa.ActionBodyEntity</class>
+ <class>org.onap.policy.rest.jpa.DatabaseLockEntity</class>
+ <class>org.onap.policy.rest.jpa.PolicyVersion</class>
+ <class>org.onap.policy.rest.jpa.PolicyScore</class>
+ <class>org.onap.policy.rest.jpa.FunctionDefinition</class>
+ <class>org.onap.policy.rest.jpa.Attribute</class>
+ <class>org.onap.policy.rest.jpa.Category</class>
+ <class>org.onap.policy.rest.jpa.ConstraintType</class>
+ <class>org.onap.policy.rest.jpa.ConstraintValue</class>
+ <class>org.onap.policy.rest.jpa.Datatype</class>
+ <class>org.onap.policy.rest.jpa.FunctionArgument</class>
+ <class>org.onap.policy.rest.jpa.UserInfo</class>
+ <class>org.onap.policy.rest.jpa.ActionPolicyDict</class>
+ <class>org.onap.policy.rest.jpa.DecisionSettings</class>
+ <class>org.onap.policy.rest.jpa.MicroServiceModels</class>
+ <!-- unique to XACML-PAP-ADMIN -->
+ <class>org.onap.policy.rest.jpa.ActionList</class>
+ <class>org.onap.policy.rest.jpa.AddressGroup</class>
+ <class>org.onap.policy.rest.jpa.AttributeAssignment</class>
+ <class>org.onap.policy.rest.jpa.BRMSParamTemplate</class>
+ <class>org.onap.policy.rest.jpa.ClosedLoopD2Services</class>
+ <class>org.onap.policy.rest.jpa.ClosedLoopSite</class>
+ <class>org.onap.policy.rest.jpa.DCAEUsers</class>
+ <class>org.onap.policy.rest.jpa.DCAEuuid</class>
+ <class>org.onap.policy.rest.jpa.DescriptiveScope</class>
+ <class>org.onap.policy.rest.jpa.OnapName</class>
+ <class>org.onap.policy.rest.jpa.EnforcingType</class>
+ <class>org.onap.policy.rest.jpa.GlobalRoleSettings</class>
+ <class>org.onap.policy.rest.jpa.GroupPolicyScopeList</class>
+ <class>org.onap.policy.rest.jpa.GroupServiceList</class>
+ <class>org.onap.policy.rest.jpa.MicroServiceConfigName</class>
+ <class>org.onap.policy.rest.jpa.MicroServiceLocation</class>
+ <class>org.onap.policy.rest.jpa.Obadvice</class>
+ <class>org.onap.policy.rest.jpa.ObadviceExpression</class>
+ <class>org.onap.policy.rest.jpa.PEPOptions</class>
+ <class>org.onap.policy.rest.jpa.PIPConfigParam</class>
+ <class>org.onap.policy.rest.jpa.PIPConfiguration</class>
+ <class>org.onap.policy.rest.jpa.PIPResolver</class>
+ <class>org.onap.policy.rest.jpa.PIPResolverParam</class>
+ <class>org.onap.policy.rest.jpa.PIPType</class>
+ <class>org.onap.policy.rest.jpa.PolicyAlgorithms</class>
+ <class>org.onap.policy.rest.jpa.PolicyManagement</class>
+ <class>org.onap.policy.rest.jpa.PolicyScopeService</class>
+ <class>org.onap.policy.rest.jpa.PolicyScopeType</class>
+ <class>org.onap.policy.rest.jpa.PolicyScopeResource</class>
+ <class>org.onap.policy.rest.jpa.PolicyScopeClosedLoop</class>
+ <class>org.onap.policy.rest.jpa.PortList</class>
+ <class>org.onap.policy.rest.jpa.PREFIXLIST</class>
+ <class>org.onap.policy.rest.jpa.ProtocolList</class>
+ <class>org.onap.policy.rest.jpa.RemoteCatalogValues</class>
+ <class>org.onap.policy.rest.jpa.PolicyRoles</class>
+ <class>org.onap.policy.rest.jpa.RuleAlgorithms</class>
+ <class>org.onap.policy.rest.jpa.SecurityZone</class>
+ <class>org.onap.policy.rest.jpa.ServiceList</class>
+ <class>org.onap.policy.rest.jpa.SystemLogDB</class>
+ <class>org.onap.policy.rest.jpa.TermList</class>
+ <class>org.onap.policy.rest.jpa.VarbindDictionary</class>
+ <class>org.onap.policy.rest.jpa.VMType</class>
+ <class>org.onap.policy.rest.jpa.VNFType</class>
+ <class>org.onap.policy.rest.jpa.VSCLAction</class>
+ <class>org.onap.policy.rest.jpa.Zone</class>
+ <!-- unique to PolicyEngineUtils -->
+ <class>org.onap.policy.jpa.BackUpMonitorEntity</class>
+ <!-- unique to integrity-monitor -->
+ <class>org.onap.policy.common.im.jpa.StateManagementEntity</class>
+ <class>org.onap.policy.common.im.jpa.ForwardProgressEntity</class>
+ <class>org.onap.policy.common.im.jpa.ResourceRegistrationEntity</class>
+ <!-- unique to integrity-audit -->
+ <class>org.onap.policy.common.ia.jpa.IntegrityAuditEntity</class>
+
+ <exclude-unlisted-classes>false</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
+ <properties>
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:file:./sql/xacmlTest"/> <!-- ;MODE=MySQL"/> -->
+ <property name="javax.persistence.jdbc.user" value="sa"/>
+ <property name="javax.persistence.jdbc.password" value=""/>
+ <property name="javax.persistence.schema-generation.scripts.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.scripts.create-target" value="./src/main/resources/META-INF/generatedCreate.ddl"/>
+ <property name="javax.persistence.schema-generation.scripts.drop-target" value="./src/main/resources/META-INF/generatedDrop.ddl"/>
+ <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
+ <property name="javax.persistence.schema-generation.create-source" value="metadata-then-script"/>
+ <property name="javax.persistence.schema-generation.drop-source" value="script"/>
+ <property name="javax.persistence.schema-generation.drop-script-source" value="META-INF/drop.ddl" />
+ </properties>
+ </persistence-unit>
+</persistence>
diff --git a/ONAP-PAP-REST/src/main/resources/log4j.properties b/ONAP-PAP-REST/src/main/resources/log4j.properties
new file mode 100644
index 000000000..04f3233c1
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/log4j.properties
@@ -0,0 +1,71 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP-PAP-REST
+# ================================================================================
+# 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 FILE.
+#log4j.rootLogger=DEBUG, FILE, CONSOLE
+log4j.rootLogger=INFO, FILE
+
+# FILE appender
+log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FILE.File=${catalina.base}/logs/pap-rest.log
+log4j.appender.FILE.ImmediateFlush=true
+log4j.appender.FILE.Threshold=debug
+log4j.appender.FILE.append=true
+log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%l||%m%n
+
+# 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
+
+#
+# This is specifically for Xacml request/response logging
+#
+log4j.logger.xacml.request=INFO, REQUEST_LOG
+
+log4j.appender.REQUEST_LOG=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.REQUEST_LOG.File=${catalina.base}/logs/pap-rest-reqres.log
+log4j.appender.REQUEST_LOG.ImmediateFlush=true
+log4j.appender.REQUEST_LOG.Threshold=debug
+log4j.appender.REQUEST_LOG.append=true
+log4j.appender.REQUEST_LOG.DatePattern='.'yyyy-MM-dd
+
+log4j.appender.REQUEST_LOG.layout=org.apache.log4j.PatternLayout
+log4j.appender.REQUEST_LOG.layout.ConversionPattern=%d{yyyy_MM_dd_HH_mm_ss_SSS} %m%n
+
+#
+# audit (transaction) logging
+#
+log4j.logger.auditLogger=INFO,AUDIT_LOG
+log4j.additivity.auditLogger=false
+
+log4j.appender.AUDIT_LOG=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.AUDIT_LOG.File=${catalina.base}/logs/audit.log
+log4j.appender.AUDIT_LOG.Append=true
+log4j.appender.AUDIT_LOG.DatePattern='.'yyyy-MM-dd
+log4j.appender.AUDIT_LOG.threshold=INFO
+log4j.appender.AUDIT_LOG.layout=org.apache.log4j.EnhancedPatternLayout
+log4j.appender.AUDIT_LOG.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%X{className}|%X{timer}|%m%n
diff --git a/ONAP-PAP-REST/src/main/resources/logback.xml b/ONAP-PAP-REST/src/main/resources/logback.xml
new file mode 100644
index 000000000..28dc956f3
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/logback.xml
@@ -0,0 +1,254 @@
+<!--
+ ============LICENSE_START=======================================================
+ ONAP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+ <property name="logDir" value="logs" />
+
+ <!-- directory path for debugging type logs -->
+ <property name="debugDir" value="logs" />
+
+ <!-- specify the component name
+ <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="ONAP-PAP-REST"></property>
+
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+
+ <!-- modified time stamp format -->
+
+ <!-- A U D I T
+ <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{ElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultAuditPattern" value="%X{TransactionBeginTimestamp}|%X{TransactionEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{TransactionElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+
+
+
+ <!-- M E T R I C
+ <property name="defaultMetricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultMetricPattern" value="%X{MetricBeginTimestamp}|%X{MetricEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%p|%X{severity}|%X{serverIpAddress}|%X{MetricElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+
+
+
+
+ <!-- E R R O R
+ <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
+ -->
+ <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{requestId}|%t|%X{serviceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
+
+
+
+ <!-- D E B U G
+ <property name="debugLoggerPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n" />
+ <property name="debugLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> -->
+ -->
+ <property name="debugLoggerPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%msg%n" />
+
+
+
+ <!-- D E F A U L T
+ <property name="defaultPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|%msg%n" />
+ <property name="defaultPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ -->
+ <property name="defaultPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%c||%msg%n" />
+
+
+
+ <!-- P A T H
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+
+ -->
+ <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
+
+
+
+
+ <!-- Example evaluator filter applied against console appender -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${defaultPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <!-- ============================================================================ -->
+ <!-- EELF Appenders -->
+ <!-- ============================================================================ -->
+
+ <!-- The EELFAppender is used to record events to the general application
+ log -->
+
+ <!-- EELF Audit Appender. This appender is used to record audit engine
+ related logging events. The audit logger and appender are specializations
+ of the EELF application root logger and appender. This can be used to segregate
+ Policy engine events from other components, or it can be eliminated to record
+ these events as part of the application root log. -->
+
+ <appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${defaultAuditPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFAudit" />
+ </appender>
+
+
+
+
+<appender name="EELFMetrics"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${metricsLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
+ %msg%n"</pattern> -->
+ <pattern>${defaultMetricPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFMetrics"/>
+ </appender>
+
+
+
+
+ <appender name="EELFError"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${errorLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>ERROR</level>
+ </filter>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${defaultErrorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFError"/>
+ </appender>
+
+
+
+ <appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${debugLogDirectory}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip
+ </fileNamePattern>
+ <minIndex>1</minIndex>
+ <maxIndex>9</maxIndex>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>DEBUG</level>
+ </filter>
+ <triggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <maxFileSize>5MB</maxFileSize>
+ </triggeringPolicy>
+ <encoder>
+ <pattern>${debugLoggerPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFDebug" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+
+ <!-- ============================================================================ -->
+ <!-- EELF loggers -->
+ <!-- ============================================================================ -->
+
+ <logger name="com.att.eelf.audit" level="info" additivity="false">
+ <appender-ref ref="asyncEELFAudit" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="asyncEELFMetrics" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="error" additivity="false">
+ <appender-ref ref="asyncEELFError" />
+ </logger>
+
+ <logger name="com.att.eelf.debug" level="info" additivity="false">
+ <appender-ref ref="asyncEELFDebug" />
+ </logger>
+
+
+
+ <root level="INFO">
+ <appender-ref ref="asyncEELFDebug" />
+ <appender-ref ref="asyncEELFError" />
+ </root>
+
+</configuration>
diff --git a/ONAP-PAP-REST/src/main/resources/spring.xml b/ONAP-PAP-REST/src/main/resources/spring.xml
new file mode 100644
index 000000000..ced7ac130
--- /dev/null
+++ b/ONAP-PAP-REST/src/main/resources/spring.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP-PAP-REST
+ ================================================================================
+ 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=========================================================
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
+
+ <context:annotation-config />
+ <context:component-scan base-package="org.onap" />
+ <!-- Hibernate 4 SessionFactory Bean definition -->
+ <bean id="hibernate4AnnotatedSessionFactory"
+ class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
+ <property name="configLocation">
+ <value>classpath:hibernate.cfg.xml</value>
+ </property>
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
+ <prop key="hibernate.current_session_context_class">thread</prop>
+ <prop key="hibernate.show_sql">false</prop>
+ </props>
+ </property>
+ </bean>
+</beans>