Age | Commit message (Collapse) | Author | Files | Lines |
|
The AAI vserver named-query was being done as a preliminary step for the
SO request. However, it will now be needed during the guard query, which
happens much earlier. Thus it has been moved from the SO classes into
the event manager class, where it is retrieved in a lazy fashion and
cached.
Also removed some trailing white space.
Update licenses.
Make test method private.
Change-Id: Id7353a2e0f2d42601d5142cb92961528fa21aa94
Issue-ID: POLICY-1011
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Also had to add prov-status field to AaiGetVnfResponse class.
Removed bogus comment from test.
Verify response is not null in test.
Verify no requery by vnf name in test.
Add prov-status to template.demo tests.
Add prov-status to sample json for archetype-cl's.
Change-Id: I3f36a2bb6de8265ce5b10103690d6d8813c15b1a
Issue-ID: POLICY-964
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Several of the AAI response classes did not match the new AAI
interface. Updated AaiGetVnfResponse and AaiGetVserverResponse
and the classes they use to reflect the new API; other top-level
classes were left untouched.
Fix checkstyle errors.
Change-Id: Ife5830c45ba8aece8d676a10f0fd8a9c9fe6cb66
Issue-ID: POLICY-964
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Replaced references to classes deleted from drools-pdp with references to the
corresponding in policy-common
Issue-ID: POLICY-967
Change-Id: Ia9d2ac704e6b7c434e5a9e7aee6d7dcf9198e4f2
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
When rules for a closed loop are deleted, associated working memory
elements may be left around.
Modified the code to retract the various elements.
Re-added code to unlock when retracting TargetLock.
Add junit tests for new methods.
Forgot the junit test for request id.
Change-Id: Iec2805adbdb147a643f6163badee05ea353ada88
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
ControlLoopEventManager.unlock only returns the TargetLock if
the PolicyGuard.unlock operation is successful. However, if
the lock has already expired, then PolicyGuard.unlock will return
false, and ControlLoopEventManager.unlock will then return null.
As a result, the rules do not retract the TargetLock. (The rules
do, however, retract any left-over TargetLock objects during the
clean-up phase. Nevertheless, the earlier rules should not have
to depend on the clean-up rules to do that.)
Modified the code to address this issue.
Change-Id: I2e6099a4e3511053d2e6e1373cae4b480798d1b6
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified the local policy guard locking facility to add
a time parameter.
Modified the control loop event manager to extend the lock
when lockCurrentOperation() is re-invoked.
Modified the rules to retract the lock if the lock request
was denied.
Reorder assertions in junit test.
Change-Id: Ic9b77acbb4881a5a516f30eb56664bad1a5c4d7e
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified PolicyGuard to use the locking API from policy-core instead
of its own internal map.
Initialized PolicyGuard.factory.
Fixed bug in eventmanager junit test uncovered due to changes to
PolicyGuard.
Change-Id: I853ee5f146f3bde16b3f6e65bc188ca7c0cc4f73
Issue-ID: POLICY-577
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified event manager code to not query AAI if there's already
a response from a previous query.
Modified code to store AAI properties in local variables instead
of static to prevent any chance of a race condition in a multi-threaded
situation.
Updated junit tests to use a new manager for each subsequent
query.
Update license.
Change variable name, in junit test, from onsetEvent to event,
because it can be any type of event.
Included fix to prevent initial AAI query if AAI data was already
available in the initial onset event.
Change-Id: Idf3e15ea8c5e297f22f23570c22fd837b72ba200
Issue-ID: POLICY-754
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
I removed a couple of empty README and added licenses.
Issue-ID: POLICY-741
Change-Id: I10aad3536d02b738a1dc606f7311de6b3a2777cd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Removed checkstyle warnings from:
policy/drools-applications/controlloop/common/model-impl/appc
policy/drools-applications/controlloop/common/model-impl/appclcm
policy/drools-applications/controlloop/common/model-impl/events
including changes to template files due to renamed methods
Issue-ID: POLICY-705
Change-Id: Ieb93baf43268aa608f204eef1a610354f2adec32
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
Removed checkstyle warnings from
policy/drools-applications/controlloop/common/model-impl/aai
including renaming classes:
AAI* -> Aai*
PNF* -> Pnf*
and renaming some methods in those classes
Issue-ID: POLICY-705
Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
Removed checkstyle warnings in:
policy/drools-applications/controlloop/common/actors
policy/drools-applications/controlloop/common/eventmanager
policy/drools-applications/controlloop/common/feature-controlloop-utils
Issue-ID: POLICY-705
Change-Id: Iccf99b291bc62bc3ba2082ccdb4c1f9e12107896
Signed-off-by: mmis <michael.morris@ericsson.com>
|
|
Unit test expanded for SO POJOs, technical debt removed in eventmanager.
Change-Id: I7045f5af88fd2c15019befe29a0b4fcd69801c49
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Issue-ID: POLICY-455
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
|
|
Mainly making fields private, fixing field and methods to follow Java guidelines, and adding getter and setter methods. Unit test added for all classes in org.onap.policy.controlloop
Issue-ID: POLICY-455
Change-Id: I445b7cfaf9eb921a230bbb72b06ff4455fe003ce
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
|
|
Fields have been made fields private in POJOs, and wrote JUnit unit tests to bring up code coverage. AAIManager also changed to use non-static methods so that it can be stubbed with Mockito.
Change-Id: I871427ced5db8a1dfd6495fef4e6d84adf264e65
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
Issue-ID: POLICY-455
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
|
|
Eliminate the technical debt identified in the drools-applications/controlloop/common/model-impl/aai module by Sonar
Change-Id: I72125baacc217386a4984be04bfc023439eddd13
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
Issue-ID: POLICY-455
Signed-off-by: Liam Fallon <liam.fallon@ericsson.com>
|
|
The drools engine will now send final failure notifications
if there is an error returned from A&AI queries instead of
rejected notifications.
Issue-Id: POLICY-364
Change-Id: Ie9c22686d859c633bad47d223726957cc9599f7c
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
Decoupled checking AAI data from checking an event's syntax so that new
onsets can check both while all other events can just check the syntax.
Issue-Id: POLICY-371
Change-Id: Ic76b1335b389bbec47ff0d29485ccbb249d5f18c
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
The locking of the target is now taken care of when
the operation manager is initialized. This allows us
to keep the template flow the same and to ensure that
for vFW we will not lock the source if it is not intended
to be the target. NOTE: This will have to be revised in
the future if policy chaining will support having
different targets specified for each policy in the chain.
Additional work was done for hardening the APPC model code
to make sure exceptions are caught and we gracefully end
processing the event with memory clean up and a final failure
notification sent.
Issue-Id: POLICY-367
Change-Id: Ic796d95eb5400067744492f810dd8069ba6241b3
Signed-off-by: Daniel Cruz <dc443y@att.com>
Signed-off-by: daniel <dc443y@att.com>
|
|
These changes now allow a lookup of the source vnf-id
based on the onset's vnf-name.
Issue-Id: POLICY-366
Change-Id: I6f6bd500b892dddbbb9e12156b4486208309e21d
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
Changed check event syntax in the event manager so that it only looks
for AAI info if the event is an onset.
Issue-Id: POLICY-368
Change-Id: I241e9a110cc5fc4553a5e9cd842d51f76a800368
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
Errors from AAI after a Named query now throw an AAIEXception. This is
caught in the template to allow the resources to be removed from memory
and a final failure to be thrown.
Issue-ID: POLICY-314
Change-Id: I319d29ef537b2d01ca288622aac1d9dbbe05f5eb
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
check in code to use simulator url
Issue-ID: POLICY-103
Change-Id: I352140dd3cb3159fc2c5738bf02dbb6272de48bc
Signed-off-by: Joseph Chou <jc2555@att.com>
|
|
Removing warnings introduced with A&AI code. This should also
address sonar criticals and majors.
Issue-ID: POLICY-140
Change-Id: I3f8186dd9c5aa52bfbb061bf95d67b5614b3fb2e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Adding AAI GET query feature to support ONAP project (1 commit)
Issue-ID: POLICY-103
Change-Id: I0a55f41c3edd7a0bc0562ae4e12a19f262a50d74
Signed-off-by: Joseph Chou <jc2555@att.com>
|
|
The LCM model code and service provider code is implemented.
This model code is now used for the vCPE use case scenario.
The vFW use case is still using the legacy APPC API as
request by APPC for Policy to use in R1. The APPC
service provider now generates a demo legacy APPC
request with pg-streams.
An A&AI named query is implemented for the vFW use case.
The code for obtaining the generic-vnf.vnf-id is not
in use until we set up the A&AI simulator to work
without having cyclical depenncies inside the POMs.
JUnits for the vFW and vCPE use cases are now supported.
These JUnits test the complete flow of each scenario.
A&AI testing is not supported in the JUnit test yet.
These JUnits use a target type of VM as VNF is not
supported yet. This will be changed when the Target
Lock supports VNF.
Amended to fix Sonar blockers.
Issue-ID: POLICY-104
Change-Id: I46869c5fd5094919da55ad563d608fe6d4b6fea7
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
Removed any use of System.out.println or System.err.println
and replaced with relevant logger statements.
Issue-ID: POLICY-176
Change-Id: I91513267635bfb2a34f2a9650c48f367d53fc842
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Changes to Policy-yaml and sdc projects based on changes from policy/engine.
Issue-Id: POLICY-88
Change-Id: Ic1a58f00029b9a66db6980fc7732a2ac57390229
Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
|
|
Change-Id: I3ec4fa22e22e9fccf4b6783b3bc8c92da25e181f
Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>
|
|
Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364
Signed-off-by: Gao, Chenfei (cg287m) <chenfei.gao11@gmail.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|