aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-01-12Add more methods to query deployment statusJim Hahn10-4/+191
Issue-ID: POLICY-2648 Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-08Add PDP-Policy deployment table to DBJim Hahn13-7/+780
Added a table to record the PDP policy deployment status, which is required for making PAP stateless. Issue-ID: POLICY-2648 Change-Id: Ibe40ce00aca7a600051edcac49e55651c1c0164f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-06Use annotations on parameterized typesJim Hahn25-827/+336
Updated the code to place validation annotations directly on the annotated types instead of using the @Items and @Entries annotations. Also added/updated junits for validation code. Issue-ID: POLICY-2648 Change-Id: Ia535da07a38cec77a74c5c3215b5ae784d7a4e1a Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-06Changed identifiers to concept identifiersliamfallon33-365/+543
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: Id0a37c42ea4e74f07b47e1694c4f8291c35879c9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-23Merge "Add Service Template TOSCA handling"Liam Fallon18-112/+793
2020-12-23Add Service Template TOSCA handlingliamfallon18-112/+793
Today we can only handle a single service template in the database. We should be able to handle multiple service templates and assign arbitrary policy types and policies to maned and versioned service templates. This review brings in the Java API in models provider for handling service templates in this way and uses a simplistic single-teplate implementation in models-tosca, that will work but still only handles a single service template under the hood. Issue-ID: POLICY-2900 Change-Id: Ia02dea8abe44b7f407e685090a4b8e0360889653 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-22Allow wild-card in supportedPolicyTypesJim Hahn2-1/+3
Changes to the validation code broke the validation check for the supportedPolicyTypes field in PdpSubGroup - it no longer supports wild- cards in the name. Modified the validation annotation in PfSearchableKey to allow wild-card names. Issue-ID: POLICY-2648 Change-Id: Ibd2853025ce72ed88697dd9a7d6d5eed2b28475e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-21Use annotations to do validationJim Hahn43-326/+660
Modified models to use annotations instead of function calls for most field validations. Created a few new validation annotations for use within models. Per review comments: - renamed Key to VerifyKey - enhanced VerifyKey to imply "@Valid", unless disabled Issue-ID: POLICY-2648 Change-Id: I2b53f218b0a2ab1ed1f5e278816a3509f1408972 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-17Use ValidationResult for models v2.0Jim Hahn87-2539/+1444
Policy models uses PfValidationXxx classes which are totally unrelated to ValidationResult in policy common. This precludes the use of various utility methods and annotations for doing validation. Modified policy models to use ValidationResult instead. This approach uses function calls, though a future approach could make use of annotations instead. Issue-ID: POLICY-2648 Change-Id: I9760f1dc46902ab6bef7f440f3caf5e951660a5d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-14JPA concepts for TOSCAliamfallon41-382/+3376
Implement the Database persistence parts for the new TOSCA concepts so that those concepts can be written to and read from the database. First batch of comment fixes Issue-ID: POLICY-2900 Change-Id: I45191c1ff57cf1ea8563399db6cc8e51b2724813 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-09Add functional method for mapping maps to PfUtilsliamfallon2-34/+30
Add a functional interface to PfUtils for mapping maps so that more complex conversions can be handled. List mapping functional methods added as well. Issue-ID: POLICY-2900 Change-Id: I4189e09d6d8621638960b5d9f0d19792a7faceb8 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-07Fix Modify NSSI operationkrishnaa962-15/+6
Update the operation to receive payload from the onset message Issue-ID: POLICY-2916 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: If49d41b35c1cd6562146fe4d92799a9a77a46db9
2020-12-04Merge "Add generic methods to TOSCA providers and utils"Jim Hahn6-29/+362
2020-12-04Merge "Address sonar issues in policy/models"Ajith Sreekumar3-5/+5
2020-12-03Add generic methods to TOSCA providers and utilsliamfallon6-29/+362
Generic methods for getting ehtire service templates are added to the TOSCA providers in models-tosca. These are needed to read service tempaltes containing entities that are not policy related. Issue-ID: POLICY-2900 Change-Id: If4c646037f51f8a18b66257426accc330905acf9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-03Merge "Remove unused imports"Ajith Sreekumar7-9/+4
2020-12-02Address sonar issues in policy/modelsJim Hahn3-5/+5
Addressed the following issues: - unused parameter in method call - make constructor of abstract class protected instead of public Issue-ID: POLICY-2905 Change-Id: I1e846b88246796f1ad5cee4a3bd296647732fd24 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-02Remove unused importsliamfallon7-9/+4
Issue-ID: POLICY-2900 Change-Id: Iaba37b81473b60d3da15a52ffcccdaa16a5b7091 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-12-02Merge "Use common LocalDateTimeTypeAdaptor for SO"Pamela Dragosh1-37/+4
2020-12-02Merge "Add extra authorative TOSCA concepts"Liam Fallon37-84/+538
2020-12-01Add extra authorative TOSCA conceptsliamfallon37-84/+538
This review brings in extra TOSCA concepts for Node types, nodes, and capabilities. The TOSCA handling is also amended to make the handling of equality consistent. Now, if filtering or ordering is required using an order rather than natural ordering, a comparator must be supplied by the user. Issue-ID: POLICY-2900 Change-Id: Ie40e86870b97eb993b1338bdc0666ac116f72f67 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-11-30Use common LocalDateTimeTypeAdaptor for SOJim Hahn1-37/+4
SO has its own specialized GSON type adapter. Modified it to subclass from the common type adapter. Issue-ID: POLICY-2903 Change-Id: I578eecbb1a37b5c95c5c27e6deb5c9f72ca7ae28 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-30Remove targetEntity from makeOutcomeJim Hahn10-55/+35
The Actor Params class had two flavors of makeOutcome, the second of which took a "targetEntity" parameter. As the Params no longer deal directly with the targetEntity, the second flavor was removed. Issue-ID: POLICY-2804 Change-Id: Ic736dd1c809ce54f6bb7cd37d03bc84cf4a1410c Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-20Delete preprocessed flag from actorsJim Hahn21-79/+64
Removed the "preprocessed" flag from the Actor parameter class, now that the actors no longer have a startPreprocess() method. Also removed targetEntity from Actor parameter class. Created a makeOutcome method within OperationPartial, which is used to create an initial outcome whose target field is pre-populated with the target-entity extracted from the properties. As the meaning of "target" may be specific to an operation, the makeOutcome method may be overridden by an operation subclass. Issue-ID: POLICY-2804 Change-Id: Ifb66de63301d644e69340009593513773ee5672d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-18Merge "Make Actors event-agnostic"Ram Krishna Verma54-7372/+212
2020-11-06Fix upcoming checkstyle issuesPamela Dragosh2-2/+3
When we upgrade to oparent, these will fail as oparent upgrades to 8.37 of puppycrawl which fixes a few bugs that should have flagged these previously. Issue-ID: POLICY-2887 Change-Id: Ia0ceab23ff3d5c177f657c5852115ab1b265c698 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-10-27Make Actors event-agnosticJim Hahn54-7372/+212
Removed event and event-context code from the Actor code. Also removed the preprocessing steps from the Actor code, giving the application complete control over any preprocessing. Also fixed a bug wherein the APPC actor was treating the AAI_RESOURCE_VNF property as a String instead of as a GenericVnf. Issue-ID: POLICY-2746-actor Change-Id: Ibc05fe39ffedc0bc461abf10e6a960861ac70119 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Point to snapshot versionsJim Hahn1-2/+2
Issue-ID: POLICY-2875 Change-Id: Ifac2f1e3330f6cf3ce6225bbc960974c257805f5 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump models master to 2.4.0 SNAPSHOTJim Hahn44-45/+45
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Iec7868062610a3acca6f883f999615ccc109f850 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-19Bump models to 2.3.6 snapshotJim Hahn44-44/+44
Issue-ID: POLICY-2869 Change-Id: I98223c20d6d1d6d9bf5bd958d9d3ed4aacdf17e6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-19Release models 2.3.5 artifacts7.0.0-ONAPJim Hahn1-0/+4
Issue-ID: POLICY-2869 Change-Id: I920b1da9fb26f3cf12ea23775188aa33d8bc80ed Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-16Merge "Default should be an object on TOSCA properties"Pamela Dragosh4-13/+83
2020-10-15Default should be an object on TOSCA propertiesliamfallon4-13/+83
Property default value is serialized to the database as Yaml and deserialized back into an object on a DB read. Issue-ID: POLICY-2844 Change-Id: I69f2843a93cd5f831359a0965223298b769498d9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-10-13Bug fixes and improvements in CDS Simulatora.sreekumar3-15/+79
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-09Bump models to 2.3.5Jim Hahn44-44/+44
Issue-ID: POLICY-2863 Change-Id: Iba0dfe78576a2ad1551c165e3b9f53fa3c55259a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Release models 2.3.4 artifactsJim Hahn1-0/+4
Issue-ID: POLICY-2863 Change-Id: I5d523aaed4da8a2e97a2ef520cdac73b2351633a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.4 snapshotJim Hahn44-44/+44
Issue-ID: POLICY-2863 Change-Id: I9d764a0cd695aa95a5880fd20b594e465d14c658 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Release models 2.3.3 artifactsJim Hahn1-0/+4
Issue-ID: POLICY-2863 Change-Id: I45e1de278f17fd3527cf700113ee0a879f4c90aa Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Specify "Accept" header in A&AI requestsJim Hahn4-7/+4
Modified the A&AI superclass to specify application/json for the Accept header. Removed the header from the subclasses. Issue-ID: POLICY-2863 Change-Id: I90974e305cb36ee2fa01999be4d79225a510e55b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Bump models to 2.3.3Jim Hahn44-46/+46
Issue-ID: POLICY-2839 Change-Id: Ifd7f45854904545b4f2973e1429cb791ac00b600 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Release models 2.3.2 artifactsJim Hahn1-0/+4
Issue-ID: POLICY-2839 Change-Id: Ib17668226d28bd966ddab5c583278e66bd61e321 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Fix parent package name in models simulatorJim Hahn2-2/+4
Stage release failed saying: Non-resolvable parent POM for org.onap.policy.models.sim:models-simulator-tarball Fixed the name of the parent artifact in the package poms. Issue-ID: POLICY-2839 Change-Id: I61c81133095d9dadd51d77d73ecfd1ef11695419 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Merge "fix orphan module issue"Jorge Hernandez2-0/+7
2020-10-07Merge "Adding basic logging to CDS Simulator"Jorge Hernandez2-1/+14
2020-10-07Merge "rename controller.controllerName to controller.name"Jorge Hernandez1-1/+1
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-06Merge "Don't always validate restServerParameters"Jorge Hernandez9-11/+84
2020-10-06fix orphan module issueTaka Cho2-0/+7
when running sonar:sonar models-simulator-tarball" module gets orphan module error Issue-ID: POLICY-2859 Change-Id: I1d08a7ffadb7446c04fb62460e33ba3d2abffe6e Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-10-06rename controller.controllerName to controller.namejhh1-1/+1
Issue-ID: POLICY-2860 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I097e15f5e6343b26bfb1afe69c530ce3142e18ec Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
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>