aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-03-31Merge "Restructure for authorative models"Liam Fallon94-1117/+1196
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>
2019-03-25Add provider for Tosca Policiesliamfallon13-31/+615
Provider working from JAVA API call through to database and back for TOSCA policies with full unit test. Issue-ID: POLICY-1195 Change-Id: I82cf3b513b4921dcb2e6726856aa4fbeb7d0d816 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-24Merge "Use enums from models-pdp in models-pap"Pamela Dragosh5-9/+9
2019-03-24Merge "Add input tosca examples for guard frequency"Pamela Dragosh2-0/+46
2019-03-23Use enums from models-pdp in models-papJim Hahn5-9/+9
Modified models-pap to use enums from models-pdp instead of from pdp-common. Change-Id: I3bc296358c672dff9c218c734583a135e5503e4c Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-22Merge "Add models-pdp to models repo"Pamela Dragosh19-6/+817
2019-03-22Add input tosca examples for guard frequencyJoshua Reich2-0/+46
Issue-ID: POLICY-1195 Change-Id: Ia73f8d1e21e2a37ada95727301031e9bb115aceb Signed-off-by: Joshua Reich <jreich@research.att.com>
2019-03-22Add models-pdp to models repoJim Hahn19-6/+817
Also changed supportedPolicyTypes to PfConceptKey. Updated licenses. Removed trailing whitespace from pom. Provide default request id. Rebased to fix merge conflict. Added SupportedPolicyType class. Renamed SupportedPolicyType to PolicyTypeIdent, and moved it to models-base. Also updated models-pap to use it. Deleted models-pdp Policy and replaced it with ToscaPolicy. Updated test method name. Change-Id: Id65f769c2f308c6b56e79978bd50b84f2e0b3d02 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-22Implement Database providerliamfallon21-97/+2034
This review brings in the structure of the database provider with complete unit test coverage. The provider delegates the details of each database interactino to the appropriate package in the model. Resolved merge conflict. Issue-ID: POLICY-1195 Change-Id: I9d01146415531d18bc9648dcf232b425bc09578d Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-21Add copy constructors for models-papJim Hahn11-14/+393
Also added a method to PfUtils to simplify cloning lists. Change-Id: Iae667be02cced57b0b9578e0a96c5cda38111b97 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-21Add module for error responsesPamela Dragosh6-0/+213
Module will hold a common error message object used by API's to clients for returning an overall error message and list of detail messages and warnings. Added an example and finished a JUnit test. Changed to response code from HTTP Added assertj and used StandardCoder Issue-ID: POLICY-1195 Change-Id: Id0fcf4831b8d03223c590f8085f207dbbbe559b4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-03-21Add interface to get info from exceptionsliamfallon4-4/+152
Interface allows uniform geting of information from checked and runtime model exceptions Issue-ID: POLICY-1195 Change-Id: I913b98a4d4b705ed256714392cafc72d6a71877f Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-20Implement persistence test for policiesliamfallon14-44/+275
The unit test MonitoringPolicySerializationTest tests persistence for policies and shows how persistence works. Issue-ID: POLICY-1195 Change-Id: I933eb538238f9ccd41ce69614e0c9afcac869c29 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-20Adding classes to models-papramverma6-5/+80
Change-Id: I59acfeeef5e2b93d7d16dbf5c26811a037e255c1 Issue-ID: POLICY-1541 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-03-19Move examples into separate moduleliamfallon40-18/+68
Issue-ID: POLICY-1195 Change-Id: Id2dc5b5b490134648ca267e27b795f3f4c03bc7b Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-19Merge "Add serialization/deserialization for tosca policy"Pamela Dragosh6-24/+130
2019-03-18Add serialization/deserialization for tosca policyChenfei Gao6-24/+130
Includes: a) Added serialization/deserialization for tosca policy b) Added serialization/deserialization for tosca topology template c) Added serialization/deserialization for tosca service template More junit tests for serialization/deserialization are being added, using the example input/output. Issue-ID: POLICY-1441 Change-Id: I5ef6b5ede35cfb1e88619e92535393cf8056987b Signed-off-by: Chenfei Gao <cgao@research.att.com>
2019-03-18Add decision modelsPamela Dragosh7-0/+272
Adding various decision models and their serialization handler classes Issue-ID: POLICY-1440 Change-Id: I35abfd9745a86b822f658ec3a512b7355cabf068 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-03-17Implement Legacy to TOSCA Mappingliamfallon59-227/+375
This first patch set is a rough first draft of how translation will work. Issue-ID: POLICY-1195 Change-Id: I4a57b049f5756dc6d1e2f4d458d9dd770f928eb2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-16Merge "Update monitoring policies with tcaPolicy"Jorge Hernandez10-227/+275