policy/models.git
5 years agoParse new model ids from operation policy 51/84851/1
vamshi.nemalikonda [Wed, 10 Apr 2019 10:43:14 +0000 (16:13 +0530)]
Parse new model ids from operation policy

Takes VFModule info from policy yaml,instead AAI.

Change-Id: If745b3ba32562cbc37571cea29ec7797ee697e88
Issue-ID: POLICY-1545
Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
5 years agoAdd unit tests for policy type and policy filters 25/84725/1
liamfallon [Tue, 9 Apr 2019 16:58:20 +0000 (16:58 +0000)]
Add unit tests for policy type and policy filters

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>
5 years agoMerge "Parse new model ids from operational policy"
Jorge Hernandez [Tue, 9 Apr 2019 14:29:28 +0000 (14:29 +0000)]
Merge "Parse new model ids from operational policy"

5 years agoParse new model ids from operational policy 72/84672/1
Pamela Dragosh [Tue, 9 Apr 2019 12:24:14 +0000 (08:24 -0400)]
Parse new model ids from operational policy

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>
5 years agoComplete unit test for models-pdp 36/84636/2
liamfallon [Tue, 9 Apr 2019 11:55:57 +0000 (11:55 +0000)]
Complete unit test for models-pdp

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>
5 years agoMerge "Code changes for OOF SON Use Case"
Jorge Hernandez [Tue, 9 Apr 2019 00:33:20 +0000 (00:33 +0000)]
Merge "Code changes for OOF SON Use Case"

5 years agoCode changes for OOF SON Use Case 66/84566/1
Pamela Dragosh [Mon, 8 Apr 2019 21:11:37 +0000 (17:11 -0400)]
Code changes for OOF SON Use Case

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>
5 years agoAdd lists and tests for PDP filters 47/84547/1
liamfallon [Mon, 8 Apr 2019 17:30:54 +0000 (17:30 +0000)]
Add lists and tests for PDP filters

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>
5 years agoMerge "Add bug fixes and tests for filters"
Jorge Hernandez [Mon, 8 Apr 2019 16:54:06 +0000 (16:54 +0000)]
Merge "Add bug fixes and tests for filters"

5 years agoMerge "Remove drools PDP dependency"
Jorge Hernandez [Mon, 8 Apr 2019 16:16:55 +0000 (16:16 +0000)]
Merge "Remove drools PDP dependency"

5 years agoMerge "Add PdpMessage.appliesTo()"
Pamela Dragosh [Mon, 8 Apr 2019 15:26:21 +0000 (15:26 +0000)]
Merge "Add PdpMessage.appliesTo()"

5 years agoRemove drools PDP dependency 19/84419/4
Pamela Dragosh [Sat, 6 Apr 2019 01:07:07 +0000 (21:07 -0400)]
Remove drools PDP dependency

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>
5 years agoAdd bug fixes and tests for filters 24/84524/2
liamfallon [Mon, 8 Apr 2019 13:58:53 +0000 (13:58 +0000)]
Add bug fixes and tests for filters

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>
5 years agoMerge "Add unit test for PDP groups"
Jorge Hernandez [Mon, 8 Apr 2019 12:22:50 +0000 (12:22 +0000)]
Merge "Add unit test for PDP groups"

5 years agoMerge "Clean up a couple of array lists"
Pamela Dragosh [Mon, 8 Apr 2019 11:45:24 +0000 (11:45 +0000)]
Merge "Clean up a couple of array lists"

5 years agoMerge "Add undeploy response to models-pap"
Liam Fallon [Mon, 8 Apr 2019 05:39:32 +0000 (05:39 +0000)]
Merge "Add undeploy response to models-pap"

5 years agoAdd unit test for PDP groups 65/84465/1
liamfallon [Mon, 8 Apr 2019 05:27:08 +0000 (05:27 +0000)]
Add unit test for PDP groups

Unit test for the JPA concepts in models-pdp.

Issue-ID: POLICY-1095
Change-Id: Id33626f3789da45e36935edf564003651e9ce7c4
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoClean up a couple of array lists 38/84438/3
Jim Hahn [Sun, 7 Apr 2019 14:50:27 +0000 (10:50 -0400)]
Clean up a couple of array lists

Initialized initial array size for empty list.
Add some junit tests to ensure that the returned lists are mutable.
Updated license in filter class.

Change-Id: I9c151eb50355a71f4d34ac46b41f8278cf913664
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd PdpMessage.appliesTo() 36/84436/2
Jim Hahn [Sun, 7 Apr 2019 13:49:41 +0000 (09:49 -0400)]
Add PdpMessage.appliesTo()

Added a method to determine if a message is applicable to a particular
PDP.  This is a common function that should have been added previously,
as each PDP type has had to create an implementation of it.
Nevertheless, this provides a "reference" implementation.

Change-Id: I54073c77a9d2b4c1f902c5ac0bce9fa5fa485503
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Fix bugs on filters"
Pamela Dragosh [Sun, 7 Apr 2019 00:20:08 +0000 (00:20 +0000)]
Merge "Fix bugs on filters"

5 years agoGuaranteed linear-time latestVersion() 25/84425/4
Jim Hahn [Sat, 6 Apr 2019 03:32:15 +0000 (23:32 -0400)]
Guaranteed linear-time latestVersion()

This is a proposed revision of the latestVersion() method that's
guaranteed to be linear time.  Still makes use of the slick idea
of sorting the list so that items with the same name are adjacent
and in order by version.
Revised to use an array list, which is more like the original code.

Change-Id: If047d4d9630c426c6335f52cb7e5bdda7b6cc0a9
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix bugs on filters 27/84427/1
liamfallon [Sat, 6 Apr 2019 05:19:43 +0000 (05:19 +0000)]
Fix bugs on filters

Filters were not being invoked from providers.
Filter for getting latest version was filtering out everything
Filter on PDP state was not implemented.

Issue-ID: POLICY-1095
Change-Id: If43ce48a57b010e05f75db8cfa80e63f2719ace1
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoAdd unit tests for models-base 03/84403/1
liamfallon [Fri, 5 Apr 2019 21:19:37 +0000 (21:19 +0000)]
Add unit tests for models-base

Brings coverage in models-base up over 99%

Issue-ID: POLICY-1095
Change-Id: Ie1c9f3f132715275f44f349a415a8bb34a0115c9
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoMissed simulator REST call SDNC 82/84382/1
Pamela Dragosh [Fri, 5 Apr 2019 18:10:33 +0000 (14:10 -0400)]
Missed simulator REST call SDNC

Forgot this as part of this review:
https://gerrit.onap.org/r/#/c/84338/

Issue-ID: POLICY-1264
Change-Id: I8b95cd43b593fd9a79c62b3398a5d44bb7b0c794
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdd undeploy response to models-pap 71/84371/2
Jim Hahn [Fri, 5 Apr 2019 17:01:47 +0000 (13:01 -0400)]
Add undeploy response to models-pap

Also modified toString() methods on other response classes to
invoke the super class' toString() so the error message is printed.

Change-Id: I7147da8acd521ed30d40aa6cbf2d8fd43715179b
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Complete filters for Database Fetches"
Pamela Dragosh [Fri, 5 Apr 2019 16:40:27 +0000 (16:40 +0000)]
Merge "Complete filters for Database Fetches"

5 years agoComplete filters for Database Fetches 06/84306/3
liamfallon [Fri, 5 Apr 2019 15:40:15 +0000 (15:40 +0000)]
Complete filters for Database Fetches

This review completes the implementaiton of the filters
for fetching policy types, policies, and PDP groups
from the database.

It also fixes bugs in Policy type creation.

Yaml in some of the policy type examples modified so that it is syntatically
correct.

Proeprties now stored as a blob in DB as they can be big.

Issue-ID: POLICY-1095
Change-Id: I6aef88ee2905afa58d778d82832f2b55d794fe9c
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoremove dependency of drool-application/yaml in actors 66/84066/4
ning.xi [Thu, 4 Apr 2019 02:55:50 +0000 (02:55 +0000)]
remove dependency of drool-application/yaml in actors

Issue-ID: POLICY-1264
Change-Id: Ie89749cf25d6880fd2884eb6935f36f046114b23
Signed-off-by: ning.xi <ning.xi@est.tech>
5 years agoMerge "move two modules from drools-application to models"
Jorge Hernandez [Fri, 5 Apr 2019 15:30:39 +0000 (15:30 +0000)]
Merge "move two modules from drools-application to models"

5 years agomove two modules from drools-application to models 63/84063/3
ning.xi [Wed, 3 Apr 2019 08:10:03 +0000 (16:10 +0800)]
move two modules from drools-application to models

Also removed reference to drools logging util.

Issue-ID: POLICY-1264
Change-Id: I7795f23b2b06fcb98f4099c3a6c303561a68e55f
Signed-off-by: ning.xi <ning.xi@est.tech>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoUpdate SDNC changes 38/84338/1
Pamela Dragosh [Fri, 5 Apr 2019 12:43:33 +0000 (08:43 -0400)]
Update SDNC changes

Per this review: https://gerrit.onap.org/r/#/c/83945/

Copying those changes into policy/models before removal
in drools-applications.

Issue-ID: POLICY-1264
Change-Id: I151816e78293af813d24ca1164ca364a3c54f87c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoUpdates to models from scrum on 4/4 53/84253/5
Jim Hahn [Thu, 4 Apr 2019 15:20:42 +0000 (11:20 -0400)]
Updates to models from scrum on 4/4

Moved ToscaPolicyIdentXxx classes from models-pdp to models-tosca,
and added methods to retrieve them from a ToscaPolicy.

Removed version and instance fields from PdpStatus.

Chose to leave "description" field in the PAP/PDP messages.  The
PDPs can ignore them or leave them null.  In a PdpUpdate message,
the description will be the description associated with the PdpGroup.
In a PdpStatus message, the PDP could choose to provide a description
of the PDP, itself (or the type of PDP).
Added comments to that effect.

Moved name, group, and subgroup fields into PdpMessage.

Fixed typos in comments.
Updated licenses.
Change "long" to "Long" in PdpUpdate.
Use lombok @ToString instead of override.

Fixed merge conflict.

Change-Id: Icd928f9a7630b838ad4b0b5556e899dc21b7872b
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd filters on policy objects 62/84262/1
liamfallon [Thu, 4 Apr 2019 17:27:50 +0000 (17:27 +0000)]
Add filters on policy objects

I just raised this review to shwo where I'm going with the
filters. They are not complete yet.

Issue-ID: POLICY-1095
Change-Id: I7b602a32bb67159b893f3b3cefea5d88038c4e5f
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoMerge "Add filter obejcts for concepts"
Pamela Dragosh [Thu, 4 Apr 2019 15:54:23 +0000 (15:54 +0000)]
Merge "Add filter obejcts for concepts"

5 years agoMerge "Add ApiModelProperty annotation to authorative models"
Pamela Dragosh [Thu, 4 Apr 2019 13:57:30 +0000 (13:57 +0000)]
Merge "Add ApiModelProperty annotation to authorative models"

5 years agoAdd filter obejcts for concepts 37/84237/1
liamfallon [Thu, 4 Apr 2019 12:16:12 +0000 (12:16 +0000)]
Add filter obejcts for concepts

This review:
- Fixes the bug in getting policies where the key fields were null
- Removes complex version checks from DAO interface
- Simplifies provider API by introducing filter objects for searches

Issue-ID: POLICY-1095
Change-Id: I5ab7471c03e8b61849e7882ed18541acd627dc39
Signed-off-by: liamfallon <liam.fallon@est.tech>
5 years agoAdd ApiModelProperty annotation to authorative models 65/84165/2
Chenfei Gao [Thu, 4 Apr 2019 01:37:23 +0000 (21:37 -0400)]
Add ApiModelProperty annotation to authorative models

Add @ApiModelProperty to authorative models for the fields
that have different serialized names from their property names.

Issue-ID: POLICY-1515
Change-Id: Id6509afe5cc741a6253fc0d1f98ae6b22d31f0d9
Signed-off-by: Chenfei Gao <cgao@research.att.com>
5 years agoUpdating PdpStatistics model 52/84152/1
ramverma [Wed, 3 Apr 2019 23:08:44 +0000 (23:08 +0000)]
Updating PdpStatistics model

Change-Id: Ic3ae28997dd1db14c16bdfd24a5d936393fa8da4
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
5 years agoMerge "Clean up models-pap based on updates to models-pdp"
Jorge Hernandez [Wed, 3 Apr 2019 21:14:05 +0000 (21:14 +0000)]
Merge "Clean up models-pap based on updates to models-pdp"

5 years agoMerge "Add impl of more PDP persistence"
Liam Fallon [Wed, 3 Apr 2019 20:11:58 +0000 (20:11 +0000)]
Merge "Add impl of more PDP persistence"

5 years agoClean up models-pap based on updates to models-pdp 27/84127/1
Jim Hahn [Wed, 3 Apr 2019 17:15:49 +0000 (13:15 -0400)]
Clean up models-pap based on updates to models-pdp

Change-Id: I5e55dd669200e4fc28f58379bbaa61e5d3331610
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd impl of more PDP persistence 17/84117/1
liamfallon [Wed, 3 Apr 2019 15:47:36 +0000 (15:47 +0000)]
Add impl of more PDP persistence

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>
5 years agoChanging PAP model as per discussion 08/84108/1
ramverma [Wed, 3 Apr 2019 14:58:57 +0000 (14:58 +0000)]
Changing PAP model as per discussion

1) Changing PAP models to use ToscaPolicyIdentifier instead of actual
ToscaPolicy itself.
2) Deleting unused PdpHealthCheck message. As we decided to return heath
check based on DB state.
3) Updating PdpStatus message to use ToscaPolicyIdentifier instead of actual
ToscaPolicy itself. Pdp don't need to send the whole ToscaPolicy
everytime in heartbeat to PAP. Instead the identifier is sufficient.

Change-Id: I50ead8d8b6af118fd1da08071a2b0fc50584d4aa
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
5 years agoMerge "Add DecisionException"
Jorge Hernandez [Wed, 3 Apr 2019 14:25:35 +0000 (14:25 +0000)]
Merge "Add DecisionException"

5 years agoAdd DecisionException 08/84008/2
Pamela Dragosh [Tue, 2 Apr 2019 20:33:12 +0000 (13:33 -0700)]
Add DecisionException

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>
5 years agoAdd persistence for PDP concepts 07/84007/3
liamfallon [Tue, 2 Apr 2019 23:32:32 +0000 (23:32 +0000)]
Add persistence for PDP concepts

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>
5 years agoAdding pdpHeartbeatIntervalMs to PdpUpdate message 95/83995/1
ramverma [Tue, 2 Apr 2019 18:22:41 +0000 (18:22 +0000)]
Adding pdpHeartbeatIntervalMs to PdpUpdate message

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>
5 years agoMerge "Remove pdpType from PdpUpdate"
Liam Fallon [Tue, 2 Apr 2019 13:06:26 +0000 (13:06 +0000)]
Merge "Remove pdpType from PdpUpdate"

5 years agoMerge "move actors code in drools-applications to policy/models"
Pamela Dragosh [Tue, 2 Apr 2019 12:44:26 +0000 (12:44 +0000)]
Merge "move actors code in drools-applications to policy/models"

5 years agoMerge "Add extra methods to Provider interface"
Pamela Dragosh [Tue, 2 Apr 2019 12:25:51 +0000 (12:25 +0000)]
Merge "Add extra methods to Provider interface"

5 years agoRemove PfConceptKey from models-pdp classes 02/83902/2
Jim Hahn [Mon, 1 Apr 2019 23:08:10 +0000 (19:08 -0400)]
Remove PfConceptKey from models-pdp classes

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>
5 years agoRemove pdpType from PdpUpdate 97/83897/2
Jim Hahn [Mon, 1 Apr 2019 22:29:16 +0000 (18:29 -0400)]
Remove pdpType from PdpUpdate

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>
5 years agoAdd extra methods to Provider interface 95/83895/1
liamfallon [Mon, 1 Apr 2019 21:03:34 +0000 (21:03 +0000)]
Add extra methods to Provider interface

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>
5 years agoMerge "Fix policy-models-pdp dependency"
Pamela Dragosh [Mon, 1 Apr 2019 18:31:22 +0000 (18:31 +0000)]
Merge "Fix policy-models-pdp dependency"

5 years agoFix policy-models-pdp dependency 63/83863/3
a.sreekumar [Mon, 1 Apr 2019 14:16:27 +0000 (14:16 +0000)]
Fix policy-models-pdp dependency

Change-Id: I97f33d295ef6871d6b4139e4f6c92d00e226c1e8
Issue-ID: POLICY-1443
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
5 years agoFix breakage from ToscaPolicy refactoring 74/83874/1
Jim Hahn [Mon, 1 Apr 2019 16:23:51 +0000 (12:23 -0400)]
Fix breakage from ToscaPolicy refactoring

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>
5 years agoMerge "Refactor to authorative TOSCA serializtion"
Pamela Dragosh [Mon, 1 Apr 2019 16:07:07 +0000 (16:07 +0000)]
Merge "Refactor to authorative TOSCA serializtion"

5 years agoMerge "Add copy constructors to more models-pdp classes"
Liam Fallon [Mon, 1 Apr 2019 15:36:19 +0000 (15:36 +0000)]
Merge "Add copy constructors to more models-pdp classes"

5 years agomove actors code in drools-applications to policy/models 79/83679/2
ning.xi [Mon, 1 Apr 2019 03:07:40 +0000 (03:07 +0000)]
move actors code in drools-applications to policy/models

remove white-space in policy/models

Issue-ID: POLICY-1264

Change-Id: I8856fc7cd2c2a57af0031637870ca33c684bacf5
Signed-off-by: ning.xi <ning.xi@est.tech>
5 years agoRefactor to authorative TOSCA serializtion 15/83815/1
liamfallon [Mon, 1 Apr 2019 00:34:34 +0000 (00:34 +0000)]
Refactor to authorative TOSCA serializtion

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>
5 years agoMerge "Restructure for authorative models"
Liam Fallon [Sun, 31 Mar 2019 23:17:59 +0000 (23:17 +0000)]
Merge "Restructure for authorative models"

5 years agoAdd copy constructors to more models-pdp classes 96/83796/2
Jim Hahn [Sun, 31 Mar 2019 05:15:57 +0000 (01:15 -0400)]
Add copy constructors to more models-pdp classes

Change-Id: I9c6dc85b13e3e114f380dd9581f3f4c055889260
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "fix code smell in model-impl"
Jorge Hernandez [Fri, 29 Mar 2019 19:59:46 +0000 (19:59 +0000)]
Merge "fix code smell in model-impl"

5 years agoMerge "Update comment in models-pap."
Jorge Hernandez [Fri, 29 Mar 2019 15:51:42 +0000 (15:51 +0000)]
Merge "Update comment in models-pap."

5 years agofix code smell in model-impl 30/83530/3
Hengye [Fri, 29 Mar 2019 15:07:38 +0000 (15:07 +0000)]
fix code smell in model-impl

Issue-ID: POLICY-1264
Change-Id: Idacb7151978373e48098790d9d86825410b65aa6
Signed-off-by: Hengye <yehui.wang@est.tech>
5 years agoUpdate comment in models-pap. 62/83662/2
Jim Hahn [Thu, 28 Mar 2019 21:03:19 +0000 (17:03 -0400)]
Update comment in models-pap.

Change-Id: If51abf12cec951d82738ce7579b583fa97a1a26b
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Add @NonNull to PolicyIdent"
Pamela Dragosh [Fri, 29 Mar 2019 11:25:33 +0000 (11:25 +0000)]
Merge "Add @NonNull to PolicyIdent"

5 years agoRestructure for authorative models 97/83697/2
liamfallon [Fri, 29 Mar 2019 10:31:22 +0000 (10:31 +0000)]
Restructure for authorative models

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>
5 years agoAdd @NonNull to PolicyIdent 53/83653/2
Jim Hahn [Thu, 28 Mar 2019 19:24:37 +0000 (15:24 -0400)]
Add @NonNull to PolicyIdent

Change-Id: Ib10c92addfe4803dc28f82a7f844920134336b8a
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoAdd support for legacy guard policies 05/83505/4
liamfallon [Wed, 27 Mar 2019 22:27:14 +0000 (22:27 +0000)]
Add support for legacy guard policies

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>
5 years agoMerge "Add PfConceptKey.isVersionNull()"
Jorge Hernandez [Wed, 27 Mar 2019 16:29:58 +0000 (16:29 +0000)]
Merge "Add PfConceptKey.isVersionNull()"

5 years agoMerge "Fix VF Module Create in guard"
Jorge Hernandez [Wed, 27 Mar 2019 14:58:49 +0000 (14:58 +0000)]
Merge "Fix VF Module Create in guard"

5 years agoMerge "migrate model-impl from drools-applications"
Jorge Hernandez [Wed, 27 Mar 2019 14:58:33 +0000 (14:58 +0000)]
Merge "migrate model-impl from drools-applications"

5 years agoAdd PfConceptKey.isVersionNull() 93/83493/1
Jim Hahn [Wed, 27 Mar 2019 14:41:44 +0000 (10:41 -0400)]
Add PfConceptKey.isVersionNull()

Change-Id: I4b2f69bb023a07930b9f418b88078d04a24b7303
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoMerge "Add Legacy Op Policy Persistence"
Pamela Dragosh [Wed, 27 Mar 2019 11:03:57 +0000 (11:03 +0000)]
Merge "Add Legacy Op Policy Persistence"

5 years agoMerge "Fix file access issue in DummyProviderImpl"
Liam Fallon [Wed, 27 Mar 2019 09:20:17 +0000 (09:20 +0000)]
Merge "Fix file access issue in DummyProviderImpl"

5 years agoAdd Legacy Op Policy Persistence 22/83422/1
liamfallon [Tue, 26 Mar 2019 22:31:43 +0000 (22:31 +0000)]
Add Legacy Op Policy Persistence

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>
5 years agoMerge "Add persistence test for all policy examples"
Liam Fallon [Tue, 26 Mar 2019 22:02:45 +0000 (22:02 +0000)]
Merge "Add persistence test for all policy examples"

5 years agoFix file access issue in DummyProviderImpl 00/83400/3
Chenfei Gao [Tue, 26 Mar 2019 18:46:31 +0000 (14:46 -0400)]
Fix file access issue in DummyProviderImpl

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>
5 years agoMerge "Add ErrorResponse to policy framework exceptions"
Pamela Dragosh [Tue, 26 Mar 2019 17:08:31 +0000 (17:08 +0000)]
Merge "Add ErrorResponse to policy framework exceptions"

5 years agoAdd persistence test for all policy examples 97/83297/2
liamfallon [Tue, 26 Mar 2019 15:42:42 +0000 (15:42 +0000)]
Add persistence test for all policy examples

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>
5 years agoFix VF Module Create in guard 64/83364/1
Pamela Dragosh [Tue, 26 Mar 2019 15:07:34 +0000 (11:07 -0400)]
Fix VF Module Create in guard

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>
5 years agoImplement serialization/deserialization for TOSCA concepts 88/83288/2
Chenfei Gao [Tue, 26 Mar 2019 02:42:39 +0000 (22:42 -0400)]
Implement serialization/deserialization for TOSCA concepts

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>
5 years agoAdd ErrorResponse to policy framework exceptions 15/83315/1
liamfallon [Tue, 26 Mar 2019 09:26:00 +0000 (09:26 +0000)]
Add ErrorResponse to policy framework exceptions

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>
5 years agoMerge "Add internal classes to models-pdp"
Jorge Hernandez [Tue, 26 Mar 2019 00:33:45 +0000 (00:33 +0000)]
Merge "Add internal classes to models-pdp"

5 years agoMerge "Add provider for Tosca Policies"
Jorge Hernandez [Tue, 26 Mar 2019 00:32:17 +0000 (00:32 +0000)]
Merge "Add provider for Tosca Policies"

5 years agoAdd internal classes to models-pdp 46/83246/2
Jim Hahn [Mon, 25 Mar 2019 15:12:06 +0000 (11:12 -0400)]
Add internal classes to models-pdp

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>
5 years agoMerge "Add PolicyIdentOptVersion"
Pamela Dragosh [Mon, 25 Mar 2019 17:23:42 +0000 (17:23 +0000)]
Merge "Add PolicyIdentOptVersion"

5 years agoMerge "Add new policy types"
Jorge Hernandez [Mon, 25 Mar 2019 15:38:16 +0000 (15:38 +0000)]
Merge "Add new policy types"

5 years agoAdd PolicyIdentOptVersion 84/83084/18
Jim Hahn [Fri, 22 Mar 2019 18:12:03 +0000 (14:12 -0400)]
Add PolicyIdentOptVersion

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>
5 years agomigrate model-impl from drools-applications 11/83211/1
Hengye [Mon, 25 Mar 2019 14:32:21 +0000 (14:32 +0000)]
migrate model-impl from drools-applications

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>
5 years agoAdd new policy types 58/83058/5
Pamela Dragosh [Fri, 22 Mar 2019 17:33:19 +0000 (13:33 -0400)]
Add new policy types

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>
5 years agoAdd provider for Tosca Policies 50/83150/1
liamfallon [Mon, 25 Mar 2019 08:09:14 +0000 (08:09 +0000)]
Add provider for Tosca Policies

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>
5 years agoMerge "Use enums from models-pdp in models-pap"
Pamela Dragosh [Sun, 24 Mar 2019 14:44:06 +0000 (14:44 +0000)]
Merge "Use enums from models-pdp in models-pap"

5 years agoMerge "Add input tosca examples for guard frequency"
Pamela Dragosh [Sun, 24 Mar 2019 12:11:35 +0000 (12:11 +0000)]
Merge "Add input tosca examples for guard frequency"

5 years agoUse enums from models-pdp in models-pap 09/83109/2
Jim Hahn [Sun, 24 Mar 2019 03:42:34 +0000 (23:42 -0400)]
Use enums from models-pdp in models-pap

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>
5 years agoMerge "Add models-pdp to models repo"
Pamela Dragosh [Fri, 22 Mar 2019 23:09:06 +0000 (23:09 +0000)]
Merge "Add models-pdp to models repo"

5 years agoAdd input tosca examples for guard frequency 07/83007/2
Joshua Reich [Fri, 22 Mar 2019 07:50:29 +0000 (00:50 -0700)]
Add input tosca examples for guard frequency

Issue-ID: POLICY-1195
Change-Id: Ia73f8d1e21e2a37ada95727301031e9bb115aceb
Signed-off-by: Joshua Reich <jreich@research.att.com>
5 years agoAdd models-pdp to models repo 38/82938/11
Jim Hahn [Thu, 21 Mar 2019 13:54:30 +0000 (09:54 -0400)]
Add models-pdp to models repo

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>
5 years agoImplement Database provider 63/82963/3
liamfallon [Fri, 22 Mar 2019 15:59:21 +0000 (15:59 +0000)]
Implement Database provider

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>