diff options
author | Jorge Hernandez <jh1730@att.com> | 2017-09-14 01:55:30 -0500 |
---|---|---|
committer | Jorge Hernandez <jh1730@att.com> | 2017-09-14 15:00:40 -0500 |
commit | 403fe412004ffded378c71df3f17b022a6518442 (patch) | |
tree | 44dffde62e6461d3d758a86b6d07748916f37e77 /controlloop/templates/template.demo.v1.0.0 | |
parent | 0f7e3fb817487b85a4200eb39a5755888c5ad04b (diff) |
master lab template maintained under archetype
This is work in progress, the official pom.xml with dependencies,
drl template, and support files for controller deployment
are maintained here. In the near future the junit template
should be consolidated with this one.
Added controlloop.properties.environment, this environment file
will be populated at installation time with the lab's aai url,
etc .. and will be accessible by any drools application such as
control loops through the PolicyEngine interface. Note that PDP-D
server already supports these environment files, so it is just natural.
Therefore, this is the default mechanism to provide to applications, the url, username,
and passwords to use at runtime by the control loops for the time being.
In the future MSB could set them globally here through existing APIs,
or it can be queried by any drools application using MSB library,
doesn't matter.
There's been some trouble playing nicely with the dependencies used
by a control loop application classsloader, and the pdp-d middleware one,
causing issues between dependencies version of libraries. Specifically,
the snakeyaml library does not play well across classloader when using
constructor functionality, note that the snakeyaml libraries are pulled
also from jackson parsers used in the pdp-d. I made a change in ControlLoopProcessor
to specifically tell the "Yaml" object which classloader to use in order to
find the class with the constructor that is intended to be built, otherwise,
yaml libraries use a different classloader that does not have visibility
into the ControlLoopPolicy that is trying to construct, and fails. This also
should respect junits that use the same classloader I pressume and does not
give issues.
Change-Id: I36271d29cdbf8ff861f9c03ff91cf7116927906a
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'controlloop/templates/template.demo.v1.0.0')
3 files changed, 3 insertions, 2 deletions
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/pom.xml b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/pom.xml index 9c2634579..fdf74293e 100644 --- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/pom.xml +++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- ============LICENSE_START======================================================= - archetype-closed-loop-demo-rules + ONAP ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ @@ -26,6 +26,7 @@ <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> <version>${version}</version> + <packaging>kjar</packaging> <name>${artifactId}</name> <description>Control Loop Legacy Rules for 1.0.0</description> diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/META-INF/kmodule.xml b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/META-INF/kmodule.xml index 8116d880a..f9d166c74 100644 --- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/META-INF/kmodule.xml +++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/META-INF/kmodule.xml @@ -24,6 +24,6 @@ <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="rules"> - <ksession name="closedloop-demo"/> + <ksession name="legacy"/> </kbase> </kmodule> diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/goal.txt b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/goal.txt deleted file mode 100644 index e69de29bb..000000000 --- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/goal.txt +++ /dev/null |