Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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>
|
|
Change-Id: I22821a5027d01f0965c54b60389d3988ac53ed5c
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Change-Id: I8910a1a4267d824f064b52c6ad08945590bd9617
Issue-ID: POLICY-2203
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
"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>
|
|
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>
|
|
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>
|
|
Change-Id: I7234c0146ef77f685a9766bb03168e385090fd1b
Issue-ID: POLICY-1772
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Also deleted the checkstyle suppression file.
Change-Id: I51c69bce644204435fa8131c14132e0384b4e886
Issue-ID: POLICY-1909
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Additional telemetry apis for testing.
Change-Id: I60a61ffbbe86bbb0474777905de922434deabbe2
Issue-ID: POLICY-1716
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Some cleanup consolidating code in cire telemetry apis.
Issue-ID: POLICY-1687
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic5241d45eba06796192cca1e82cba5ae53dc5aaf
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Change-Id: Iea1766d5d8075394e1dccc109f4477bd2c270c36
Issue-ID: POLICY-1624
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
This is a first pass, some functionality is
missing (undeploy).
Compile error fix from changes in policy/models repo.
Change-Id: If448492ab665c135bace99d4d684d403e2a6be03
Issue-ID: POLICY-1624
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
They will be loaded automatically at startup.
Remove POLICY-PAP-PDP topic as is moved to a feature.
Remove PDPD-CONFIGURATION topic as it is not used.
Change-Id: I55629f885d61ce1cc4e3f24bcae5279e65a96f22
Issue-ID: POLICY-1610
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Removed OrderedService and OrderedServiceImpl from the
drools-pdp repo to use OrderedService and OrderedServiceImpl
from the common repo. All feature interfaces were updated
occordingly.
Issue-ID: POLICY-1499
Change-Id: Icc80dd1cbe73a97d4832f95ad2dad52d948b711a
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
|
|
This features provides a mechanism to extend the logback.xml
properties to add controller specific loggers. The controller's
logger will log messages from topics that the controller listens
to in a controller specific network log. The original network
log is preserved and still logs every message from every controller.
Note that the way a logger is associated with a controller is by
having the logger name match the controller's name. Any configuration
file that has "logback-include-" prepended and a ".xml" extension
will be added to the logback.xml and logback-eelf.xml files as
extensions to the base configuration.
Issue-ID: POLICY-1427
Change-Id: Iaeb823421eadb7ee413b6b03ae3dfe862f230612
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
+ support multiple system properties files with variable interpolation
loaded at initialization
+ support of configurable JVM options (-X, etc ..).
+ rearrange aaf configuration to avoid {{}} installation variables
and use dynamic enviroment variables.
+ miscellaneous clean up in areas touched and checkstyle.
Change-Id: I71ad839778e17eb57c098a2c5cc2bf96e468669a
Issue-ID: POLICY-1524
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
The refactoring of the JsonProtocolFilter allows for complex filter
queries for JSON events coming in on network topics. The underlying
library used is json-path, which supports path based searching and
ruby regex filtering at any level of the JSON document.
The JsonProtocolFilter no longer requires a FilterRule class as one
json-path filter can contain multiple constraints using "&&" or "||".
This eliminates the need to identify the field name as a key with a
regex associated with it in the controller properties file (see the
original FilterRule implementation). It also simplifies the parsing
needed in the DroolsControllerFactory when extracting the filter
property and creating the JsonProtocolFilter.
JUnit coverage is 100% and all sonar flags were addressed related to
the JsonProtocolFilter class. Tested and verified working with the
telemetry API in a locally deployed PDP-D.
Change-Id: I8bd63db4e497c1ba0b5044b5449ccb7a9e4dbdbc
Issue-ID: POLICY-1489
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
Added jackson-like Gson annotations to policy-management classes.
Also added tests to verify that the classes serialize the same
with gson as with jackson.
Removed some trailing spaces.
Replaced tabs and adjusted spacing in json files.
Removed trailing newlines.
Updated license data per review comment.
Fixed merge conflict.
Added files that were inadvertently deleted.
Change-Id: Ib546e70f9d9d83187a6a93ff5c634000c4d53da5
Issue-ID: POLICY-1431
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Coders came in pairs, one for GSON and one for Jackson. Replaced the
pairs with a single coder for GSON.
Simplified list copy.
Removed multipleToolsetRetries flag.
Removed additional jackson code. It had been removed, but the changes
were somehow lost.
Simplified another list copy.
Updated license dates.
Note: the date in PolicyEngineTest will be updated via a
different review (mgmt-gson).
Change-Id: Id3c7688c2389d194f66afcefa14303cf403ada16
Issue-ID: POLICY-1431
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The rule writer at design time can embed the domain base model(s) supported
at design time.
This information can be extracted at runtime to match a controller with the
domain/model functionality that it can support.
Change-Id: I7f7f1320d7d601d50949d0cd09bc48982c222333
Issue-ID: POLICY-1500
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Modify protocol coder to fix sonar issue about method
params too many. Using existing builder. Address review
comments, replace modified with modification
Issue-ID: POLICY-1251
Change-Id: I67bd753f346108865404b733e7cf6008c2012766
Signed-off-by: krisjinka <kris.jinka@samsung.com>
|
|
|
|
Add method in Eventprotocolcoder uses more params than
allowed causing sonar issue, use builder object instead
Modify javadoc and tostring methods based on review comments
Issue-ID: POLICY-1251
Change-Id: I6f283135560bfa61ca9d9512f5c971d118d7e071
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
|
|
Also merged changes from 'Rename test classes in drools-pdp'.
Change-Id: I4d0a3a1b0b5523eadf38d1edb5aa86c404b69d19
Issue-ID: POLICY-1288
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modify decoder to use param object for sonar issue fix
Issue-ID: POLICY-1251
Change-Id: Iae68ba276f02be51058037b56d901a131b25838e
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
|
|
Use builder object to send params to event protocol
coder and encoder methods to fix sonar issue
Issue-ID: POLICY-1251
Change-Id: I6ca5823e1aa35d9aa3a05eb23ac159947efdde23
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
|
|
The intent is to reduce configuration options and
automatically set up the authorization filter
(that will complement the authentication filter
that the policy-endpoints common framework automatically
provides).
Previously to enable the AAF authorization filter,
it will need the configuration had to kept track of
AAF flag, and the "filterClasses" property configuration,
make a bit more difficult to keep them sync, and easily
turn on/off AAF.
Change-Id: I3d59de6fa83986c5dcb6b3d38077278b8e75689a
Issue-ID: POLICY-1216
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Also fixed a typo in a test comment.
Change-Id: I4ad72cc7c103014e6f5920f912c862560af5a331
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added coverage for PolicyControllerFactory and AggregatedPolicyController.
Fixed some typos in comments.
Reformatted some code.
Change-Id: I33aea8e1e7dde29bd51218d0ecad7b34047b33e5
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed last remaining checkstyle issues along with
setting the pom.xml to the correct path setting.
Fixed forbidden summary fragments, not allowed
to prepend summary with "This method returns"
Issue-ID: POLICY-1153
Change-Id: I267842080494132a7b5507731e14f027a3f6fe44
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
AAF is disabled by default until pairwise testing is completed.
Change-Id: Ica83873a2605742689ed0c2e06dfade20bef8bf0
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
The submodule policy-management checkstyle fixes. There may be
one or two sonar fixes in there.
Issue-ID: POLICY-882
Change-Id: I9cb43c573c6811dd058943650ba1ea5f6dc880aa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Modified code to explicitly check for missing drools object, and
to not throw an exception during MDC setup.
Change-Id: Iac16f2fc46e2ffff03195985383b09b814fa4008
Issue-ID: POLICY-1082
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modify pdp drools system component files to fix basic
Java warnings from analysis tools. Possibly flagged by
Sonar tool as well.Rework based on comments
Issue-ID: POLICY-1017
Change-Id: I1f2a5d727d2673cade5f69a07f708e16754c78e4
Signed-off-by: krisjinka <kris.jinka@samsung.com>
|
|
Issue-ID: POLICY-967
Change-Id: Ib19d3a89ffa328c39f7871bff59efb3dd1617f7a
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
Removed policy-endpoints, and 3 classes from policy-core. Replaced
refenences to the deleted classes with references to the corresponding
classes in policy-common
Issue-ID: POLICY-967
Change-Id: I547cde4894424b8f40b7ddd4e2342ebb729cb588
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
More sonar cleanup. Resolved some of the simpler issues.
Issue-ID: POLICY-728
Change-Id: If9c4718f10c6d3524239d2a05c09badb791ef2f0
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|