summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-simulators/src
AgeCommit message (Collapse)AuthorFilesLines
2020-10-13Bug fixes and improvements in CDS Simulatora.sreekumar2-15/+52
1) CDS Simulator was not able to run alone. It needed one of the RestServer simulators to start up to continue running. Providing the cds simulators parameters alone in the config file was resulting in termination of the Main process. This is fixed. 2) Response from the CDS Simuator when blueprint and action names are unknown (in real cases, when a corresponding CBA is not uploaded to CDS) is updated to mimic an actual CDS response instead of always returning a dummy success response. Change-Id: I79a6d158addaad31649809006d1e3c1dfdb47a1f Issue-ID: POLICY-2828 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-07Adding basic logging to CDS Simulatora.sreekumar2-1/+14
1) Adding log statements to capture actions taken by CDS Simulator. 2) Fixing the way CDSRequest input is read from a String. StandardCoder decode method cannot directly decode from a String to protobuf type. Change-Id: I597c64ffb095f6a518b0b6c67c1617ca789ad7d6 Issue-ID: POLICY-2828 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-10-06Fix random failures in CdsSimulatorTestJim Hahn2-4/+11
Modified CdsSimulatorTest to allocate a unique server port for each test. Issue-ID: POLICY-2862 Change-Id: I4a7ed299c7458dade7444c6c8f2b476e24500dd4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-02Fix eclipse/sonar warnings in modelsJim Hahn1-2/+1
Addressed the following eclipse/sonar warnings: - unused imports - unchanged type - unreachable "catch" block - reinterrupt Issue-ID: POLICY-2714 Change-Id: I2fe6011ec74b7fab8889050e5c83647ab034ea25 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Enhance gRPC Simulator:puthuparambil.aditya11-8/+304
1.Make gRPC Simulator respond to different actions by generating the response on the basis of received request. 2.Include CDS Simulator in policy-models-simulator 3.Introduce a packages module in models-sim to package the docker image of policy-models-simulator which includes all the simulators(pdp-simulator to be added in future) in models. 4.The Jenkins job changes to push this newly created Docker image may be taken in the next release. Issue-ID: POLICY-2828 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: Ic1663bbe8205c64a8133ea0b0c28152f21d0732a
2020-09-02Add new method to retrieve vnf-idPamela Dragosh2-1/+2
For guard filters, once the vnf-id is found. Then this convenience method helps to retrieve the correct vnf information. Issue-ID: POLICY-2590 Change-Id: I0b55b15582ddc58bbc5b2c0c2c2b130f3cdc88c3 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-09-01Add Modify NSSI operation in SO actorkrishnaa963-0/+45
Issue-ID: POLICY-2586 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I6ac184a6e731767f06401a0ac984c6b448c5d82f
2020-07-21Fix some sonars in policy-modelsJim Hahn2-5/+5
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-17Support vDNS RainyDay test Case.uj426b1-3/+12
Modifying simulator to handle failure sent from Policy Json. Change-Id: I52a9f8da4ad06b535262f202418868f79fea4510 Issue-ID: POLICY-2432 Signed-off-by: uj426b <uj426b@att.com>
2020-06-29Merge "Add CDS simulator to policy-models"Ram Krishna Verma7-18/+367
2020-06-26Add CDS simulator to policy-modelsJim Hahn7-18/+367
Added CDS simulator to policy-models. Added a test case to the CDS Actor to verify that it works with the simulator. Issue-ID: POLICY-2676 Change-Id: I9b10de3bde93c69e82df983f77eecc253de8a1a2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-26Clean up of Pair classes - modelswaynedunican3-25/+25
Removed Pair class from policy-models and replaced with Aoache Common Pair class Issue-ID: POLICY-2202 Change-Id: I786467ac02ecb2d433dba94deba45785be3dcf23 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-05-29Use default serialization providerJim Hahn1-2/+0
The default provider has been changed to gson, so the provider property no longer has to be set. Issue-ID: POLICY-1527 Change-Id: I3c829e2070617f85d998a56c0f58127d7f22b467 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-15Cannot parse finishTime in legacy SO responsesJim Hahn3-4/+101
Adding the actual sample responses to the SO simulator broke the drools-apps junit for usecases. Fixed (in theory) by updating the legacy SO actor to properly decode the finishTime. Refactored the new SO actor, extracting the type adapter into its own class file so it could be shared between the new and legacy actors. Issue-ID: POLICY-2570 Change-Id: I061b603172440b1a91da16d09b4f2a0d289dfc41 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-15Cannot parse finishTime in SO responsesJim Hahn5-99/+243
The timestamp in SO responses appears to follow RFC-1123/RFC-822 format instead of ISO format. Added a type adapter for SO. In Guilin, we may want to consider combining the two type adapters for LocalDateTime so that either format is accepted. Also modified the SO simulator to return responses that are actual samples from SO. As part of that work, discovered that the legacy SO actor is not able to parse these timestamps either. However, as that code is now deprecated, left it as is. Issue-ID: POLICY-2570 Change-Id: I322318d1007e36eef47bb8867fd8ed01cb60223a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-14SO poll should not require request IDJim Hahn4-25/+176
When SO is polled for the result of a previous request, it does not necessarily include the originally returned request ID in the response. This causes the SO actor to generate a "missing request ID in response" exception. Modified the actor to only extract the request ID from the first response and cache it for subsequeent responses. Testing this required the SO simulator to be modified so that it would return an INCOMPLETE on the initial request, forcing the actor to poll until it returns a COMPLETE. Made this a settable flag so that it could be enabled just to test the SO actor without impacting other components (e.g., drools-apps, CSITs). Also fixed a couple of checkstyle issues in the simulators. Issue-ID: POLICY-2568 Change-Id: Ifad8b3c0c2c0b03cb82da693c2cf5ced44ede105 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-17Add PNF support to new CDS actorJim Hahn2-2/+33
Made the following updates: - added new A&AI get-PNF Operation by refactoring AaiGetOperation, separating out Tenant and PNF operations - added PNF support to the CDS actor - added logging to the CDS Handler - added get-pnf to the A&AI simulator Issue-ID: POLICY-2505 Change-Id: Iff140e7c864f762790d8e2ecaba62c161c859e6e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-08More sonar fixes in modelsJim Hahn2-25/+12
Addressed the following sonar issues: - missing assert in junit - duplicate code blocks - fixed those in the simulators - leaving the others in the concept classes for Liam/"G" Issue-ID: POLICY-2305 Change-Id: Icfe80afb378b4cdec4de3d33d0e33227e04845d8 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-30Test new actors against simulatorsJim Hahn3-0/+3
Also modified HttpParams to allow "path" to be blank to support any cases that really have no "path" to append to the context URI base path. Issue-ID: POLICY-2405 Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-23Update new SDNR actor with v2.0 structuresJim Hahn6-0/+202
SDNR v2.0 introduced an extra "input" and "output" layer within the body of the messages. Added POJOs to match that, and updated the actor to use the new POJOs so that no extra steps are needed during serialization or deserialization. Also modified the SDNR and APPC-LCM simulators to discard request messages when looking for the response, if the sink and source topics happen to be the same. Added the SDNR simulator. Added more coverage to the SDNR actor. Fixed a sonar issue in the SDNR junit code: - use a constant instead of a literal (i.e., for "ModifyConfig") Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I70914a299dd5e9ee8eaccb5d42a2596cab814091
2020-03-20Bug fixes in models simulatorsJim Hahn5-3/+55
Fixed these issues: - topics weren't started - appc topics were reversed - prevent appc simulator from responding to a response (i.e., infinite loop) Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I1f43be72d35f874fec98f48f1a112c055c00eee5
2020-03-20Add docker file for all simulatorsJim Hahn10-0/+464
Some CSITs may require multiple simulators. This adds a class that will start all of the simulators. A tarball is generated from which a docker image can be built. Added simulators for Topics: appc and appc-lcm. Fixed licenses in files in packages directory. Fixed per review comments: - add version to Dockerfile Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Id7aa9cb5a5874f7b4185273ab0d2c074198554ff
2020-03-05Add SO VF Module Delete OperationJim Hahn2-3/+48
Redesigned the SO Operation classes; moved some code from the subclass to the superclass so it could be reused by the VF Module Delete Operation. JerseyClient does not support DELETE with a request body, so had to implement a delete() method using java11 HttpClient. Fix some issues found while testing with drools-apps. Added "delete" operation to SO simulator. Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I269fe13cf90c295ec2bbac92bc5a59b3820ea265
2020-03-03Fix path issuesJim Hahn1-1/+1
A&AI tenant query is prepending the target entity with "/", but it should not. Fixed it. Modified A&AI and SO actors to get path prefixes from parameters. Fixed a bug in an A&AI simulator response (extra "}" at the end. Issue-ID: POLICY-2349 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I71f8b1e5fb8a4bd29b4f616a7757d366c7d58127
2020-01-10policy/models jdk 11 upgradesHOCKLA1-2/+4
Issue-ID: POLICY-1592 Change-Id: Iaa6b61c5f1c76f3e7c2043691f4d29dbc43d144e Signed-off-by: HOCKLA <ah999m@att.com>
2019-11-13Removing Named Query.pramod.jamkhedkar2-256/+103
Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query Issue-ID: POLICY-2125 Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-10-15Fix remaining fixable Sonar issues on policy modelsliamfallon1-18/+18
This patch fixes the remaining easy to fix Sonar issues on policy models. The remaining issues are - methods that do not follow Java naming conventions and fixing those will probably break policies that use those methods - TODO statements to do with functionality we didn't get done in Dublin and will address in Frankfurt Issue-ID: POLICY-2165 Change-Id: I7f604bc2335388bdc0dd9286ae17a5ab76517665 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-14Clean up minor things in policy-modelsliamfallon2-8/+8
Cleam up of some minor eclipse, checkstyle, and Sonar issues in policy-models Issue-ID: POLICY-2165 Change-Id: Id5682fd60e1a6cebbf716d9c258453aa53ca2482 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-07Flesh out DMaaP simulatorJim Hahn4-1/+162
Fleshed out the dmaap simulator with additional media types. Added more junit tests. Added buildDmaapSim() to simulators Util. Change-Id: I39acd3df8e8d0ded21228e56fa1ef919cafc3772 Issue-ID: POLICY-2144 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-30Added VFModule countpramod.jamkhedkar2-379/+3576
Added the function VFModuleCount to AaiCqResponse class. It counts the number of vf modules. Also changed the same custom query response in AaiSimulator. Issue-ID: POLICY-1858 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com> Change-Id: If08de84f74d2bd9501b501b881cdd761089614dc
2019-07-08Fix models due to sonar changes in commonJim Hahn5-21/+20
Fixed breakages due to changes made in policy/common to satisfy sonar. Change-Id: I7de701e743664afb5963a454c59478d1a1c83e87 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-18Removed unused imports from modelsJim Hahn1-3/+2
Change-Id: I1f64127e1d783a962304c0add1524a57d6c24e4b Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-14Fix copyrightPamela Dragosh1-1/+1
Missed on earlier reviews Issue-ID: POLICY-1855 Change-Id: Ib172059e105e2940dce43f5da79b81dbd80f527d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-14Fix fieldname for guardPamela Dragosh2-2/+2
The correct name is 'clname'. Issue-ID: POLICY-1855 Change-Id: I27314576bb84615ccf225f0b57bfd710e2015e60 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> (cherry picked from commit f2b9a074416f814f8b4c071296a0abaf373db1b9)
2019-05-16Incorrect SDNC API called for CCVPN Bandwidth on demand policyVidyashree Rama1-2/+2
Incorrect SDNC API called for CCVPN Bandwidth on demand policy Issue-ID: POLICY-1774 Change-Id: I6a8f2fa57aef6d5a4d5c679dfb96fe4160e55da5 Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
2019-05-03Decision should return dictionaryPamela Dragosh1-2/+2
Should not be an array of policies, should be a dictionary. Issue-ID: POLICY-1735 Change-Id: Ia88ef65dd332933aafbe6b57693344d5d43c53b8 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-03Fixed guard simulatorPamela Dragosh3-22/+59
The guard simulator should simulate the new xacml pdp decision api not the old. Issue-ID: POLICY-1730 Change-Id: I97f5df9d698e8c852a0e2c71dbef6ac5912a2d2c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-11Aai Simulator for CQpramod.jamkhedkar3-22/+734
Added the aai simulator for custom query. Minor change to AaiManager Issue-ID: POLICY-1278 Change-Id: I4d5d2a616d2ce85f3b6c539a1d90fe85ee55e093 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-04-05Missed simulator REST call SDNCPamela Dragosh1-0/+21
Forgot this as part of this review: https://gerrit.onap.org/r/#/c/84338/ Issue-ID: POLICY-1264 Change-Id: I8b95cd43b593fd9a79c62b3398a5d44bb7b0c794 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-05move two modules from drools-application to modelsning.xi13-0/+1501
Also removed reference to drools logging util. Issue-ID: POLICY-1264 Change-Id: I7795f23b2b06fcb98f4099c3a6c303561a68e55f Signed-off-by: ning.xi <ning.xi@est.tech> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>