summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-04-03Add impl of more PDP persistenceliamfallon11-75/+504
Add the implementation of more metods in the PDP provider. Issue-ID: POLICY-1095 Change-Id: Ie02189cad7a262a453e1f731190525f838648401 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-03Merge "Add DecisionException"Jorge Hernandez2-0/+54
2019-04-02Add DecisionExceptionPamela Dragosh2-0/+54
Need this class to capture exceptions during decision and setup the ErrorResponse object to return from REST API. Issue-ID: POLICY-1440 Change-Id: I02cd4f93e671c0d543bf527f5de3cf6831f62c40 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-04-02Add persistence for PDP conceptsliamfallon23-90/+1501
This review adds the JPA annotations to PDP group/subgroup and PDP for persisting to the database. It also updates the Provider API as requested by other team members. Issue-ID: POLICY-1095 Change-Id: I8188afb763849ede9680f3751b464d9d76c27196 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-02Adding pdpHeartbeatIntervalMs to PdpUpdate messageramverma2-3/+6
Adding pdpHeartbeatIntervalMs to PdpUpdate message. The value of which can be used by Pdp to override its own interval for sending PdpStatus message as heartbeat to PAP. Change-Id: I720713b9b569cf09bf393ac797da29e7f330f8bf Issue-ID: POLICY-1443 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-02Merge "Remove pdpType from PdpUpdate"Liam Fallon2-5/+2
2019-04-02Merge "move actors code in drools-applications to policy/models"Pamela Dragosh186-344/+4823
2019-04-02Merge "Add extra methods to Provider interface"Pamela Dragosh10-129/+660
2019-04-01Remove PfConceptKey from models-pdp classesJim Hahn6-141/+65
PfConceptKey has different notions of "null", thus removing it from models-pdp. Change-Id: I3b0fc818a8283dcca0fb67ec6c3b6e2302d26196 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-01Remove pdpType from PdpUpdateJim Hahn2-5/+2
The pdpType field is redundant; it has the same value as the pdpSubgroup field. Change-Id: Id5cd0c726ffcf73aa82d35eb8cdbf1d7e3c2abc8 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-01Add extra methods to Provider interfaceliamfallon10-129/+660
This review provides the full specification of the Provider interfce and stups the new implemented methods into the relevant delegated providers. Issue-ID: POLICY-1095 Change-Id: I5f297f8dbbe4131ce910fce95459425ac8b7c3f9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-01Merge "Fix policy-models-pdp dependency"Pamela Dragosh1-1/+1
2019-04-01Fix policy-models-pdp dependencya.sreekumar1-1/+1
Change-Id: I97f33d295ef6871d6b4139e4f6c92d00e226c1e8 Issue-ID: POLICY-1443 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-01Fix breakage from ToscaPolicy refactoringJim Hahn3-9/+13
A few tests in models-pdp broken when ToscaPolicy was moved and refactored. Change-Id: If8e17a140ebc4f8f83b1f5c7cb32a542dd6e5390 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-01Merge "Refactor to authorative TOSCA serializtion"Pamela Dragosh71-2852/+1869
2019-04-01Merge "Add copy constructors to more models-pdp classes"Liam Fallon4-2/+165
2019-04-01move actors code in drools-applications to policy/modelsning.xi186-344/+4823
remove white-space in policy/models Issue-ID: POLICY-1264 Change-Id: I8856fc7cd2c2a57af0031637870ca33c684bacf5 Signed-off-by: ning.xi <ning.xi@est.tech>
2019-04-01Refactor to authorative TOSCA serializtionliamfallon71-2852/+1869
This review refactors the TOSCA support to use authorative serialization and mapping. It removes the JPA entities from the Proider interface It brings the mapping support from and to authorative concepts out of the JSON serialization classes directly into the JPA classes It adapts the unit tests to work with the refactored structure. Apologies for the review size but it all had to be done in a single block of work. Issue-ID: POLICY-1095 Change-Id: I4827d1dc67ef7aac98cba230ffcd79c6de71e805 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-31Merge "Restructure for authorative models"Liam Fallon94-1117/+1196
2019-03-31Add copy constructors to more models-pdp classesJim Hahn4-2/+165
Change-Id: I9c6dc85b13e3e114f380dd9581f3f4c055889260 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-29Merge "fix code smell in model-impl"Jorge Hernandez18-160/+156
2019-03-29Merge "Update comment in models-pap."Jorge Hernandez1-1/+1
2019-03-29fix code smell in model-implHengye18-160/+156
Issue-ID: POLICY-1264 Change-Id: Idacb7151978373e48098790d9d86825410b65aa6 Signed-off-by: Hengye <yehui.wang@est.tech>
2019-03-29Update comment in models-pap.Jim Hahn1-1/+1
Change-Id: If51abf12cec951d82738ce7579b583fa97a1a26b Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-29Merge "Add @NonNull to PolicyIdent"Pamela Dragosh1-0/+2
2019-03-29Restructure for authorative modelsliamfallon94-1117/+1196
Use authorative models instead of the JPA stored models as the venacular models in the Policy Framework. The next step is to pass the authorative objects over the provider interface rather than the JPA obejcts. This change will be made in the next review. Minor changes to pdp objects to remove JPA things from them. These object will be the authorative in-memory obejcts on the PDP side and new JPA entity object will be introduced in a future review to persist them. Issue-ID: POLICY-1095 Change-Id: I40e7b713903980cb41bb315417111b67a9b17307 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-28Add @NonNull to PolicyIdentJim Hahn1-0/+2
Change-Id: Ib10c92addfe4803dc28f82a7f844920134336b8a Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-27Add support for legacy guard policiesliamfallon23-524/+1179
Support for legacy guard policies added. Support for translation of all legacy policies to TOSCA format now complete. Fix merge problems with dummy provider implementation. Issue-ID: POLICY-1095 Change-Id: I3dd1775b78d39078a884e1834502b832ff40be18 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-27Merge "Add PfConceptKey.isVersionNull()"Jorge Hernandez1-1/+11
2019-03-27Merge "Fix VF Module Create in guard"Jorge Hernandez9-8/+20
2019-03-27Merge "migrate model-impl from drools-applications"Jorge Hernandez275-8/+25221
2019-03-27Add PfConceptKey.isVersionNull()Jim Hahn1-1/+11
Change-Id: I4b2f69bb023a07930b9f418b88078d04a24b7303 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-27Merge "Add Legacy Op Policy Persistence"Pamela Dragosh29-352/+1500
2019-03-27Merge "Fix file access issue in DummyProviderImpl"Liam Fallon4-60/+234
2019-03-26Add Legacy Op Policy Persistenceliamfallon29-352/+1500
Legacy operational policies now fully supported for serialization and persistence from provider through to database and back. Unit test coverage completed also Issue-ID: POLICY-1095 Change-Id: I65755859c94b50edee537d2685f51a7838c6541f Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-26Merge "Add persistence test for all policy examples"Liam Fallon10-240/+271
2019-03-26Fix file access issue in DummyProviderImplChenfei Gao4-60/+234
Changed to use ResourceUtils.getResourceAsString in policy/common project to access dummy files. Issue-ID: POLICY-1441 Change-Id: I42d7cb809a0eeedfc2a8a6b82edfe38ad7138548 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-03-26Merge "Add ErrorResponse to policy framework exceptions"Pamela Dragosh10-111/+160
2019-03-26Add persistence test for all policy examplesliamfallon10-240/+271
The test checks the TOSCA policy examples and ensures they can be persisted and read back from persistence. Test against the expected outcome will be added in later reviews. Tests for legacy and PDP-A policies willbe added in later reviews. Issue-ID: POLICY-1095 Change-Id: Ie06bbd477ff63618f126b01c9ab49bfc45b19ae9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-26Fix VF Module Create in guardPamela Dragosh9-8/+20
The correct recipe is VF Module Create and fixed missing content in one policy. Issue-ID: POLICY-1273 Change-Id: I87e30d72c1bb966158754d27cbc5ea4ae465bf65 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-03-26Implement serialization/deserialization for TOSCA conceptsChenfei Gao34-147/+2329
Includes: a) Build serialization for tosca policy b) Build serialization for tosca policy type c) Build serialization for tosca data type d) Build deserialization for tosca policy e) Build deserialization for tosca policy type f) Build deserialization for tosca data type g) Build plain tosca pojos for API endpoints h) Build plain tosca pojo mapper to map from/to internal tosca representation i) Add relevant junit tests Issue-ID: POLICY-1441 Change-Id: I30a4a1337c756f675fc7a5521e5f9e1a5e3eb97a Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-03-26Add ErrorResponse to policy framework exceptionsliamfallon10-111/+160
The ErrorResponse object is now contained in Policy Framework exceptions. Issue-ID: POLICY-1095 Change-Id: Ib0ce6cdbbead939afefc4afa3f507eb1a28c4a5c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-26Merge "Add internal classes to models-pdp"Jorge Hernandez7-0/+449
2019-03-26Merge "Add provider for Tosca Policies"Jorge Hernandez13-31/+615
2019-03-25Add internal classes to models-pdpJim Hahn7-0/+449
Added PdpGroup and other classes. These are the objects that will will actually be stored in the DB. The DB Provider classes should be updated to use these instead of the external classes found in models-pap. Note: These were copied from policy/pap. Change-Id: I2e5518d28e79c26038d0a1600553ab058bcdda1a Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-25Merge "Add PolicyIdentOptVersion"Pamela Dragosh22-331/+1207
2019-03-25Merge "Add new policy types"Jorge Hernandez16-3/+842
2019-03-25Add PolicyIdentOptVersionJim Hahn22-331/+1207
Added additional PolicyIdentXxx classes. Added PdpDeployPolicies, which makes use of it, thus eliminating the need for PdpPolicies, which will be deleted once the PAP has been modified to use the new code. Added Validated class to facilitate field validation. Added utility methods to Validated class. Use new validator methods in PolicyIdentXxx classes. Use addError() method in validator class. Use parameter types instead of "?". Use static Validator instead of local. Get "result" from each call to a validateXxx() method. Derived PolicyIdentOptVersion from PfConceptKey. Moved PolicyIdent classes to models-pdp. Added PolicyIdent classes to models-pap. Also removed copy constructors from classes in models-pap, as those are plain POJOs that will not be copied. Copy constructors will be added to new classes that will be added to models-pdp in a separate review. Forgot to include the new Ident classes in models-pap. Change-Id: I923132c464c7802ee3e9225685cde44f36c64620 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-25migrate model-impl from drools-applicationsHengye275-8/+25221
migrate controlloop/common/model-impl from drools-applicaitons to policy/models Issue-ID: POLICY-1264 Change-Id: Ibe0bb5c49a7b1344f4104b30455f52834041e187 Signed-off-by: Hengye <yehui.wang@est.tech>
2019-03-25Add new policy typesPamela Dragosh16-3/+842
These are the models from Optimization team. Please note the new matchable field. I'm trying to get clarification on what that field means. Added also a single file for all the optimization policies. Note, I think some of them may not be right. The hpa one did not render correct. But I can fix that later. Fixed capacity policy which had indentation wrong and VNFPolicy missing type. Added some guard examples. Fixed Decision Response to support fields for all the decisions. Issue-ID: POLICY-1273 Change-Id: Ib0c06cb203f6355e3050f7d8a7a51a0c1437a8a4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>