summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-05-03Fixed guard simulatorPamela Dragosh4-27/+69
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-05-02Merge "Fix version.properties"Jorge Hernandez1-1/+1
2019-05-02Fix bug in guard policy metadata creationliamfallon2-3/+32
Issue-ID: POLICY-1728 Change-Id: Ie33a30a811fcd8c128dfac87c17dcb37da6d42b4 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-05-02Fix version.propertiesPamela Dragosh1-1/+1
Not in synch with pom.xml. Should be 2.0.0 Issue-ID: POLICY-1700 Change-Id: I3a761c703ce39523d13607f8ef29c58e47f6b11f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-01Upgrade to release parent and commonPamela Dragosh1-2/+2
For Dublin release parent and common are released. Issue-ID: POLICY-1700 Change-Id: I33e4524c30472cfc789c0daaa771dad8e089c6c8 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-01Fix SONAR issues on DMaaP Simulatorliamfallon1-14/+21
Fixed interrupt issue and stack trace printout on DMaaP simulator. Issue-ID: POLICY-1643 Change-Id: I0a7898b7ea230960df8052981fe22dfeb3a04365 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-30Docker container for DMaaP Simulatorliamfallon9-2/+338
THis review brings in a Docker container for the DMaaP simulator for CSIT testing. This container should NOT be submitted to the ONAP nexus as it is only for testing. Issue-ID: POLICY-1643 Change-Id: I0e2147da9b7c0a85db68044439d48378d3a3e5b5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-29Address sonar issue in policy-models/pdpJim Hahn1-3/+5
Extracted a common constant. Change-Id: I24504109e9c7bbed352fa3e845d7d3f7b07db970 Issue-ID: POLICY-1708 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-25Add copy constructor for PdpStatus3.0.2-ONAPJim Hahn6-0/+227
Change-Id: Id818d3b16355ad3f3a96ff4456ec8e8062055f98 Issue-ID: POLICY-1645 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-25Populate policies, even if emptyJim Hahn2-1/+3
Modified PdpUpdate to create an empty policy list, by default, rather than leaving it null. Change-Id: I81906410bcc7da21d6471d496713ec9b375632a2 Issue-ID: POLICY-1692 Signed-off-by: Jim Hahn <jrh3@att.com>
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>