diff options
Diffstat (limited to 'controlloop')
7 files changed, 131 insertions, 22 deletions
diff --git a/controlloop/packages/apps/src/files/apps-installer b/controlloop/packages/apps/src/files/apps-installer new file mode 100644 index 000000000..f6b27abcf --- /dev/null +++ b/controlloop/packages/apps/src/files/apps-installer @@ -0,0 +1,32 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# Apps Installation Package +# ================================================================================ +# 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 will be automatically invoked by the main pdp-d installer +# for drools applications +# + +echo "APPS INSTALL" + +# cache in local maven repo + +mvn dependency:get -Dartifact=com.att.research.xacml:xacml-pdp:1.0.0:jar diff --git a/controlloop/packages/artifacts/pom.xml b/controlloop/packages/artifacts/pom.xml index 486c55cb4..d8c0f570d 100644 --- a/controlloop/packages/artifacts/pom.xml +++ b/controlloop/packages/artifacts/pom.xml @@ -96,6 +96,12 @@ <version>${project.version}</version> <type>jar</type> </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>appclcm</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> <dependency> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>vfc</artifactId> @@ -116,6 +122,12 @@ </dependency> <dependency> <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>sdc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> <artifactId>trafficgenerator</artifactId> <version>${project.version}</version> <type>jar</type> @@ -134,6 +146,36 @@ </dependency> <dependency> <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>actorServiceProvider</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>actor.appc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>actor.appclcm</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>actor.so</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> + <artifactId>actor.vfc</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.onap.policy.drools-applications</groupId> <artifactId>policy-yaml</artifactId> <version>${project.version}</version> <type>jar</type> @@ -150,5 +192,11 @@ <version>${project.version}</version> <type>jar</type> </dependency> + <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.0</version> + <type>jar</type> + </dependency> </dependencies> </project> diff --git a/controlloop/packages/artifacts/src/assembly/zip.xml b/controlloop/packages/artifacts/src/assembly/zip.xml index e3f018d26..3c7c61973 100644 --- a/controlloop/packages/artifacts/src/assembly/zip.xml +++ b/controlloop/packages/artifacts/src/assembly/zip.xml @@ -27,7 +27,6 @@ <dependencySets> <dependencySet> <outputDirectory>artifacts</outputDirectory> - <useTransitiveDependencies>false</useTransitiveDependencies> </dependencySet> </dependencySets> </assembly> diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml index e0a967f3d..12d2b944c 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/pom.xml @@ -129,6 +129,11 @@ <version>${dependenciesVersion}</version> </dependency> <dependency> + <groupId>com.att.research.xacml</groupId> + <artifactId>xacml-pdp</artifactId> + <version>1.0.0</version> + </dependency> + <dependency> <groupId>org.onap.policy.drools-pdp</groupId> <artifactId>policy-management</artifactId> <version>${dependenciesVersion}</version> diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties index ddc70d784..18daf6a50 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties @@ -33,22 +33,22 @@ ueb.source.topics.APPC-CL.servers=${dmaapServers} ueb.source.topics.APPC-CL.apiKey= ueb.source.topics.APPC-CL.apiSecret= ueb.source.topics.APPC-CL.events=org.onap.policy.appclcm.LCMResponseWrapper -ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter=body\=.* +ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter=type\=response ueb.source.topics.APPC-CL.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson -ueb.sink.topics=APPC-CL,POLICY-CL-MGT +noop.sink.topics=APPC-CL,POLICY-CL-MGT -ueb.sink.topics.APPC-CL.servers=${dmaapServers} -ueb.sink.topics.APPC-CL.apiKey= -ueb.sink.topics.APPC-CL.apiSecret= -ueb.sink.topics.APPC-CL.events=org.onap.policy.appclcm.LCMRequestWrapper -ueb.sink.topics.APPC-CL.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson +noop.sink.topics.APPC-CL.servers=${dmaapServers} +noop.sink.topics.APPC-CL.apiKey= +noop.sink.topics.APPC-CL.apiSecret= +noop.sink.topics.APPC-CL.events=org.onap.policy.appclcm.LCMRequestWrapper +noop.sink.topics.APPC-CL.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson -ueb.sink.topics.POLICY-CL-MGT.servers=${dmaapServers} -ueb.sink.topics.POLICY-CL-MGT.apiKey= -ueb.sink.topics.POLICY-CL-MGT.apiSecret= -ueb.sink.topics.POLICY-CL-MGT.events=org.onap.policy.controlloop.VirtualControlLoopNotification -ueb.sink.topics.POLICY-CL-MGT.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty +noop.sink.topics.POLICY-CL-MGT.servers=${dmaapServers} +noop.sink.topics.POLICY-CL-MGT.apiKey= +noop.sink.topics.POLICY-CL-MGT.apiSecret= +noop.sink.topics.POLICY-CL-MGT.events=org.onap.policy.controlloop.VirtualControlLoopNotification +noop.sink.topics.POLICY-CL-MGT.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty rules.groupId=${groupId} rules.artifactId=${artifactId} diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json index 68d565dcd..356af7d99 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json @@ -10,18 +10,18 @@ "ueb.source.topics.APPC-CL.servers": "${dmaapServers}", "ueb.source.topics.APPC-CL.events": "org.onap.policy.appclcm.LCMResponseWrapper", - "ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter": "common-header=.*,status=.*", + "ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter": "type=response", "ueb.source.topics.APPC-CL.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson", - "ueb.sink.topics": "APPC-CL,POLICY-CL-MGT", + "noop.sink.topics": "APPC-CL,POLICY-CL-MGT", - "ueb.sink.topics.APPC-CL.servers": "${dmaapServers}", - "ueb.sink.topics.APPC-CL.events": "org.onap.policy.appclcm.LCMRequestWrapper", - "ueb.sink.topics.APPC-CL.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson", + "noop.sink.topics.APPC-CL.servers": "${dmaapServers}", + "noop.sink.topics.APPC-CL.events": "org.onap.policy.appclcm.LCMRequestWrapper", + "noop.sink.topics.APPC-CL.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson", - "ueb.sink.topics.POLICY-CL-MGT.servers": "${dmaapServers}", - "ueb.sink.topics.POLICY-CL-MGT.events": "org.onap.policy.controlloop.VirtualControlLoopNotification", - "ueb.sink.topics.POLICY-CL-MGT.events.custom.gson": "org.onap.policy.controlloop.util.Serialization,gson", + "noop.sink.topics.POLICY-CL-MGT.servers": "${dmaapServers}", + "noop.sink.topics.POLICY-CL-MGT.events": "org.onap.policy.controlloop.VirtualControlLoopNotification", + "noop.sink.topics.POLICY-CL-MGT.events.custom.gson": "org.onap.policy.controlloop.util.Serialization,gson", "rules.groupId": "${groupId}", "rules.artifactId": "${artifactId}", diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 3e4f76c2f..5e90f052d 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -106,12 +106,37 @@ rule "${policyName}.SETUP" params.setControlLoopYaml("${controlLoopYaml}"); insert(params); - // Note: globals have bad behavior when persistence is used, // hence explicitly getting the logger vs using a global Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); logger.info("{}: {} : YAML=[{}]", params.getClosedLoopControlName(), drools.getRule().getName(), params.getControlLoopYaml()); + + String sqlDbUsername = PolicyEngine.manager.getEnvironmentProperty("sql.db.username"); + String sqlDbPassword = PolicyEngine.manager.getEnvironmentProperty("sql.db.password"); + + String aaiUrl = PolicyEngine.manager.getEnvironmentProperty("aai.url"); + String aaiUsername = PolicyEngine.manager.getEnvironmentProperty("aai.username"); + String aaiPassword = PolicyEngine.manager.getEnvironmentProperty("aai.password"); + + String soUrl =PolicyEngine.manager.getEnvironmentProperty("so.url"); + String soUsername = PolicyEngine.manager.getEnvironmentProperty("so.username"); + String soPassword = PolicyEngine.manager.getEnvironmentProperty("so.password"); + + String vfcUrl =PolicyEngine.manager.getEnvironmentProperty("vfc.url"); + String vfcUsername = PolicyEngine.manager.getEnvironmentProperty("vfc.username"); + String vfcPassword = PolicyEngine.manager.getEnvironmentProperty("vfc.password"); + + String guardUrl =PolicyEngine.manager.getEnvironmentProperty("guard.url"); + String guardUsername = PolicyEngine.manager.getEnvironmentProperty("guard.username"); + String guardPassword = PolicyEngine.manager.getEnvironmentProperty("guard.password"); + String guardJdbcUrl = PolicyEngine.manager.getEnvironmentProperty("guard.jdbc.url"); + + logger.info("{}: {} : AAI=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), aaiUrl, aaiUsername); + logger.info("{}: {} : SO=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), soUrl, soUsername); + logger.info("{}: {} : VFC=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), vfcUrl, vfcUsername); + logger.info("{}: {} : GUARD=[{}:{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), guardUrl, guardUsername, guardJdbcUrl); + logger.info("{}: {} : DB=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), sqlDbUsername, sqlDbPassword); end /* |