policy/drools-pdp.git
4 years agoMerge "Do not hardcode io.fabric8 plugin"
Pamela Dragosh [Mon, 11 Nov 2019 16:21:41 +0000 (16:21 +0000)]
Merge "Do not hardcode io.fabric8 plugin"

4 years agoMerge "Detemine number of nexus repos to support"
Jorge Hernandez [Mon, 11 Nov 2019 14:58:06 +0000 (14:58 +0000)]
Merge "Detemine number of nexus repos to support"

4 years agoDo not hardcode io.fabric8 plugin 04/98204/1
Pamela Dragosh [Fri, 8 Nov 2019 19:51:59 +0000 (14:51 -0500)]
Do not hardcode io.fabric8 plugin

policy/parent now has this plugin defined

Issue-ID: POLICY-2222
Change-Id: I35942b21ff4863c844023400d55be1a6177acb76
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoDetemine number of nexus repos to support 68/98068/7
Peyton Puckett [Wed, 6 Nov 2019 17:47:31 +0000 (11:47 -0600)]
Detemine number of nexus repos to support

Modify RepositoryAudit.java to determine number of
additional reposities to support as defined in the
feature-state-management.properties file

Issue-ID: POLICY-2035
Change-Id: I31edae42025a8167e242535da6eb41c15228bac8
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoMerge "Fix new sonar issues in RestManager"
Pamela Dragosh [Fri, 8 Nov 2019 12:54:46 +0000 (12:54 +0000)]
Merge "Fix new sonar issues in RestManager"

4 years agoFix new sonar issues in RestManager 78/98078/1
Jim Hahn [Wed, 6 Nov 2019 21:38:19 +0000 (16:38 -0500)]
Fix new sonar issues in RestManager

Eliminated duplicate code issues.  Unfortunately, introduced new
sonar issues with lambda expressions.

Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ib5853fab6135d2177da449ef6261a352ee4f203e

4 years agoDrools Controller upgrades Tests 72/98072/4
jhh [Wed, 6 Nov 2019 19:38:31 +0000 (13:38 -0600)]
Drools Controller upgrades Tests

Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6963fced5608b62a41b73fef5070c21cf45d6fbe
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Fix duplicate code in drools-pdp RestManager"
Liam Fallon [Wed, 6 Nov 2019 17:47:53 +0000 (17:47 +0000)]
Merge "Fix duplicate code in drools-pdp RestManager"

4 years agoAddress drools-pdp sonar issues 48/98048/2
Jim Hahn [Wed, 6 Nov 2019 11:57:50 +0000 (06:57 -0500)]
Address drools-pdp sonar issues

Addressed more sonar issues in drools-pdp:
- unwrap multiple instances of the same annotation (NamedQuery)
- use lambda instead of anonymous class
- duplicate code; addressed by using annotation instead of toString.
  This still leaves other duplicate code.

Issue-ID: POLICY-2203
Change-Id: I8c6ff6562820af638044f134eb8a6725a5f05e8e
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix duplicate code in drools-pdp RestManager 52/98052/1
Jim Hahn [Wed, 6 Nov 2019 13:28:36 +0000 (08:28 -0500)]
Fix duplicate code in drools-pdp RestManager

Change-Id: I22821a5027d01f0965c54b60389d3988ac53ed5c
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix syntax error in DistributedLock "DELETE" 79/97979/1
Jim Hahn [Tue, 5 Nov 2019 19:47:08 +0000 (14:47 -0500)]
Fix syntax error in DistributedLock "DELETE"

Changed the "DELETE" to "DELETE FROM" to fix this error:
  You have an error in your SQL syntax; check the manual that corresponds
  to your MariaDB server version for the right syntax to use

Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I10a398c13dc3da547d2b3ea47564ab0d5761a2ee

4 years agoUse jersey dependencies from policy-endpoints 15/97915/1
liamfallon [Mon, 4 Nov 2019 14:35:34 +0000 (14:35 +0000)]
Use jersey dependencies from policy-endpoints

There is no need to ahve Jersey dependencies in the PDP POMs as they are
inherited fromt he policy-endpoints POM.

Issue-ID: POLICY-2209
Change-Id: Iaa51995864eec0bf5b4134719c32e956295084a1
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd common Jersey version 49/97849/4
liamfallon [Fri, 1 Nov 2019 12:01:13 +0000 (12:01 +0000)]
Add common Jersey version

Add a common version of Jersey for all Policy Framework components.

Issue-ID: POLICY-2209
Change-Id: Iab5a62475eb73b5e4db8a02cfa029002a7f5f8ea
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Refactor duplicate code from lock managers"
Jorge Hernandez [Fri, 1 Nov 2019 13:21:07 +0000 (13:21 +0000)]
Merge "Refactor duplicate code from lock managers"

4 years agoRefactor duplicate code from lock managers 05/97805/4
Jim Hahn [Wed, 30 Oct 2019 20:28:55 +0000 (16:28 -0400)]
Refactor duplicate code from lock managers

Change-Id: I8910a1a4267d824f064b52c6ad08945590bd9617
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoupgrade to 7.28.0.Final drools libraries 02/97802/3
jhh [Thu, 31 Oct 2019 16:36:17 +0000 (11:36 -0500)]
upgrade to 7.28.0.Final drools libraries

commons-lang does not seem to be packaged anymore
(commons-lang3 still does, which is the desired one).

There are some @SupressWarning that seem to have no effect
that were removed.

Some libraries that were explicitly added are transitively
used now in the latest version of drools, hence some rework
in the dependency and exclude sections.   We will need to
generate a clm report to verify.

Issue-ID: POLICY-1407
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I44e09183caca72f5f33bdec0b8fa88b0b4793055
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Provide a way to trigger Drools rules when an update occurs"
Liam Fallon [Thu, 31 Oct 2019 16:23:30 +0000 (16:23 +0000)]
Merge "Provide a way to trigger Drools rules when an update occurs"

4 years agoProvide a way to trigger Drools rules when an update occurs 34/97634/4
Straubs, Ralph (rs8887) [Mon, 28 Oct 2019 12:49:56 +0000 (07:49 -0500)]
Provide a way to trigger Drools rules when an update occurs

An instance of 'DroolsInitFeature.Init' is inserted into a Drools
session when it is initialized, updated, or restored from
persistent data. This provides an opportunity to catch more
initialization scenarios than you can with an empty 'when' clause.

Updates:

1) Change 'DroolsInitFeature' to use Policy Engine scheduled executor

2) Add new test to 'DroolsInitFeatureTest' to verify that the 'Init'
   object is inserted into and deleted from Drools memory

3) Remove trailing spaces

Issue-ID: POLICY-1948
Change-Id: I4748c2415c4563e98b4a53d573c9ebe1e96e8e34
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
4 years agoFix more sonar issues in drools-pdp 70/97770/1
Jim Hahn [Wed, 30 Oct 2019 18:47:54 +0000 (14:47 -0400)]
Fix more sonar issues in drools-pdp

Sonar issue fixed:
- log or rethrow exception
- empty code block; moved the comment inside the empty "synchronized" block

Change-Id: I55ca87a321b3a1e4079dae6d5a4d44b651cb3086
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix new sonar issues in drools-pdp 05/97705/1
Jim Hahn [Tue, 29 Oct 2019 19:12:39 +0000 (15:12 -0400)]
Fix new sonar issues in drools-pdp

Did not address duplicate code issues.

Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I304a02dbe9b1425df38abae815df0cff8faa0692

4 years agoCleanup eclipse warnings in drools-pdp 95/97695/1
Jim Hahn [Tue, 29 Oct 2019 16:37:37 +0000 (12:37 -0400)]
Cleanup eclipse warnings in drools-pdp

Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I3e854b1ea1986cd4992dc2ff84d799e970e443a9

4 years agoMerge "Allow encrypted property values"
Jorge Hernandez [Fri, 25 Oct 2019 15:34:59 +0000 (15:34 +0000)]
Merge "Allow encrypted property values"

4 years agoSymmetric Key configuration 79/97579/1
jhh [Thu, 24 Oct 2019 21:19:09 +0000 (16:19 -0500)]
Symmetric Key configuration

Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I58de93f031bd6482f928be70fc7114ad0a04f0a5

4 years agoHandle DB error codes in distributed locking 50/97550/1
Jim Hahn [Thu, 24 Oct 2019 14:17:07 +0000 (10:17 -0400)]
Handle DB error codes in distributed locking

The commons library wraps the SQLExceptions within its own SQLException,
so changed the code to simply look for a cause that's SQLTransientException,
eliminating the need to check specific error codes.  Deleted the error
code property now that it is no longer needed.
Also updated the distributed locking properties to include examples.

Issue-ID: POLICY-2113
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If46e85a81cfc952e561174fea670df81efb8309a

4 years agoAllow encrypted property values 29/97229/6
jhh [Thu, 17 Oct 2019 02:30:26 +0000 (21:30 -0500)]
Allow encrypted property values

Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0317a6de838d99b579638252859e42fc49cedfa8
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoReimplement Lock API using Lock objects 97/96197/27
Jim Hahn [Tue, 24 Sep 2019 14:51:21 +0000 (10:51 -0400)]
Reimplement Lock API using Lock objects

Modified PolicyResourceLockManager to just return a feature, deferring
the lock() call/method to the feature, itself.  The manager was also
modified so that, if it can't find an enabled provider, it will return
a default provider, whose lock() methods always fail.  Once a feature
has been identified, the manager will cache it for use thereafter.

Modified the feature API to return lock objects and simplified the
interface to remove the beforeXxx and afterXxx methods.
Moved the unlock and refresh methods from the feature API into the
lock class, renaming them to free and extend, respectively.
Added a separate, feature-simple-locking project, which implements
a simple version of the locking feature, over a single JVM.
Extensively revised the distributed locking feature to fit in with
the new API.

Added support for persistence so that the various LockImpl classes
can be serialized and still function correctly when they are
deserialized back into new feature instances
Added default implementations of free & extend to LockImpl.
Modified API to take the ownerKey string, instead of the owner object.
Removed Extractor as unneeded - may add via another review, if still useful.

Updates per review comments:
- Updated licenses in feature-simple-locking
- Added beforeCreateLock & afterCreateLock to feature API
- Moved SimpleLockingFeature into policy-management so that it's
  always available
- Moved the executor service, "exsvc", into PolicyEngine
- Moved Extrator into policy-utils
- Changed Extractor logging level for exceptions
- Fixed feature sequence numbers
- Fixed mixing of seconds and milliseconds
- Renamed exsvc
- Modified to use property method with default value
- Configured scheduled executor
- Added suffix to Extractor.register()
- Eliminated Feature Api and tied lock manager into engine
- Added non-null checks to LockImpl parameters
- Added non-null checks to createLock() parameters
- Checked that lockManager is initialized

Change-Id: Iddba38157ddc5f7277656979c0e679e5489eb7b1
Issue-ID: POLICY-2113
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Add 'PolicySession.insertDrools' method"
Jorge Hernandez [Tue, 15 Oct 2019 16:19:01 +0000 (16:19 +0000)]
Merge "Add 'PolicySession.insertDrools' method"

4 years agoAdd 'PolicySession.insertDrools' method 84/96884/2
Straubs, Ralph (rs8887) [Thu, 10 Oct 2019 12:48:14 +0000 (07:48 -0500)]
Add 'PolicySession.insertDrools' method

This change includes feature hooks, so a "smart insert" could forward
the object to a remote host, and do the insert there. The methods 'insert'
and 'insertAll' in 'PolicyContainer' now make use of this smart insert.

Change-Id: I69f0e874b6fda09d1f457e4353e4b30d63696210
Issue-ID: POLICY-2160
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
4 years agoReplace protobuf-java 2.6.0 dependency with 3.6.1 67/96867/2
Bruno Sakoto [Thu, 10 Oct 2019 14:02:21 +0000 (10:02 -0400)]
Replace protobuf-java 2.6.0 dependency with 3.6.1

This change fixes protobuf-java library conflict when running policy
because of presence of 2.6.0 and 3.6.1 librairies in pdp docker
container.

Issue-ID: POLICY-2088
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Ifcebf2207dc54543083d080151e0685d51792be5

4 years agoModify property files in active-standby-management 92/96592/3
Peyton Puckett [Thu, 3 Oct 2019 15:47:09 +0000 (10:47 -0500)]
Modify property files in active-standby-management

Remove ${env:} and update property syntax
Add new property failure.threshold
Add new property interval_sec
Update: change property syntax back to using ${env:}
Update: add 2019 to copyright information

Issue-ID: POLICY-2031
Change-Id: I6db10700189197a1306c3b8fa23dff26518be0f3
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoAdd encoding declaration to pom.xml 63/96563/2
Peyton Puckett [Mon, 30 Sep 2019 19:28:14 +0000 (14:28 -0500)]
Add encoding declaration to pom.xml

Small pom change to add encoding declaration
Remove two trailing spaces
Update: remove additional trailing spaces

Issue-ID: POLICY-2036
Change-Id: I326e2cae576c53ee14150a28d6826d675f470578
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoRemove windows carriage return 08/96508/1
Peyton Puckett [Wed, 2 Oct 2019 13:29:51 +0000 (08:29 -0500)]
Remove windows carriage return

Remove windows CR from code in feature-controller-logging/
Remove windows CR from code in feature-mdc-filters/

Issue-ID: POLICY-2032
Change-Id: I9779f6907fb5a50ab6129969081c2228ce91d3a7
Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
4 years agoAddress junit failure in active-standby 92/96092/1
Jim Hahn [Thu, 19 Sep 2019 21:58:19 +0000 (17:58 -0400)]
Address junit failure in active-standby

In testLocking1(), the sleep() call after the final demote() was
allowing the background FPManager thread to re-promote the PDP before
the next test in the test case.  Removed the sleep() call, thus
preventing it from being re-promoted before the test.  As that's
the last test in that particular test case, it shouldn't cause a
problem.
In the process of diagnosing and fixing the problem, made the
additional changes below.
Made each junit runnable independently so that background threads
could be terminated and started afresh with each test.
Decreased the maximum "real" wait time of the tests, as the
main thread only needs to wait an instant for the other threads
to fire.
Modified code to use common entity manager factories rather than
creating them for each test.
Deleted unnecessary sleeps at the end of tests.
Deleted unnecessary db clean-ups at the start of tests (already
done by the @Before method.

Change-Id: Ia9f1053be564d85f1b29e47379ab184ffdbac235
Issue-ID: POLICY-2080
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd YAML support to drools-pdp rest servlets 83/95683/4
Jim Hahn [Fri, 13 Sep 2019 21:31:46 +0000 (17:31 -0400)]
Add YAML support to drools-pdp rest servlets

Drools-pdp depends on some of the GsonJackson annotations that cannot
be easily worked around via standard gson.  Consequently, this continues
to use the JacksonHandler for json-encoding, thus it uses the
YamlJacksonHandler for yaml-encoding.
Added YAML to swagger "consumes" list.

Change-Id: Ic70c68bb274222db571b3515cbf1ab22d9ff2366
Issue-ID: POLICY-2081
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump versions for drools-pdp master 92/95392/1
Jim Hahn [Tue, 10 Sep 2019 15:22:40 +0000 (11:22 -0400)]
Bump versions for drools-pdp master

Change-Id: I9882ab12334dc4b548de527ab2d7dbfc22177113
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoReleasing drools-pdp 1.5.2 93/95293/1 5.0.0-ONAP
Pamela Dragosh [Tue, 10 Sep 2019 00:49:52 +0000 (20:49 -0400)]
Releasing drools-pdp 1.5.2

Releaseing 1.5.2 of drools-pdp

Issue-ID: POLICY-2045
Change-Id: I874b50d95ec94f784ebe5348f90cc23460f2114d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to released artifacts 84/95284/1
Pamela Dragosh [Mon, 9 Sep 2019 23:45:41 +0000 (19:45 -0400)]
Upgrade to released artifacts

Released artifacts are parent, common and models

Issue-ID: POLICY-2045
Change-Id: I8cc38806d25887c8af1a1c7580e50741e968e4f1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoSplit Engine start method into "start" and "open" 88/94988/2
jhh [Thu, 5 Sep 2019 02:26:56 +0000 (21:26 -0500)]
Split Engine start method into "start" and  "open"

"open" meaning to open external configuration interfaces
to external provisioning systems.

Issue-ID: POLICY-2055
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic984f0ebccd088503b6b13620c3b80ed8e640899
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoMerge "Remove AlertSeverity from logback in drools-pdp"
Jorge Hernandez [Fri, 30 Aug 2019 12:37:14 +0000 (12:37 +0000)]
Merge "Remove AlertSeverity from logback in drools-pdp"

4 years agoRemove AlertSeverity from logback in drools-pdp 69/94369/3
Jim Hahn [Tue, 27 Aug 2019 18:37:50 +0000 (14:37 -0400)]
Remove AlertSeverity from logback in drools-pdp

Merged severity and AlertSeverity in the MDC, and updated the
logback xml files accordingly.
The logback patterns for the metrics log had a place for
both Severity and AlertSeverity; the latter was replaced with an
empty place-holder so-as to maintain the same position for
the other fields.

Change-Id: Ic0977e1133cc4219394f2d71ca8ebae080620e0b
Issue-ID: POLICY-1989
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoremove staging profile from settings.xml 29/94629/1
jhh [Thu, 29 Aug 2019 18:37:52 +0000 (13:37 -0500)]
remove staging profile from settings.xml

Issue-ID: POLICY-1371
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I969b69386f307669d0d5f70e8618f0e56552d133

4 years agooptionally source .conf files 15/94315/1
jhh [Tue, 27 Aug 2019 00:42:15 +0000 (19:42 -0500)]
optionally source .conf files

.conf files are now optional as environment
variables can be used instead without needing
a .conf.

Issue-ID: POLICY-1371
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2cec20fe40d3bfd020e40c9925760de022d4ef34

4 years agoMerge "update keystore"
Pamela Dragosh [Fri, 23 Aug 2019 12:52:08 +0000 (12:52 +0000)]
Merge "update keystore"

4 years agoupdate keystore 74/94174/2
jhh [Fri, 23 Aug 2019 03:38:12 +0000 (22:38 -0500)]
update keystore

Issue-ID: POLICY-1988
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia823e0439a0749719118a18e296c70cce501b968
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoUse pseudo time for junits 53/94053/3
Jim Hahn [Wed, 14 Aug 2019 21:31:50 +0000 (17:31 -0400)]
Use pseudo time for junits

Modified feature-active-standby-management and feature-lifecycle
to be able to use TestTimeMulti, eliminating the need for sleep()
calls in the junit tests and speeding the tests up significantly.
Also modified feature-active-standby-management to use a memory DB
for its junit tests.

Change-Id: I6d7ae61bb73cbb19ff405b8d9fb660e92732edbb
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix more sonar issues in drools-pdp 85/93585/2
Jim Hahn [Wed, 14 Aug 2019 21:31:50 +0000 (17:31 -0400)]
Fix more sonar issues in drools-pdp

Addressed issues of cyclomatic complexity and deep nesting by
refactoring code into separate methods.  In some cases, had to
refactor the code into nested classes to avoid passing too many
parameters to the newly extracted methods.
Addressed issue "too many conditionals" by breaking conditionals
apart.
Addressed issue "Remove usage of generic wildcard type" by eliminating
"? extends" from return values.
Addressed issue "Remove this use of 'Thread.sleep()'" in junit tests
by introducing latches or using Awaitility.

Note: this won't build until ApiUtils has been merged.

Change-Id: I0d5596b4cb918a36bc22f426f426bd238195b458
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix sonar issues in drools-pdp 36/92736/9
Jim Hahn [Mon, 5 Aug 2019 19:27:16 +0000 (15:27 -0400)]
Fix sonar issues in drools-pdp

Address sonar issue, "Move constants to a class or enum", by
moving them from interfaces to classes:
  ActiveStandbyFeatureApi
  StateManagementFeatureApi
  PolicyResourceLockFeatureApi
  PolicySessionFeatureApi
  DroolsController
  DroolsControllerFeatureApi
  PolicyControllerFeatureApi
  PolicyEngineFeatureApi
  HealthCheck
  SystemPersistence
  EventProtocolCoder
  PolicyController
  PolicyEngine
  TestTransaction
  MdcTransaction
Address sonar issue, "Move constants to a class or enum", by
change the interface to a class:
  DroolsProperties
Address sonar issue, "Override the "equals" method in this class", by
adding equals & hashCode to:
  DroolsPdpEntity
  DroolsPdpImpl
Use lombok for a number of getters & setters.
Address sonar issue, "Define a constant instead of duplicating this
literal" in:
  DroolsPdpsElectionHandler
  JpaDroolsPdpsConnector
  MavenDroolsController
  GenericEventProtocolCoder
  GsonProtocolCoderToolset
  RestManager
Address sonar issue, "Remove the parentheses around the parameter" in:
  MavenDroolsController
Address sonar issue, "Replace this lambda with a method reference" in:
  LifecycleFsm
Address sonar issue, "Move this constructor to comply with Java Code
Conventions" in:
  LifecycleStateRunning
Address sonar issue, "Replace this 'switch' statement by 'if'
statements to increase readability", as specified in:
  PolicyEngineManager
Address sonar issue, "Rename field to prevent any misunderstanding/clash
with field" in:
  MdcTransactionImpl
Address sonar issue, "Either log or rethrow this exception", in:
  RestManager
Address sonar issue, "Rename this constant name to" uppercase, by
replacing enums with static lists in:
  RestManager
Addressed review comments:
  Fixed license dates.
  Renamed getSiteName/setSiteName methods to getSite/setSite in
  the interface to match the field names in the implementation
  classes.
  Renamed *Instance classes to *Constants.
  Next round of review comments.

Change-Id: I1c26af9f194833dd773f2b25dc5f60cde163201c
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoUpgrade to snapshot integration parent artifact 70/93070/1
Bruno Sakoto [Thu, 8 Aug 2019 12:33:42 +0000 (08:33 -0400)]
Upgrade to snapshot integration parent artifact

Issue-ID: POLICY-1603
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I90268bbb34d0ab6b5597b47a18671e7c4f0b2dfe

4 years agoBump version of drools-pdp 49/92949/5
Jim Hahn [Wed, 7 Aug 2019 19:17:36 +0000 (15:17 -0400)]
Bump version of drools-pdp

Updated the remaining *.pom files.
Updated java test file that uses the version.
Changed versions in *.pom files to all be 1.0.0.

Change-Id: Ia75cdfa5704b1e16b3c78e0257e619cd41220f93
Issue-ID: POLICY-1965
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd release 1.5.1 file 36/92836/1
jhh [Tue, 6 Aug 2019 19:39:22 +0000 (14:39 -0500)]
Add release 1.5.1 file

Issue-ID: POLICY-1953
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I128189bf37b5742c4a80db52cd2b923a96d8fcd8

4 years agoUpdate to latest common/models released versions 90/92690/3
jhh [Mon, 5 Aug 2019 14:20:43 +0000 (09:20 -0500)]
Update to latest common/models released versions

policy/models: 2.1.2
policy/common: 1.5.1

Issue-ID: POLICY-1953
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id9c8f91d85248e2431175ffe4f0808b7157ec402

4 years agoExpand AAF_NS in properties to onap.org.osaaf.aaf 11/92411/2
jhh [Wed, 31 Jul 2019 20:22:05 +0000 (15:22 -0500)]
Expand AAF_NS in properties to onap.org.osaaf.aaf

Change-Id: I2e8f887093f9ba3e1fd9c5038dd4ad41d2a5c4c7
Issue-ID: POLICY-1959
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoFix junit broken by new addTopic(List) method 22/92422/1
Jim Hahn [Wed, 31 Jul 2019 22:18:08 +0000 (18:18 -0400)]
Fix junit broken by new addTopic(List) method

Addition of new TopicEndpoint.addTopic() method resulted in errors
like the following in drools-pdp:
  [ERROR] ... reference to addTopicSources is ambiguous
  both method addTopicSources(Properties)
  and method addTopicSources(List<TopicParameters>)
  match
Fixed the junits to disambiguate the method invocation.

Change-Id: Ibd648412f22290099c1213e9a1b45ab34bcbb859
Issue-ID: POLICY-1953
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Sonar ignored test"
Jim Hahn [Fri, 26 Jul 2019 15:01:35 +0000 (15:01 +0000)]
Merge "Sonar ignored test"

4 years agoMerge "Add lombok.config to drools-pdp"
Jorge Hernandez [Fri, 26 Jul 2019 14:18:52 +0000 (14:18 +0000)]
Merge "Add lombok.config to drools-pdp"

4 years agoSonar ignored test 20/92120/1
Jim Hahn [Fri, 26 Jul 2019 13:59:41 +0000 (09:59 -0400)]
Sonar ignored test

Renaming test file in an attempt to get sonar to include it.

Change-Id: I72ecc4255e45dabeec0ce86f8be5ce7daa8cb999
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd lombok.config to drools-pdp 09/92109/1
Jim Hahn [Fri, 26 Jul 2019 13:06:14 +0000 (09:06 -0400)]
Add lombok.config to drools-pdp

This prevents sonar from checking lombok annotations for code coverage.

Change-Id: I3458f76623a353d5ff0e900ce74aa1c80aa9cc66
Issue-ID: POLICY-1938
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd coverage to MavenDroolsController 55/92055/2
Jim Hahn [Thu, 25 Jul 2019 13:49:44 +0000 (09:49 -0400)]
Add coverage to MavenDroolsController

Change-Id: I7234c0146ef77f685a9766bb03168e385090fd1b
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Add coverage to feature-active-standby-management"
Pamela Dragosh [Thu, 25 Jul 2019 13:06:20 +0000 (13:06 +0000)]
Merge "Add coverage to feature-active-standby-management"

4 years agoAdd junit coverage to feature-mdc-filters 72/91972/2
Jim Hahn [Wed, 24 Jul 2019 21:03:32 +0000 (17:03 -0400)]
Add junit coverage to feature-mdc-filters

Change-Id: Idb1946c60d550deece25d2cc74131242ccc4c376
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd coverage to feature-active-standby-management 66/91966/1
Jim Hahn [Wed, 24 Jul 2019 17:19:28 +0000 (13:19 -0400)]
Add coverage to feature-active-standby-management

Also removed some logger.isXxx() tests, which should reduce the
number of branches that need to be tested.
Removed unneeded objects and methods from feature-lifecyle.

Change-Id: Ic3eb9c0b63a2ad5585846525eb0ebda81fc55d5e
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd junit coverage to drools-pdp 54/91954/3
Jim Hahn [Wed, 24 Jul 2019 15:15:51 +0000 (11:15 -0400)]
Add junit coverage to drools-pdp

Change-Id: I253d3e85a08b893e7a9b168d92752205bcc459f6
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fix checkstyle issues in feature-active-standby-management"
Ram Krishna Verma [Thu, 18 Jul 2019 15:28:32 +0000 (15:28 +0000)]
Merge "Fix checkstyle issues in feature-active-standby-management"

4 years agoFix checkstyle issues in feature-active-standby-management 92/91192/2
Jim Hahn [Wed, 10 Jul 2019 21:09:05 +0000 (17:09 -0400)]
Fix checkstyle issues in feature-active-standby-management

Also deleted the checkstyle suppression file.

Change-Id: I4a70c7abc8d73803c54a5c9353c7f460f815b4f0
Issue-ID: POLICY-1903
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoRename lock XxxAPI to XxxApi in META-INF 76/91676/1
Jim Hahn [Thu, 18 Jul 2019 13:30:17 +0000 (09:30 -0400)]
Rename lock XxxAPI to XxxApi in META-INF

Change-Id: Ie90d8a9311378359a11d9126245d6ab8fc37fc9f
Issue-ID: POLICY-1074
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in api-state-management 94/91194/5
Jim Hahn [Wed, 10 Jul 2019 19:58:09 +0000 (15:58 -0400)]
Fix checkstyle issues in api-state-management

Also deleted the checkstyle suppression file.

Change-Id: Ib43a75c2e214db61a75173be095c380c7c7488f1
Issue-ID: POLICY-1902
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in api-active-standby-management 84/91184/3
Jim Hahn [Wed, 10 Jul 2019 19:42:40 +0000 (15:42 -0400)]
Fix checkstyle issues in api-active-standby-management

Also deleted the checkstyle suppression file.

Change-Id: I3518f29c75061dced8f507b274388f7588859037
Issue-ID: POLICY-1901
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fix checkstyle issues in policy-core"
Ram Krishna Verma [Wed, 17 Jul 2019 11:18:56 +0000 (11:18 +0000)]
Merge "Fix checkstyle issues in policy-core"

4 years agoFix checkstyle issues in policy-utils 90/91190/4
Jim Hahn [Wed, 10 Jul 2019 20:52:00 +0000 (16:52 -0400)]
Fix checkstyle issues in policy-utils

Also deleted the checkstyle suppression file.

Change-Id: I51c69bce644204435fa8131c14132e0384b4e886
Issue-ID: POLICY-1909
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in policy-core 88/91188/3
Jim Hahn [Wed, 10 Jul 2019 20:39:28 +0000 (16:39 -0400)]
Fix checkstyle issues in policy-core

Also deleted the checkstyle suppression file.

Change-Id: I93e9f9154b614b56f7826ec978e1a99bd9369348
Issue-ID: POLICY-1907
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fix checkstyle issues in policy-management"
Jorge Hernandez [Tue, 16 Jul 2019 16:55:10 +0000 (16:55 +0000)]
Merge "Fix checkstyle issues in policy-management"

4 years agoMerge "Fix checkstyle issues in feature-state-management"
Jorge Hernandez [Tue, 16 Jul 2019 16:40:32 +0000 (16:40 +0000)]
Merge "Fix checkstyle issues in feature-state-management"

4 years agoMerge "Fix checkstyle issues in feature-healthcheck"
Jorge Hernandez [Tue, 16 Jul 2019 16:39:43 +0000 (16:39 +0000)]
Merge "Fix checkstyle issues in feature-healthcheck"

4 years agoFix checkstyle issues in policy-management 87/91187/3
Jim Hahn [Wed, 10 Jul 2019 20:33:41 +0000 (16:33 -0400)]
Fix checkstyle issues in policy-management

Also deleted the checkstyle suppression file.
Moved classes into their own source files per checkstyle.

Change-Id: I586223aac0e5b7623cfd7b0acfceca4742ecc013
Issue-ID: POLICY-1908-mgmt-style
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in feature-state-management 91/91191/2
Jim Hahn [Wed, 10 Jul 2019 21:00:11 +0000 (17:00 -0400)]
Fix checkstyle issues in feature-state-management

Also deleted the checkstyle suppression file.

Change-Id: I41adf8c09fe0613134876976c6aadd193e38fbaa
Issue-ID: POLICY-1905
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in feature-test-transaction 86/91186/1
Jim Hahn [Wed, 10 Jul 2019 20:19:44 +0000 (16:19 -0400)]
Fix checkstyle issues in feature-test-transaction

Also deleted the checkstyle suppression file.

Change-Id: If3eaadfbbd9b6a7942d514af78018b987d94fe4c
Issue-ID: POLICY-1906
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix checkstyle issues in feature-healthcheck 85/91185/1
Jim Hahn [Wed, 10 Jul 2019 20:10:49 +0000 (16:10 -0400)]
Fix checkstyle issues in feature-healthcheck

Also deleted the checkstyle suppression file.

Change-Id: I44b5eaac4b75a7fc2186066d2bb109752a9e2e0f
Issue-ID: POLICY-1904
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix drools-pdp due to sonar changes in common 43/91043/2
Jim Hahn [Mon, 8 Jul 2019 14:21:36 +0000 (10:21 -0400)]
Fix drools-pdp due to sonar changes in common

Fixed breakages due to changes made in policy/common to satisfy
sonar.

Change-Id: I26a38340707b2903e089350c31c5dfdb5c019ee0
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpgrade to common/models snapshot 02/90802/1
Pamela Dragosh [Tue, 2 Jul 2019 18:13:51 +0000 (14:13 -0400)]
Upgrade to common/models snapshot

Keep in step with these artifacts to avoid multiple versions
loading during runtime.

Issue-ID: POLICY-1737
Change-Id: I4f3c46ed7da969abf5d517e88a5221d10287c75e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoBump drools-pdp to 1.5.1-SNAPSHOT 77/90677/1
Pamela Dragosh [Fri, 28 Jun 2019 17:49:05 +0000 (13:49 -0400)]
Bump drools-pdp to 1.5.1-SNAPSHOT

Released 1.5.0

Issue-ID: POLICY-1737
Change-Id: I2ebc4255aa7b03b1c402e825bfb714224fb7db84
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoRemove docker scripts 74/90474/1 1.5.0
Pamela Dragosh [Tue, 25 Jun 2019 17:35:23 +0000 (13:35 -0400)]
Remove docker scripts

These are no longer needed as the maven docker plugin is
being used.

Issue-ID: POLICY-1737
Change-Id: If0aa1fbf85b48577562bea48149f1643596c17d9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoUpgrade to release common and models 97/90397/1
Pamela Dragosh [Mon, 24 Jun 2019 15:42:20 +0000 (11:42 -0400)]
Upgrade to release common and models

Released policy/common 1.5.0 and policy/models 2.1.0

Issue-ID: POLICY-1737
Change-Id: I03ada36e643af92ff68d9b36f9e36c8389c36e66
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Improved test speed"
Jorge Hernandez [Fri, 21 Jun 2019 16:34:51 +0000 (16:34 +0000)]
Merge "Improved test speed"

5 years agoImproved test speed 93/90093/2
Krysiak Adam [Tue, 18 Jun 2019 14:44:17 +0000 (16:44 +0200)]
Improved test speed

Issue-ID: POLICY-1671
Change-Id: Ia3f9313aac1f194fd56aed9be605b590a0d51c8e
Signed-off-by: Krysiak Adam <adam.krysiak@nokia.com>
5 years agoUpgrade to release 3.0.0 parent 52/90252/1
Pamela Dragosh [Thu, 20 Jun 2019 20:13:22 +0000 (16:13 -0400)]
Upgrade to release 3.0.0 parent

Policy/parent released

Issue-ID: POLICY-1737
Change-Id: I970b0e444f046af28b0356e2011140b55ed2fd7b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoUpdate the right classname in the loggers 16/90116/2
Rashmi Pujar [Tue, 18 Jun 2019 20:56:45 +0000 (16:56 -0400)]
Update the right classname in the loggers

Issue-ID: POLICY-1791
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I57de01a329fed8ef043103f157a242f47e607452

5 years agoChange getCanonicalName() to getName() in drools-pdp 16/90016/1
Jim Hahn [Mon, 17 Jun 2019 14:42:41 +0000 (10:42 -0400)]
Change getCanonicalName() to getName() in drools-pdp

Per javadocs, getName() should generally be used instead of
Class.getCanonicalName(). This change only applies to classes; it
does not apply to File objects.

Change-Id: I28df56b3dfd0382239960d7f0f6e1131d702b2ab
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Use io.fabric8:docker-maven-plugin to build and push docker images"
Jorge Hernandez [Tue, 11 Jun 2019 14:18:21 +0000 (14:18 +0000)]
Merge "Use io.fabric8:docker-maven-plugin to build and push docker images"

5 years agoUse io.fabric8:docker-maven-plugin to build and push docker images 03/89203/9
Rashmi Pujar [Tue, 4 Jun 2019 01:45:58 +0000 (21:45 -0400)]
Use io.fabric8:docker-maven-plugin to build and push docker images

Addressed POLICY-1808 for drools-pdp to fix the tag to be major.minor-SNAPSHOT-latest

Issue-ID: POLICY-969
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I21cd6080972ddf8cf357d6c134203b92fa9eb09b

5 years agoMissing error description in error log 60/89660/1
Chou, Joseph (jc2555) [Mon, 10 Jun 2019 20:28:37 +0000 (16:28 -0400)]
Missing error description in error log

Fix a typo in default arror pattern for error description field

Issue-ID: POLICY-1838
Change-Id: I83bd932ac07a9d60945d6cecbc9cbabc443deaf3
Signed-off-by: Chou, Joseph (jc2555) <jc2555@att.com>
5 years agoRemove nexus staging plugin 34/89534/1
pdragosh [Thu, 6 Jun 2019 17:50:01 +0000 (13:50 -0400)]
Remove nexus staging plugin

Not used

Issue-ID: POLICY-1737
Signed-off-by: pdragosh <pdragosh@research.att.com>
Change-Id: I3020009b4ba8022eb7dc8f389ae7ff49eee3b33f

5 years agoBump drools-pdp to version 1.5.0 36/88936/2
Jim Hahn [Thu, 30 May 2019 16:55:01 +0000 (12:55 -0400)]
Bump drools-pdp to version 1.5.0

Change-Id: I6eb1f0e7dc2c0ac9b4f1594497c321aa57db8ecd
Issue-ID: POLICY-1747
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoUpdate INFO.yaml to add Jim and Ram 63/88263/1
liamfallon [Wed, 22 May 2019 14:42:45 +0000 (14:42 +0000)]
Update INFO.yaml to add Jim and Ram

Issue-ID: POLICY-1775
Change-Id: Ia6df04e2ac7e44140bfa61282f894ee57df1395a
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoStep snapshot version of drools-pdp 54/87854/1
liamfallon [Thu, 16 May 2019 09:39:24 +0000 (09:39 +0000)]
Step snapshot version of drools-pdp

Issue-ID: POLICY-1630
Change-Id: Ia77856077ae89f839aa930101c2002ac25f79595
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoUpgrade to release policy/models 25/87725/1 1.4.0 4.0.0-ONAP
Pamela Dragosh [Wed, 15 May 2019 00:27:36 +0000 (20:27 -0400)]
Upgrade to release policy/models

Version 2.0.0

Issue-ID: POLICY-1630
Change-Id: I0a18d4a5c52321b69757c07f48d6dd747606f9f3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoEnsure passive policies are injected when active 21/87621/2
jhh [Tue, 14 May 2019 04:31:44 +0000 (23:31 -0500)]
Ensure passive policies are injected when active

Add vim package for testing support

Change-Id: Icefcf8a57eea80b4fed97d4c63080f6159d8167a
Issue-ID: POLICY-1748
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
5 years agoUpgrade policy/parent & policy/common in drools-pdp 76/87576/1
ramverma [Mon, 13 May 2019 16:27:27 +0000 (16:27 +0000)]
Upgrade policy/parent & policy/common in drools-pdp

Change-Id: I5caa80f14e642d7c539c5b9df7da1f6770c68147
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
5 years agoTrack policies when active. 98/87198/7
jhh [Wed, 8 May 2019 01:51:34 +0000 (20:51 -0500)]
Track policies when active.

Do not honor group/subgroup changes with status messages.

When no present group/subgroups in update messages, assume that
they have to be reset.

Keep the policy cache of non-installed policies tracking them
when in passive state besides active.   Wait until go active
to enable them.

Remove legacy PAP and PDP-X healtchecks as it was basically
testing reachability.   There are conflicts with maintaining
2 different sets of PAPs and PDPs, trying to avoid it.
Alternative healtchecks are being placed on the robot test
framework.  What to healtcheck should be considered more
carefully in the near future.

Change-Id: I574f30bb5899faf521123c79046793d16b4a46e0
Issue-ID: POLICY-1748
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
5 years agorelax check in features for multiversion deps 82/86782/1
jhh [Thu, 2 May 2019 04:30:45 +0000 (23:30 -0500)]
relax check in features for multiversion deps

print a warning instead, and the base install one wins.

Change-Id: I666481e270bc03a8a7164e0fa947822d1ac8bbb6
Issue-ID: POLICY-1726
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
5 years agoEnable noop source support in controller 93/86693/1
jhh [Wed, 1 May 2019 01:00:44 +0000 (20:00 -0500)]
Enable noop source support in controller

Additional telemetry apis for testing.

Change-Id: I60a61ffbbe86bbb0474777905de922434deabbe2
Issue-ID: POLICY-1716
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>