summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle
AgeCommit message (Collapse)AuthorFilesLines
2020-05-26Tests must specify serialization providerJim Hahn1-1/+6
When GSON is made the default serialization provider, several junits break. Modified them to specify the GsonJackson provider, which is what the REST classes use in production. Issue-ID: POLICY-1526 Change-Id: If1bcb955d7411cf747a14a0bf1dc069b02e2f2ea Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-21Bump Drools-Pdp to 1.7.0aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ib18f045a621ce15f8381607ba87639dd188887e5
2020-05-21Bump Drools-Pdp to 1.6.4aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Icb874f6b91488c5003e9d22460ce57e37b11dc30
2020-04-24Bump drools-pdp 1.6.3-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2510 Change-Id: Ic6ce8069e65c9b7606ab3529ee6291bc772a4191 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14bump to 1.6.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-2378 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I75d0acdc4bfb4f2c1870d3c01591e81ada2b7a5f
2020-04-14native controller generates invalid propertiesjhh6-36/+166
Additional instrumetation and tests have been added as well. Issue-ID: POLICY-2489 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I65df586f3a44acf3d6f825ebfb8bd73107255a1f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-04-06Address sonar issues in drools-pdpJim Hahn7-27/+30
Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-01Sync controller capabilities as controllers bouncejhh8-95/+527
As native policies introduce temporality in policy types supported as they are removed and added, the associated policy types that can be honored at a a given time, may need to adjust. A significan portion of this review is dedicated to multi-policy junits and telemetry instrumentation. Issue-ID: POLICY-2459 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I62bbc03411446849eaa55c9b1524220dc13c2cb0 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-26native policy use engine for top-down processingjhh4-28/+66
This will ensure proper invocation of all feature hooks. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8d1666bb5e9526faa588e4f613674e080181d4ba Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-24Bump drools-pdp to 1.6.1-SNAPSHOTPeyton Puckett1-1/+1
Issue-ID: POLICY-2378 Change-Id: I59fb1860178cc7960f7aa553557d83d60b686ac6 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-03-22Fix op policies distribution to controllersjhh17-78/+726
Fix a bug when distributing a policy to the right controller plus additional junits to catch similar issues. Issue-ID: POLICY-2356 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I25fefa64ad54c55e6516ae18c6895b6de9407419 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-10policy routing and reorg into policy-domainsjhh28-1716/+493
- Native Drools Controller Policy support. - Move domain policies into the policy-domains project. - Route legacy/compliant operational policies to one or all controller supporting the policy's policy type. - Enhancements to scripts to invoke commands external to the container. Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id41f04d10a28d2ea86bdd41334e499c28d0438ae Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-03-03Undeploy support for drools policies.jhh6-16/+108
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4c5ed6752a32c9c2391cf03dd56cb2f1abc32dfd Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-27Undeploy support for native rules PDP-D policies.jhh3-73/+86
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ic829bda9dbbb54d8883df6c642c1895cd7936823
2020-02-26Undeploy support for native rules PDP-D policies.jhh8-9/+206
Issue-ID: POLICY-2388 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iaaf5e13a5db286928952bcb3e4cc0f526b0b133c
2020-02-26narrow rest server data response for lifecyclejhh2-8/+19
There may be a potential for getting stuck between gson utils, jetty and fsm data. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iec7d1a9db19d3c2eea830b2a51cd1fb1229c573a
2020-02-21Minor change to pass operational schema validation.jhh2-4/+3
The junit contains a test case for vcpe. Issue-ID: POLICY-2375 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I9d1039e033bf4374d5b6bd5f78bd5ee5a502e3f2 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-18Ignore fsm field in policies for serializationjhh2-1/+10
When printing lifecycle fsm state information with telemetry, fsm causes a stack overflow, because of the pointer back to the fsm parent object. This will correct this situation. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: If4e11f37a74fcc763517bc08c4a8e13c1a6561df Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-02-16Native policies support in dockerjhh1-4/+7
Depends on https://gerrit.onap.org/r/#/c/policy/docker/+/101758/ for package cleanup. The work is needed to run the PDP-D with no applications, native policies may exercise this set up. This work provides a functional image with a precooked installation. This work will allow fixing and cleaning up of CSITs specific to this repo which maintenance is problematic. Issue-ID: POLICY-2181 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I62a1b9b556bd2f6c0c243062cb864dfed80e2bea
2020-02-11Move model base classes outside feature-lifecyclejhh7-94/+10
So, it can be used in drools-application without a feature dependency. Issue-ID: POLICY-2360 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1cf75bdd8739c35ea9b590896b177a519363e3d5
2020-02-06Minor changes in Operational schemasjhh3-12/+18
Moved as test resources, these schemas will go together with its control loop application in the drools-applications repo, to keep separation between control loop apps and core drools. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I4d78474eedd2f2981907388936312c436e1cb70b
2020-02-06Store DomainMaker in PolicyEngine.jhh1-1/+2
Since this is going to be used in drools-applications, better to have it globally, reusing underlying "schema resources" rather than maintaining one or more instances in drools-applications. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0e339e77ea6281308be00381c7eda2cc9f4d6ac1
2020-02-05lifecycle routing policy types to controllers.jhh12-57/+351
Issue-ID: POLICY-2356 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I49585507542f41a75e4c7bde2c7be343e19038f3
2020-02-04tackle few comments from DomainMaker reviewjhh2-8/+8
Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I325d0c4892d46dad72303e3dcbc38238a029a725
2020-02-04domain native and operational policies supportjhh20-0/+1686
- moved DomainMaker to policy-utils/ project. - support for native drools and controller drools policy types. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I46b9816eadceb7ef280e0e6789f07b4d4ca51519 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-01-13policy/drools-pdp jdk11 upgradesHockla, Ali (ah999m)5-32/+27
Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2020-01-10Prepare drools-pdp for java 11Jim Hahn1-4/+0
The Observer class has been deprecated. Changed the code to use StateChangeNotifier, instead, in anticipation of a corresponding change in policy/common. Also fixed new issue with missing getSupportedPolicyTypes() method. Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I2d3ee29f13bd12a2e16644a1746f066c91c05475
2020-01-09feature-lifecycle sonar cleanupjhh3-19/+32
Issue-ID: POLICY-2322 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ief23b331390b1721f67dd81b47519f629f427519
2020-01-07Remove supported policy types from status messagejhh5-71/+60
Issue-ID: POLICY-2233 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I2168b9616d35ee3b9aa491aaa5d363b8609adb84 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-11-17Set drools-pdp Pdp Group from the property fileJim Hahn6-19/+25
Modified drools-pdp to get its Pdp Group from a property file instead of getting it from the PDP-UPDATE or PDP-STATE-CHANGE requests. Modified property files to use envd, per review comment. Issue-ID: POLICY-2232 Change-Id: Ibf024a476b2216074819dda7a66dcbfba811e278 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-06Drools Controller upgrades Testsjhh1-1/+1
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>
2019-09-16Add YAML support to drools-pdp rest servletsJim Hahn2-4/+12
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>
2019-09-10Bump versions for drools-pdp masterJim Hahn1-1/+1
Change-Id: I9882ab12334dc4b548de527ab2d7dbfc22177113 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-21Use pseudo time for junitsJim Hahn5-54/+78
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>
2019-08-13Fix sonar issues in drools-pdpJim Hahn7-30/+32
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>
2019-08-07Bump version of drools-pdpJim Hahn2-2/+3
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>
2019-07-24Add coverage to feature-active-standby-managementJim Hahn2-8/+0
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>
2019-07-11Fix checkstyle issues in policy-managementJim Hahn4-4/+4
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>
2019-07-08Fix drools-pdp due to sonar changes in commonJim Hahn2-11/+13
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>
2019-06-28Bump drools-pdp to 1.5.1-SNAPSHOTPamela Dragosh1-1/+1
Released 1.5.0 Issue-ID: POLICY-1737 Change-Id: I2ebc4255aa7b03b1c402e825bfb714224fb7db84 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-19Update the right classname in the loggersRashmi Pujar3-3/+6
Issue-ID: POLICY-1791 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: I57de01a329fed8ef043103f157a242f47e607452
2019-05-31Bump drools-pdp to version 1.5.0Jim Hahn1-1/+1
Change-Id: I6eb1f0e7dc2c0ac9b4f1594497c321aa57db8ecd Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-16Step snapshot version of drools-pdpliamfallon2-2/+2
Issue-ID: POLICY-1630 Change-Id: Ia77856077ae89f839aa930101c2002ac25f79595 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-13Ensure passive policies are injected when activejhh7-9/+68
Add vim package for testing support Change-Id: Icefcf8a57eea80b4fed97d4c63080f6159d8167a Issue-ID: POLICY-1748 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-05-08Track policies when active.jhh8-21/+75
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>
2019-04-24Add telemetry API interface for Lifecyclejhh5-5/+149
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>
2019-04-16Add response section to PAP status messagejhh7-14/+58
Change-Id: I26bf9f515c8639c030e8beb9e8b37a6a632da686 Issue-ID: POLICY-1655 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-04-15Change json files from typeVersion to type_versionjhh3-3/+3
Change-Id: I8544977c47c3b428b2d2cea568122f8927d8a4db Issue-ID: POLICY-1647 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-04-10Send policies in statusjhh2-2/+34
Change-Id: Ia1f02857922a81c5d94ffc33cee72ce9a822c876 Issue-ID: POLICY-1624 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-04-09deploy and undeploy as audits.jhh10-20/+110
Change-Id: Iea1766d5d8075394e1dccc109f4477bd2c270c36 Issue-ID: POLICY-1624 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>