summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-simulators/src
AgeCommit message (Collapse)AuthorFilesLines
2023-02-13Remove annotations in modelslapentafd1-4/+3
Removing last annotations in order to remove dependencies in parent Issue-ID: POLICY-3465 Change-Id: Id7a070120d452e33af805b08b37dd1eba1374615 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2022-10-19Fix some dependencies flagged in scansliamfallon1-1/+1
Issue-ID: POLICY-4393 Change-Id: I8ba3b906336d5200326e71d649a05363c43d79f0 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-03-10Closed loop operation guarantee for ccvpnzhaoyh63-0/+42
Issue-ID: REQ-1074 Signed-off-by: zhaoyh6 <zhaoyh6@asiainfo.com> Change-Id: Ib2c60a1e5ebd1fda5e04e75c265e863733caa278
2022-01-21Add configurable port and authentication to DMaaP simulatordc443y5-13/+151
Issue-ID: POLICY-3890 Signed-off-by: dc443y <dc443y@att.com> Change-Id: Idbeb3590a767e51aa0058a7a45d56a61e81301cb
2022-01-11Fix issues in existing entity classesa.sreekumar1-0/+3
Issues identified in the entity classes are fixed in this review. Some fixes doesn't affect the table structure at all. Tables actually affected by some of these fixes are not really used today, and doesn't contain any data. A separate review is raised for the db-migrator changes. Change-Id: I0efdf2c5f17e12225f1b443b5fe8e27c578229f7 Issue-ID: POLICY-3871 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2022-01-07extend vnf properties model for cds actorsjhh1-4/+4
CDS operations for VNFs default to vFirewall-like behavior for AAI queries where vserver and target resources are required. The properties refactoring allows for enriched vnf-id behavior (similar to vCPE) and provides some leg work for other extensions. Fix dmaap simulator sporadic test errors in junits Issue-ID: POLICY-3865 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iad35e4f2a9e10b1a49818c91b9fec7520e844b8c
2021-10-19Improve AAI simulator by configuring responsesa.sreekumar5-12/+116
Change-Id: Ide7f572dac91110a5d560fc388dd87246c9d195b Issue-ID: POLICY-3709 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-08-20Fix sonars in modelsJim Hahn1-1/+1
Fixed: - use "var" - change constructor to protected - add equals() to subclasses Issue-ID: POLICY-3094 Change-Id: Ia62716b1a740b4475e54e496330f50aa7fb404d7 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-02Upgrade to cds 1.1.5-SNAPSHOTRam Krishna Verma2-5/+5
Upgrading policy components to cds 1.1.5-SNAPSHOT to verify the contract and fixes coming up in the next released version. Issue-ID: POLICY-3516 Change-Id: I93602c392a5f917e68a7a1a74eaf0f188f520c39 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-07-27Add "configure" operation to xacmlJim Hahn4-27/+169
Added "configure" operation to xacml simulator and actor.xacml. Issue-ID: POLICY-3502 Change-Id: Ia206303c65ce4e54187d818da9253dabfe864d62 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-21Added Xacml actorJim Hahn3-10/+20
Cloned the guard actor to use as a starting point for creating a more generic actor for interacting with the xacml-pdp. Also renamed various classes. Issue-ID: POLICY-3501 Change-Id: I9bd0107845de41a349d56259e6cfa6a3180efa25 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-07-21Upgrade CDS dependencyk.kedron2-5/+5
- New CDS client libraries. - Update code to use new CDS BlueprintProcessingService Change-Id: I00fb044908774a48755ff8d9ebb32e055a74c819 Issue-ID: POLICY-3507 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
2021-07-12Delete extra simulator docker imagesJim Hahn1-2/+1
The policy-models-simulator docker image, built from models-sim/packages, subsumes the functionality of the other simulator images. Deleted the other images. This simulator still needs some of the code from the dmaap-sim modules, so only deleted the code from the latter that is not needed by this simulator. Also modified the simulator launch script to use sh instead of bash. Issue-ID: POLICY-3474 Change-Id: Ie7f69b327a18c3e07f154124ae38975d5e6924f0 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-17Use lombok annotations for sdnr, simulatorsJim Hahn1-5/+4
Issue-ID: POLICY-3396 Change-Id: I16787f72b0529417c58b9e83a21880baaba92a3d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-10Fix sonars in policy-models impls & simulatorsJim Hahn9-33/+30
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: I65da54cae5a58966f21f981c6cea1259bfdf4239 Signed-off-by: Jim Hahn <jrh3@att.com> simulators Change-Id: I1144568485e62e0c72194caaf21ebf1ba88a6fef Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-17Use new version of A&AI APIsJim Hahn1-182/+4
Just changed the version numbers; the APIs appear to be the same otherwise. Also removed unused APIs from the A&AI simulator. Issue-ID: POLICY-2788 Change-Id: I8c0ae11c1e42f487b34286d5dfd4ca536bb2c07b Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-12More sonars in modelsJim Hahn1-2/+2
Addressed the following issues: - change visibility of constructor - assert exception type Issue-ID: POLICY-2905 Change-Id: Iaededb32802e4facbbc776ae51d05d2ef5c60b93 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-11Fix sonars from depeendency upgradeJim Hahn4-16/+16
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner, in most cases. Changed to openMocks() in one case and removed unnecessary stubbings. Issue-ID: POLICY-2905 Change-Id: I9aa098aa7aaebba09f6dcea4cac69ac1e5fbd4d6 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-28Upgrade io.grpc library in CDS actorRam Krishna Verma1-6/+2
Upgrading to latest version of io.grpc 1.35.0 to fix security issues. The methods named loadBalancerFactory and nameResolverFactory have been removed in the latest version. After going through the grpc-java codebase found that the one's we were using to initialize those factories are made default. Confirmed my understanding by posting a query on grpc-java github repo. Issue-ID: POLICY-2936 Change-Id: I238700ac3f384ff8e5fdef6c3f2ccfb54bff7005 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
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>