Age | Commit message (Collapse) | Author | Files | Lines |
|
Removed the "preprocessed" flag from the Actor parameters, now
that the actors no longer have a startPreprocess() method.
Also removed targetEntity from the parameters.
Issue-ID: POLICY-2804
Change-Id: I13bc80e1b6bb22d8d21b176796ca062109ce6658
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Removed tdjam and frankfurt controllers, which use event-specific
actors.
Issue-ID: POLICY-2804
Change-Id: Ica05f80bf72d039d9c4903591af7fb3793a81159
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Apparently SO/AAI in Frankfurt are setting the prov-status to "active"
instead of "ACTIVE". Modified the code to ignore case when comparing.
Issue-ID: POLICY-2890-prov-status2
Change-Id: I9e868d320dadcb3ac51570718d10f33d0011ae47
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
When we upgrade to oparent, these will fail as oparent upgrades
to 8.37 of puppycrawl which fixes a few bugs that should have
flagged these previously.
Issue-ID: POLICY-2887
Change-Id: I2ea37eef859aac08f54ffd1f4b1d6b9e702218e9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Addressed the following sonars:
- too many assertions in test method
- rename test class
- use static method to modify static field
- use already defined constant
- code always returns the same value
- use assertNotSame
- use appropriate class name to access static method
- define a constant
- extract nested try block
- don't always return the same value
- use remove() instead of set(null) for thread-local-storage
- add @Override
Issue-ID: POLICY-2852
Change-Id: Icc62acd4ad57afa2d44ed4cdca504a3ac0810228
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Modified drools-apps so that guards can be dynamically enabled and
disabled. Due to the current design, there are two properties that
control this:
- an actor-level property: when enabled, the DB connection is created,
otherwise a stub connection is created. This property is NOT dynamic
- an engine-level property: when enabled, the connection created by the
actor is used, otherwise a stub connection is used. This property IS
dynamic
Issue-ID: POLICY-2748
Change-Id: I2a5baf908ce274f2eb46a6a3f01df1b3532038ff
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
the details is on wiki:
https://wiki.onap.org/display/DW/tdjam+Feature+for+Tosca-Driven+Control+Loops
Fixed some eclipse warnings.
Revised the interaction between a manager and its SerialWorkQueue to
address some threading issues. The original code started processing
the event as soon as the manager was created, WHILE it was still being
added to the map. During junit tests, the event responses came back,
within the same thread, which then attempted to remove the manager from
the map. This resulted in a ConcurrentHashMap exception.
Issue-ID: POLICY-2415
Change-Id: I94a4152637be76e5b2aea2d869afd84dfb413a0e
Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Signed-off-by: Taka Cho <takamune.cho@att.com>
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Made the following updates:
- modified feature-controlloop-utils to pull from the usecases
controller instead of the frankfurt controller
- modified ONAPInstance in the xacml-pdp Decision request
- log Step2 property changes as info() instead of error()
- log Lock acquisition as info() instead of warn()
Issue-ID: POLICY-2748
Change-Id: I6b4b5877bbd6731acb761d09d0f0dec85561b163
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Removed usage of policy-yaml and old targetType definition.
Switched to using TOSCA operational policy classes and new
definitions for Target type enum.
Issue-ID: POLICY-2428
Change-Id: I25d1c5219764df27bdae7f2cbeb7ada7bcef4e1e
Signed-off-by: Jim Hahn <jrh3@att.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Created new "usecases" event manager.
Also fixed a couple of sonar issues in the new code.
Issue-ID: POLICY-2748
Change-Id: I17a2c41bbf4f4e8158adbd8aa5e32ef570daa9d3
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Issue-ID: POLICY-2765
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I454365943465863b108ba8668b2bc4b201986959
|
|
Created place-holder for new "usecases" controller. Note: as of yet,
this is still just a normal java project; it will be turned into a
full-fledged kie-based controller in a later review.
Added some Operation and a few other support classes that will be
needed.
Note: the detmTarget() method and it's various supporting methods,
detmXxx(), found in GetTargetEntityOperation2 were cloned from the
pre-existing ControlLoopOperationManager2 class, and modified to fit the
strategy of the new controller. Likewise for the junit tests of those
methods.
Issue-ID: POLICY-2748
Change-Id: Idffa135a11a56bd6afdd2728706fd40168e80912
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added classes that are event-agnostic and support moving control from
java into rules.
Updates per review comments:
- removed policy scope
Issue-ID: POLICY-2748-event-mgr
Change-Id: Icf811cc25a3975543fc5c725766b7b9df2bb87b0
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Made the following changes to remove usescase and legacy actor
code:
- deleted the usecases controller and feature
- deleted code associated with legacy actors, with the exception
of AaiManager, which is needed by RestControlLoopManager
- moved the contents of the "guard" project into the m2/guard project,
as that is the only thing that still needs it
- modified the m2/GuardContext to get the name of its persistence unit
from the properties so it could be overridden by junit tests
- used eclipselink constants
Also fixed a bug in the properties for the VFC actor.
Addressed review comment:
- removed usecases from Dockerfile
Issue-ID: POLICY-2558
Change-Id: I677d68c9efed9247c3d55773abdcc736b577a6b4
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
add isInstanceOf for assertThatThrownBy.
Issue-ID: POLICY-2616
Change-Id: If49255aec6004870d7d2acfeabe258def872c1fa
Signed-off-by: Taka Cho <takamune.cho@att.com>
|
|
Modified drools-apps to use XxxActor instead of XxxActorServiceProvider.
This is the second step of the rename.
Issue-ID: POLICY-2684
Change-Id: Iea60e92f914b7719ac765b086650479be9192d98
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The Pair changes made in drools-pdp also broke drools-apps builds.
Replaced usage of drools.utils.Pair with apache Pair.
Issue-ID: POLICY-2202
Change-Id: I50aaad47c243637688602ae6cb680a929fe3edd9
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-2188
Change-Id: Ib90222c537c5440e0de52fa0acbaa99bbcc4772a
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Now that the changes to the Actors have been merged, the former properties
can be removed, too.
Also fixed guard operator/operation name since it changed from "Guard"
to "Decision".
Issue-ID: POLICY-2629
Change-Id: I1c8d4575be598a8cab12b1aa4ad9b1d3e1f12113
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
In some conditions for assertTrue, sonarcloud
recommends using assertEquals
Assert.assertTrue(a.equals(b));
Assert.assertTrue(a == b);
Assert.assertTrue(a == null);
Assert.assertTrue(a != null);
Assert.assertFalse(a.equals(b));
Compliant Solution
Assert.assertEquals(a, b);
Assert.assertSame(a, b);
Assert.assertNull(a);
Assert.assertNotNull(a);
Assert.assertNotEquals(a, b);
Change-Id: Ic50bf6e961b74abcc698c2cc0347dd0472fefe71
Issue-ID: POLICY-2616
Signed-off-by: Taka Cho <takamune.cho@att.com>
|
|
|
|
Modified drools-apps to use constants from the actor classes instead
of hard-coded literals. Only made this change in code that uses the
new actor model, as the old code will be deleted during this release.
Issue-ID: POLICY-1242
Change-Id: Iac718159fd7cf571a48ac620585bf2b8f94c1e5d
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Deleted Dbao and replaced it with the shared class in policy-models.
Also had to update the queries and the persistence.xml accordingly.
Note: with this change, the "database" project is no longer needed,
so it was deleted.
Issue-ID: POLICY-2581
Change-Id: Idfde68b28b3a27f2ee794fa477d15e0f12717373
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified drools-apps to generate the SDNR notification using the
SDNR-response provided by the actor in the operation outcome, instead of
using the controlloop-response provided in the operation outcome, as the
latter is deprecated.
Issue-ID: POLICY-2593
Change-Id: I70ee4a4b11345a4295d720250a63f407f51cb0bd
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
When the overall control loop times out, a notification is sent to
POLICY-CL-MGT, but then the event is discarded. Modified the code
to update the operation history, if an operation had been started,
and to generate an SDNR notification, if appropriate.
Applied the same logic for when a lock is lost.
Issue-ID: POLICY-2582
Change-Id: I35510ec8a3cfc6b2ca9be5751896f3c0f7d9bd09
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
If a request to SDNR times out, the actor class does not generate a
notification for the DCAE_CL_RSP topic. Rather than modifying the
actor, decided to modify models to handle that case. Seems like that's
where it belongs anyway, as notifications are more of an application-
level behavior.
Issue-ID: POLICY-2580
Change-Id: Id9426c223b719efce337a604316f19335dae8a94
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Mariadb is setting the "endtime" to the current time by default,
so rather than indicate a pending record using a null endtime, just
modified the code set "outcome" to "Started" to indicate a pending record.
Also added code to ensure the "outcome" is never null, as that causes
a DB error.
Also addressed a comment from a previous review to log a warning message
if more than one matching record is found in operations history.
Issue-ID: POLICY-2581
Change-Id: I6bf67551cef46808a79cc15afeb0abbfc1b6d945
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified code to insert a pending record when an operation starts.
Also modified it to update the existing record when the operation
completes, rather than adding a new record.
Note: the "outcome" for a "pending" record is left unset (i.e., it
is null).
Issue-ID: POLICY-2581
Change-Id: Ia1a02ed5a16b8af1328a49b22478fd57c4b9aca0
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This is to allow other frameworks, such as M2, to obtain the
ControlLoopPolicy instance after the raw ToscaPolicy has
been adapted.
Issue-ID: POLICY-2574
Change-Id: I003e60991f6e4007bd30f0e9392f6fa8bf21733a
Signed-off-by: dc443y <dc443y@att.com>
|
|
Modified the frankfurt rules to compare the event objects instead of
comparing the request ID when determining if an event is new. The
event object's equals() method ignores the request ID when doing the
comparison, thus it will treat an event as a duplicate even if the
request ID is different, which is the behavior we want.
Also removed the @Ignore from the junit that tests for duplicate
events in the hope that this change will fix it. If the docker build
still breaks, then @Ignore can be added back in.
Issue-ID: POLICY-2557
Change-Id: If2b9fd26473d78a356218b951bfe160f93daeb32
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-2468
Change-Id: Ibf4d3e5f62fa3106028dcf85050c270b8eab0a89
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added "synchronized" to a few more methods in the event manager class,
just to be safe, as they view/modify data that may be viewed/modified
by other threads.
Issue-ID: POLICY-2385
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ia8404fd3fd53b0de95f939dfff2088867e0f3b24
|
|
Issue-ID: POLICY-2434
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I1109a053e46dc8201ff9676da0c9ff93d8b631d5
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Frankfurt junits were generating the following output:
Value too long for column "TARGET VARCHAR(50)":
"'Target [type=VNF, resourceId=bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38]'
The issue turned out to be caused by the fact that the rules for the
new actor were storing the "Target" instead of the "TargetEntity"
in the DB field. Modified the code to store the target entity, as the
the usecases rules do.
Issue-ID: POLICY-2441
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I91ee517ef073e3dc3fea4698c814b57a06d87095
|
|
Flipped the flag(s) to enable guard checks in the various junit
tests for the Usecases and Frankfurt controllers. Note: the guard
checks use the guard simulator.
Modified new actor code to not include operation history on first
"guard denied" report (i.e., make it work like usecases does).
Issue-ID: POLICY-2434
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I2897da4a0c8fb76fa00cb0f6cf8562c0703005d3
|
|
Fixed various sonar issues, including moving some
code to policy-common.
Fixed some eclipse warnings, including deprecated junit APIs.
Issue-ID: POLICY-2426
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I10b40c1e5af62308f2e4c315e4d399aafff2998f
|
|
Issue-ID: POLICY-2388
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5948ed5152297e4addbab444ed65dcd3b8002492
|
|
Also added VdnsTest, VfwTest, and VcpeTest.
Fixed a number of issues with notifications:
- event data (e.g., AAI) was missing
- notification was missing for the start of an operation
- "message" and "history" fields should contain Target object,
target entity
- "message" field was missing various details (e.g., start time)
Still missing subRequestId - that will require enhancements to
the actors.
Issue-ID: POLICY-2385
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I7fc33ebcd5939d2f33a9d209ac6119e390e0836d
|
|
Note: VcpeTest and VfwTest are not included, as they depend on updates
to the APPC and APPC-LCM Actors.
Added feature-controlloop-frankfurt.
Added HTTP client property files to feature-controlloop-management.
Updates per review comments:
- pom changes
- simplify FrankfurtBase
- rename event-svc-http.properties
- change "usescases" to "frankfurt"
- use blanks for CDS property defaults
- trailing spaces in http-client files
- add https property to http-client files
Added newlines to config files that appear to be missing them (based
on feedback from gerrit).
Issue-ID: POLICY-2385
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ib4a4d75461c734ae47309e41dc9d099e8815d55d
|
|
Companion review to https://gerrit.onap.org/r/c/policy/models/+/102162
in which use of Pair from apache vs creating our own.
Removed an unused import.
Issue-ID: POLICY-2382
Change-Id: Id3cf9a170480c7a621dddf93540d61f993f3553a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
The code that makes Tosca policies backward compatible was not
copying the final_xxx fields (e.g., final_failure_retries). Added
code to copy the fields.
Issue-ID: POLICY-2376
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I05d746ee9c8ace263c7b33a245221c5eb71b612c
|
|
Issue-ID: POLICY-2383
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5d5d864b2853f6e7e0c7e1096cb17746500f2495
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Issue-ID: POLICY-2376
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I362ebbd941c400a6ffc3e952e66ca2d624afbfdd
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Tosca Compliant and Toscal Legacy Operational policies are
both supported for backwards compatibility.
vCPE usecase junits to support 2 equivalent policies,
one tosca compliant and the other one legacy.
Issue-ID: POLICY-2360
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iafbfc92bbec42e6a3fe4ceb4a9a17c85e636ea14
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
This is to support backwards compatible implementation
of Tosca Compliant Operational Policies.
Issue-ID: POLICY-2360
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0e8b96b19375c58e4b62e0dcd1da5c508091ea2f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
Issue-ID: POLICY-1587
Change-Id: I02bef6c829f2f24954ae73fb0c540ab7198775ce
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
|
|
This class is only useful under drools applications and
eventually will be deprecated to accommodate the new
Operational Policy Types.
Issue-ID: POLICY-2146
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I68927cb144a33fac6fe330be15fe60aee32b15a1
|