summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-09-17Add demo for Control Loop Coordination.Joshua Reich18-11/+4105
New PipEngine and Junit test added to guard. Also bug in existing Junit test fixed. All other code added to new directory template.demo.clc Change-Id: Ida2267528bcb9404dc59ff391d45797b591814cc Issue-ID: POLICY-1109 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-09-17Merge "remove volumeGroup from SO request"Pamela Dragosh1-11/+10
2018-09-17push-policies https for casablanca controllerJorge Hernandez1-11/+11
https support for provisioning policies in experimental casablanca controller Change-Id: Ica711c10298f49b072c6a4f29a889e27cb851275 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1120
2018-09-17remove volumeGroup from SO requestJim Hahn1-11/+10
After a new round of discussion with the SO team, it was learned that the SO scale-out request should NOT include the volumeGroup in relatedInstanceList[0]; that item should be eliminated altogether. Re-ordered some imports. Updated license date. Left volumeGroup in TestDemo, as it's a pseudo VID request. Change-Id: I94e82b7e8fe6a41695b99888f291e24b7103687d Issue-ID: POLICY-962 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-17Merge "Option to disable target locking. Needed by CLC."Pamela Dragosh2-34/+70
2018-09-17Merge "Fixed sonar code smell"Liam Fallon1-5/+3
2018-09-17Fixed sonar code smellPiyush Garg1-5/+3
removed unused method parameter aaiResponseWrapper from constructDeleteRequest Change-Id: Ie434130b040732ed4e656c5592fff5b049695d29 Issue-ID: POLICY-1079 Signed-off-by: Piyush Garg <piyush.garg1@amdocs.com>
2018-09-14fix NPE from rule timersJim Hahn2-68/+85
This problem occurs in rules that have "timer(expr)" expressions before the "when" clause. If a working memory element, other than the timer object, appears in the "when" clause and is updated BY ANY RULE, then an NPE is thrown. The solution is to segregate the objects so that rules having "timer(expr)" expressions only refer to one object, the XxxTimer object. In particular, the rule simply sets an "expired" flag in the XxxTimer object and then all other rules check that flag, rather than having their own "timer(expr)" expressions. Corrected comment associated with rule TIMER.FIRED. Change-Id: I9e6c20ee46af99234daee8ece4862edbd41ba714 Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-14Option to disable target locking. Needed by CLC.Joshua Reich2-34/+70
When used, the ControlLoopEventManager will set useTargetLock to false converting TargetLock lock/unlock operations to no-ops. Allows CLC-specified logic to coordinate closed loops instead of hard-coded mutual-exclusion enforced by target locking. Change-Id: Ic067c1e1ce47b12d12742ed4bc04d59aa42751d6 Issue-ID: POLICY-953 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-09-12implement Serializable in additional classesJim Hahn12-16/+322
Change-Id: I5d5acb9d71dc49eaa9fb397da5988ba3d8bd5f1d Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-12Add implementation for OOF PCI use caseSaravanan A40-5/+3254
Receive DMaaP message from PCI-Handler MS with PCI Config change recommendations through DCAE_CL_OUTPUT topic. Trigger SDN-R (if allowed by policy) by sending DMaaP request through SDNR-CL topic. When the response is received from SDNR through SDNR-CL-RSP topic, just parse and print. Code review comments addressed Change-Id: If340a23ae18367b7f98e31fe79c09a09e645b2ad Issue-ID: POLICY-1089 Signed-off-by: Saravanan A<saravanan.a75@wipro.com>
2018-09-11disable http for drools apps using dmaapJorge Hernandez4-77/+85
per security guidelines .. Change-Id: I1db4468f20c3bd22a9e5f27fefcb76b55a3b6d89 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1105
2018-09-10Added min and max vnf count supportMichael Mokry1-39/+79
Added variables for min and max with associated Constructor, getters and setters We will need to merge this commit before merging the policy/engine commit to avoid compilation errors in policy/engine build Made changes to address Jim Hahn's comments Change-Id: I45357077cfe046028adcc0033ecf29f8cc1a525b Issue-ID: POLICY-1038 Signed-off-by: Mike Mokry <mm117s@att.com>
2018-09-10Fix new sonar issue with vfModuleItemPiyush Garg1-22/+14
find the last non-base vf module item from AAI response and use the same to construct create or delete vf module SO request Change-Id: I3b9b97ac3008f6e4f7952662d9e4262f77dbeec4 Issue-ID: POLICY-1079 Signed-off-by: Piyush Garg <piyush.garg1@amdocs.com>
2018-09-06Merge "Added support for VF Module Delete recipe"Pamela Dragosh18-365/+728
2018-09-05Merge "Added junit test for commitAbatement."Jorge Hernandez3-14/+110
2018-09-05Add appc lcm request formatterGabriel3-5/+152
Formatter is used to dash case recipe in URL and camel case it in body. Issue-ID: POLICY-1083 Change-Id: I908ae93665f3d069b3a032ae378b7775ebe1110a Signed-off-by: Gabriel <adam.krysiak@nokia.com>
2018-09-04Added junit test for commitAbatement.Joshua Reich3-14/+110
Change-Id: Iee71481e357861618bed068f8b8ef37ec0ea2ab8 Issue-ID: POLICY-975 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-08-31Added support for VF Module Delete recipePiyush Garg18-365/+728
Enhanced SOActorServiceProvider to support VF Module Delete Recipe. Added SOOperationType enum to map the policy recipe with the SO API that we want to call for a recipe. vf module id from non-base vf module is used to construct the delete request url and same will be deleted. Updated SOManager so that it sends request to SO based on the SOOperationType enum value. Enhanced RESTManager to add support for the http delete using new class HttpDeleteWithBody (to allow pass the payload to the SO delete VF module API). Change-Id: I15b678ed9ebc85dfa7cb62bbf23e41c0fe6e4c69 Issue-ID: POLICY-1079 Signed-off-by: Piyush Garg <piyush.garg1@amdocs.com>
2018-08-31pass VF count to guard for scale-outJim Hahn8-49/+157
Also updated license dates. Fixed new checkstyle errors. Change-Id: Ia6153814c4333724185918f76be560aba5a52f96 Issue-ID: POLICY-1084 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-31Add code to store abatement events.Joshua Reich3-1/+59
Stores abatement events in history DB. Change-Id: Ifca6acd42cd9eea85e27765bd268a491028e305a Issue-ID: POLICY-975 Signed-off-by: Joshua Reich <jreich@research.att.com>
2018-08-29Fix remaining checkstylePamela Dragosh116-2137/+2876
Lots of formatting, missing javadoc, distance from use, imports must be explicit, ordering of methods. Fixed some abbreviation problems in classes and renamed JUnit tests to fix this. Issue-ID: POLICY-883 Change-Id: I8494f63d88d63c0232aca97f7bcc848816228fb1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-28Remove overriding dependencies warningsPamela Dragosh10-46/+25
With the move to oparent for dependencies, there are still some warnings in the pom's for overriding managed dependencies. Issue-ID: INT-619 Change-Id: I7ea771cc4536d8dfc77b4d1717e59cf6bfcfcda9 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-28Merge "use new SO API for scale-out"Pamela Dragosh19-248/+421
2018-08-28use new SO API for scale-outJim Hahn19-248/+421
Updated licenses and serialization IDs. Moved hashCode() and equals() methods to be in same location as in the original code so it can be more easily compared. Changed vDNS yaml timeout and retry to 1200 and 0, respectively, to match the original values. Removed extra newline from yaml, to match original yaml. Reformatted source to wrap lines at 120 characters and removing trailing white space. Change-Id: I3f5e59a1f44750347de49164f587d4ffefdee8b4 Issue-ID: POLICY-962 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-28Change parent to policy/parentPamela Dragosh18-51/+10
Should be pointing to policy/parent rather than oparent directly. This will automatically support upgrades more easily. Also removing duplicated managed version override warnings from Maven. This is continuing work to support the integration effort to consolidate common versions of java dependencies across all projects. Issue-ID: INT-619 Change-Id: I37ac20e669262d9ac8fff09fd1ac540190b47a30 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-24use new vf-walk code in SO requestJim Hahn12-200/+1179
Methods were added to AaiNqResponseWrapper to extract VF modules and generate the new VF module name. This step modifies the SO code to use those methods. It was also determined that the SO code needs the VF module container object, not just the VF module, itself. As a result, AaiNqResponseWrapper was modified to return a list of the containers instead of a list of the VF modules. Also modified the AAI simulator to return two VF modules in the response to the vserver named query. As part of that, a method was added to the simulator so that JSON responses can be read from files rather than having to convert them to Java Strings. Modified simulator to work even if vnf-id is null. Change-Id: I68fdf07ea80ee0daf9e16403e35b11710315a8a8 Issue-ID: POLICY-1037 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-23walk VF module namesjh73587-53/+732
Added code to walk the VF modules to count the number of modules and to generate the new module instance name. Added comment to test method. Fix checkstyle errors. Read json files instead of resources. Removed checkstyle plugin from aai pom, as it continues to barf every time I use some automated feature of Eclipse. Use Files.readAllBytes() instead of IoUtils.toString(uri). Try concatenating file path. Turned out to be a problem with file name case sensitivity - renamed the file. Change-Id: I1ce98d846dfa1d29e109b161c869108425d29771 Issue-ID: POLICY-1037 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-21move AAI named queryJim Hahn6-181/+233
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>
2018-08-17fix new sonar issues with prov-status checkJim Hahn1-36/+37
Changes made while adding the prov-status check triggered some sonar thresholds in ControlLoopEventManager. Updated the code to resolve them. One of the changes that had been introduced was to check for the existence of both the is-closed-loop-disabled AND the prov-status fields. However, if one is there then the other should be there, thus the second check is redundant and was removed, which should reduce the cyclomatic complexity back under the threshold. Re-ordered the code a little, to make it less ambiguous. Removed trailing white space. Change-Id: If0ce74cedbf947c32cae3df3374cda6ba1305cd2 Issue-ID: POLICY-964 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-15add prov-status check to AAI queriesJim Hahn19-191/+468
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>
2018-08-15Merge "Fix checkstyle issues"Jorge Hernandez11-58/+87
2018-08-15Merge "update AAI response classes per API"Pamela Dragosh31-717/+881
2018-08-14Fix checkstyle issuesPamela Dragosh11-58/+87
Spacing, missing javadoc Issue-ID: POLICY-883 Change-Id: Ice65c6c1baf0bb7c6273411f078bacfe3496b89b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-14update AAI response classes per APIJim Hahn31-717/+881
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>
2018-08-13Resolve checkstyle formattingPamela Dragosh27-1196/+1299
This submission is mostly focused on 120 spacing, missing spaces, rearranged imports, newlines before package and a few other items. Will have to submit further reviews to finish this. Issue-ID: POLICY-883 Change-Id: I772a2077ac97a0cb929810d8afadd2f415fae17b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-07Merge "Fix basic code issues in controlloop"Jorge Hernandez8-42/+44
2018-08-07Merge "add scripts to measure performance of PDP-D"Pamela Dragosh5-0/+2099
2018-08-06Fix basic code issues in controlloopKrishnajinka8-42/+44
Found few issues while going through the code. Fixing these issues in the controlloop package classes Issue-ID: POLICY-1017 Change-Id: I24d0ce1257ad689c3e9d9b7a3bea07eeb65383f1 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-06carry forward template changesJim Hahn1-346/+374
Incorporated changes, to clean-up objects that have no associated Param object, from the amsterdam rules template into the casablanca rules template. Also carried forward changes in behavior of PolicyGuard lock requests. Fix typo in comment. Change tabs to spaces and removing trailing spaces. Change-Id: Ifcfda573f4c271d804e526d8cc0bea4b89b16612 Issue-ID: POLICY-955 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-03add scripts to measure performance of PDP-DJim Hahn5-0/+2099
Also changed tabs to spaces in scripts. Fix typo in script name: "performace" -> "performance". Add comments to uebtime.sh. Removed comments about "wait". Added "mt" to report script name. Updated comments in both scripts. Renamed jmeter script. Modified uebtime.sh to scan zipped network files, too, and then combined uebtime.sh into generate.sh. Removed commented-out code from generate.sh. Ignore errors from "ls network*.zip" in generate.sh. Restructured the network.log parser and included additional request types in the list of times it extracts from the log. Removed unused import. Rebased. Removed unneeded network.log match pattern. Added comments about matching abatements. Renamed script to use hyphens instead of underscores, and dropped the ".sh" extension. Change-Id: I5f8e74cec3e83d5427be03f5e684c871a038f923 Issue-ID: POLICY-888 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-03rename rule template from beijing to casablancaJim Hahn41-40/+38
Changed assertTrue to assertEquals in CasablancaFeatureTest. Change-Id: I3bec009ddde2f10468575b4b7bf9c08c24748aae Issue-ID: POLICY-955 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-31https configuration for amsterdam controllerJorge Hernandez2-55/+67
configuration set to false until unblocked by DMAAP-547. Change-Id: I2efdafa8b143725fd73f05ec3d0a6a9ffc3b12c6 Issue-ID: POLICY-941 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-07-30Copy policy-endpoints from drools-pdp to commonmmis38-260/+350
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>
2018-07-16Use refresh() instead of lock() in guardJim Hahn2-43/+28
This is the second step of separating the lock "refresh" operation from the original "lock" operation. Modified PolicyGuard to use refresh() to extend a lock. Also removed the host name from the owner String, as it will no be longer needed (once the final step is done). Change-Id: I3a498e6f81d9dba1bbdfd6f7388087355192bcf5 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-12Merge "Username & password should be optional for VFC"Pamela Dragosh2-23/+19
2018-07-11Username & password should be optional for VFCJim Hahn2-23/+19
Also updated licenses. Replace tabs with spaces in new junit method. Updated licenses again. Change-Id: Iebff19353c052e59bfd69da1677e9a05c44592a0 Issue-ID: POLICY-869 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-11Merge "Include hostname as part of lock owner"Jorge Hernandez2-29/+35
2018-07-11Catch exception from missing property in operationJim Hahn1-66/+84
When a new operation is started it will throw an IllegalArgumentException if a property is missing. Modified the rules to catch this exception, indicate the failure, and move on to the next operation. Modified code to catch generic exception. Change-Id: Ie8c24371eb84ee55ff0a0a5fcacda3670483efc5 Issue-ID: POLICY-869 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-11Include hostname as part of lock ownerJim Hahn2-29/+35
Because the lock owner string is constructed, using just the target type and request ID, lock requests made by different ONSETs running on different PDP-Ds may both succeed. Added the hostname to the owner string so that locks for ONSETs for the same request ID will be rejected if the request is made on different PDP-Ds. Change-Id: I1d45194cbb1c5b1a1f6000477fe51879a2fecc19 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>