summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-04-23Exclude commons-beanutilsPamela Dragosh1-0/+6
Per A&AI team, this can be safely excluded. commons-beanutils has security vulnerabilities https://nvd.nist.gov/vuln/detail/CVE-2014-0114 Issue-ID: POLICY-1659 Change-Id: Ic70cc7cea4f2b3b7609219a0641252e37b8b2de9 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-20Merge "Fix a bug in adding one-digit policy-version in metadata"Jorge Hernandez2-6/+6
2019-04-19Fix a bug in adding one-digit policy-version in metadataChenfei Gao2-6/+6
Original change of adding single digit policy-version in tosca policy metadata does not take effect actually. It is added into metadata of authorative tosca policy but not jpa tosca policy. Identify the issue at the last minute and fix it. Issue-ID: POLICY-1442 Change-Id: I8aefa546f757f7841554e3caf00ccc476d23ebf5 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-19Exclude jackson-databindPamela Dragosh1-2/+6
Jackson databind has security issues, sometimes its easier to just exclude it if possible. This repo doesn't use it directly, the swagger dependency pulls it in. It doesn't look like our usage of swagger dependency would require the jackson-databind as we only use the annotation: @ApiModelProperty NOTE: Swagger also pulls in jackson-annotations, which seems to be used by a few modules for JSON annotations. eg. those modules are using jackson-annotations indirectly via the swagger dependency pulling in that dependency. Not a big deal. Compilation of policy/api repo works with this exclusion. Issue-ID: POLICY-1507 Change-Id: Ic8501df5ad4f4fc8f6cd93e739d7ff2e52d98785 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-17Add DMaaP simulator for CSIT testingliamfallon26-0/+1657
A rudimentary DMaaP simulator that simply holds requests and responds to all readers with whatever message comes in on a topic. The simulator is placed in policy models for now but should be submitted to DMaaP. The simulator is now working but is still extremely rough. Issue-ID: POLICY-1643 Change-Id: I28645a73cf198fe825c897243b30cd34dc29f20d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-16Don't include "nullVersion" in swagger APIJim Hahn2-0/+5
Swagger sitll uses jackson, thus it is including ToscaPolicyIdentifierOptVersion.isNullVersion() in the API that it generates. Added @JsonIgnore annotation to prevent it from being included. Similar issue with get/setVersion() in PdpGroup. Created POLICY-1653 to remove the isNullVersion() method altogether in El Alto. Change-Id: I6cb7b7d1d75258eeb9d6f9b6c7a48eeb32174307 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-16Fix null not accepted on PDP messageliamfallon2-1/+3
Issue-ID: POLICY-1648 Change-Id: I580d1c433cd3a5730b115ef6353770f17939cf3a Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-15Merge "Add serialized name for typeVersion"Jorge Hernandez1-0/+4
2019-04-15Add serialized name for typeVersionChenfei Gao1-0/+4
Add serialied name and swagger ui rendering name for attribute typeVersion in ToscaPolicy. Issue-ID: POLICY-1515 Change-Id: I42e85117c5f47901bf8c16d3cc6f162a8b6db5e1 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-04-15Fix sonar issue in PdpGroupsJim Hahn1-3/+5
Extracted common string constant. Change-Id: I5721641d8a45e7dce317cb6a1b75570a715779ea Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-15Merge "Use keys to speed DB queries"Pamela Dragosh2-5/+10
2019-04-15Use keys to speed DB queriesJim Hahn2-5/+10
When a filter specifies a name (and possibly version), those can be used to speed DB searches. Modified the code to use the keys rather than always retrieving every record before applying the filter. Change-Id: I6b48d9e6880ab7e8132d5d8f770394720031b9b5 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-15Add conversion from plain Ident to IdentOptVersionJim Hahn2-2/+28
Added a "copy constructor" that copies an Ident to an Ident with an optional version. The reverse does not make sense, so did not add that (e.g., version may be null or may just be a prefix, while the version in Ident is major.minor.patch). Change-Id: Ifd3935a998cd4c1cb5113a59c5f36a7d9baf79ff Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-15Merge "Add prefix matching for policy version"Pamela Dragosh4-14/+147
2019-04-14Add prefix matching for policy versionJim Hahn4-14/+147
Re-introduced regular expressions to match policy version so that the policy version found in the metadata, which is just the major number, can be matched with a policy's version, which is of the form, major.minor.patch. Simplified equals() test, as we already know "text!=null". Added filterPrefixPred() and modified policy filter to use it when matching versions, as it is simpler to use when matching a version prefix. Also added tests to PfObjectFilterTest to test each of the XxxPred() methods. Change-Id: I0734873f701a539e883fe25b8eecfdde60cc8b6d Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-13Disallow empty subgroup list in group requestJim Hahn3-8/+26
Change-Id: I8a00caf1b22363fe3ab90bdf57244af687a2cb6d Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-12Check for duplicates in listsJim Hahn4-18/+36
Modified duplicate subgroup check to eliminate sonar issue. Added duplicate group check. Modified ModelsTest to exclude PdpMessage, which seemed to cause intermittent junit failures. Change-Id: Id281874506d3a39610739e24cee49360b345724f Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-12Remove version from PdpGroupliamfallon16-652/+235
Issue-ID: POLICY-1095 Change-Id: I91f495947fe77222804e7ab31c4dd7d7aee66b44 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-12Add validation methods for PAP REST APIJim Hahn17-40/+616
Also made the identifier classes comparable. Stupid tabs. Change-Id: I54c0595c6a2c61a1b72b58fe1d667657f9d5d71e Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-12UNit test and minor fixes for DB parsliamfallon9-72/+56
Add unit test for the new database provider driver parameter. Address the comments raised in the last review. Issue-ID: POLICY-1095 Change-Id: I9f629d9f4446d12bfb492e00e49e07b97ef5a490 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-11Merge "Fix database properties"Pamela Dragosh20-231/+156
2019-04-11Merge "Use policy-id instead of name"Jorge Hernandez1-0/+3
2019-04-11Merge "Add constant PdpGroup.VERSION"Pamela Dragosh1-0/+6
2019-04-11Merge "Aai Simulator for CQ"Pamela Dragosh4-29/+744
2019-04-11Fix database propertiesliamfallon20-231/+156
Issue-ID: POLICY-1095 Change-Id: I3edd70898836d3bd978643857d1ba29599b1cf6c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-11Aai Simulator for CQpramod.jamkhedkar4-29/+744
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-11Add constant PdpGroup.VERSIONJim Hahn1-0/+6
At some point, the "version" field will be removed from PdpGroup. Until then, all groups should have the same version, thus added a constant for that value. Change-Id: Ib81e2760d04bea0abf83c42bf95fe861a7471176 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-11Use policy-id instead of nameJim Hahn1-0/+3
When CLAMP deploys a policy to the PDPs, it uses field names found in the meta-data, which are "policy-id" and "policy-version". Modified the class used by that particular to use those field names when encoded/decoded via gson. Change-Id: Ib67bd2cd05a906cc809dc6078efdabbd7aa1fa37 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-10Merge "Custom Query Code"Pamela Dragosh17-121/+3615
2019-04-10Custom Query Codepramod.jamkhedkar17-121/+3615
Changes to aai, so, vfc and restmanager to support aai custom queries. updated to latest version of aai schema. Made changes according to latest updates. Issue-ID: POLICY-1278 Change-Id: I255cef17fff4fe7d4ea21344c0e5ccaac52cbe9a Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2019-04-10Add policy ID and version to metadataliamfallon1-0/+13
Adds the policy-id and policy-version of the policy to the policy metadata, duplicating the policy key in therre. Issue-ID: POLICY-1095 Change-Id: I49603766141f5dee47573edc9f05d2ee2cf9da52 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-10Merge "Parse new model ids from operation policy"Pamela Dragosh1-1/+1
2019-04-10Finish unit test on policy-modelsliamfallon46-548/+1175
Unit test coverage well over 90% in policy-models-base policy-models-dao policy-models-pdp policy-models-tosca policy-models-provider Issue-ID: POLICY-1095 Change-Id: I7703e2ae8a93575ca478c3d809ff8c1fb9f0f334 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-10Parse new model ids from operation policyvamshi.nemalikonda1-1/+1
Takes VFModule info from policy yaml,instead AAI. Change-Id: If745b3ba32562cbc37571cea29ec7797ee697e88 Issue-ID: POLICY-1545 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
2019-04-09Add unit tests for policy type and policy filtersliamfallon12-10/+834
THis review adds unit tests for the authorative concepts in the models-tosc module and adds unit tests for the authorative and and database providers. Issue-ID: POLICY-1095 Change-Id: If98deea99658056030dd47725b0c0a4266d84106 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-09Merge "Parse new model ids from operational policy"Jorge Hernandez4-55/+122
2019-04-09Parse new model ids from operational policyPamela Dragosh4-55/+122
Companion review to https://gerrit.onap.org/r/#/c/84235/ Copies the required changes into policy/models. Issue-ID: POLICY-1545 Change-Id: I43fec36f60b5409d9e3df9d925de06209c81fd01 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-09Complete unit test for models-pdpliamfallon18-194/+1173
This review completes the unit test for the models-pdp module, for persistence of PDP groups and for PDP group filtering. Added unit test of filters for TOSCA policy types and policies. Added fix to allow filters to pass when the value being checked is null. Issue-ID: POLICY-1095 Change-Id: I982400ef39f0282d813d49e484a58207e03b8a63 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-09Merge "Code changes for OOF SON Use Case"Jorge Hernandez4-2/+274
2019-04-08Code changes for OOF SON Use CasePamela Dragosh4-2/+274
Companian review to https://gerrit.onap.org/r/#/c/84361/ Issue-ID: POLICY-1463 Change-Id: I2640f01c07890a4b1e8938175b637b84dcc19f3c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-08Add lists and tests for PDP filtersliamfallon13-86/+559
The policy type and policy filters for PDP groups are added in this review. Also filter tests for PDP group filter is completed. Issue-ID: POLICY-1095 Change-Id: Ia28776c809f2ab879af4007b3480621637a83f69 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-08Merge "Add bug fixes and tests for filters"Jorge Hernandez18-140/+570
2019-04-08Merge "Remove drools PDP dependency"Jorge Hernandez33-808/+235
2019-04-08Merge "Add PdpMessage.appliesTo()"Pamela Dragosh3-16/+168
2019-04-08Remove drools PDP dependencyPamela Dragosh33-808/+235
Removing working memory and use of PolicyEngine from drools in these classes. Cleaned up some unused imports and checkstyle. Issue-ID: POLICY-1264 Change-Id: Id059da9689a721b0eafc6b310adcbdad43574ce7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-08Add bug fixes and tests for filtersliamfallon18-140/+570
Fixed bugs on filtering where lack of null checks was blocking all results. Added unit test for PDP related JPA objects. Fixed cascading and orphan control on JPA objects. Added partial testing of PdpProvider. Added partial testing of filters. Changed tag for content of operational policies from "Content" to "content". Issue-ID: POLICY-1095 Change-Id: Ieb22e06955a8434b490bae7d0f6b77d4479515e8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-08Merge "Add unit test for PDP groups"Jorge Hernandez10-70/+909
2019-04-08Merge "Clean up a couple of array lists"Pamela Dragosh3-1/+12
2019-04-08Merge "Add undeploy response to models-pap"Liam Fallon4-3/+38
2019-04-08Add unit test for PDP groupsliamfallon10-70/+909
Unit test for the JPA concepts in models-pdp. Issue-ID: POLICY-1095 Change-Id: Id33626f3789da45e36935edf564003651e9ce7c4 Signed-off-by: liamfallon <liam.fallon@est.tech>