Jim Hahn [Tue, 18 Feb 2020 13:13:45 +0000 (08:13 -0500)]
Actor updates to support SO
Used SuperBuilder in operation Params classes.
Added rawResponse to http setOutcome().
Made HttpOperation.operator private.
Issue-ID: POLICY-2371
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ie894f2e6ae4a31b69a700e425f9e94c5e8a15daa
Pamela Dragosh [Tue, 18 Feb 2020 17:14:29 +0000 (17:14 +0000)]
Merge "More changes to actor code"
Liam Fallon [Tue, 18 Feb 2020 16:13:01 +0000 (16:13 +0000)]
Merge "add unit test for pdpstatistics provider"
liamfallon [Tue, 18 Feb 2020 08:53:02 +0000 (08:53 +0000)]
Add missing classes to persistence.xml
The recent policy-models changes cascade database changes to some new
classes. THis change adds these classes to persistence.xml.
Issue-ID: POLICY-1402
Change-Id: I4d9953c8423dc6e33f6852744c394c9cfbc21ac6
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Mon, 17 Feb 2020 18:57:56 +0000 (13:57 -0500)]
More changes to actor code
Use Coder.convert() from policy-common.
Passed response to setOutcome().
Changed class names from XxxOperator to XxxOperation.
Modified SDNC junits to invoke start() instead of startOperationAsync().
Changed context obtain() to re-run if the future was canceled.
Added junit support class, BasicBidirectionalTopicOperation.
Modified HttpOperation to allow subsequent requests to be issued.
Some actors, like SO, send an initial HTTP request and then follow
it with HTTP "are you done?" requests.
Issue-ID: POLICY-2363-prop
Change-Id: I12b5c2d4f07254e0cb79fabfe1ccf844b70a0654
Signed-off-by: Jim Hahn <jrh3@att.com>
ning.xi [Thu, 13 Feb 2020 10:00:36 +0000 (18:00 +0800)]
add unit test for pdpstatistics provider
Issue-ID: POLICY-2314
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: Ifb23ab301a326cc30950ecc2f115979fa261bc68
Jim Hahn [Mon, 17 Feb 2020 22:25:03 +0000 (22:25 +0000)]
Merge "Use BidirectionalTopicClient from policy-common"
Pamela Dragosh [Mon, 17 Feb 2020 16:47:37 +0000 (16:47 +0000)]
Merge "Add/Update test cases for PdpStatistics entity"
Jim Hahn [Fri, 14 Feb 2020 19:22:48 +0000 (14:22 -0500)]
Use BidirectionalTopicClient from policy-common
Also modified "target" to sink in various places, and renamed
various uses of "pair" to "bidirectional" (e.g., TopicPairParams
=> BidirectionalTopicParams).
Also replaced MyExec with PseudoExecutor, from policy-common.
As part of this, extracted the logRequest and logResponse methods
from the Http and Topic classes, moving them into the common
OperationPartial class.
Modified A&AI, SDNC junit tests to use PseudoExecutor.
Added support for incomplete responses on Topics, where multiple
responses may be received for one request
Fixed a duplicate entry in actor.aai pom.
As the changes were already big enough, went ahead and also did the
following to support the APPC Actor:
- Reorganized parameter classes and content.
- Modified anyOf, allOf to take functions instead of futures and handle
exceptions thrown by any of the functions. Also added sequence() method.
- Deleted doTask.
- Modified ActorService.config to take a map of maps, not just a map.
- Decided NOT to move anyOf, allOf, and sequence from OperationPartial
to a utility class, because they depend on "params".
Issue-ID: POLICY-2363
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I5a8bae05dfef22fe71c57c58f265b9dac20df5c5
Pamela Dragosh [Wed, 12 Feb 2020 16:35:07 +0000 (11:35 -0500)]
Add missing entry_schema for operational policy type
Also ensure the json for vFirewall matches the yaml. We will
need to clean up some of the other legacy operational policies.
Or at least rename them.
Renamed legacy Operational policies to avoid confusion.
Fixed wrong derived_from policy types.
Operational Policy Types are now solely for new TOSCA compliant
operational policy types.
Issue-ID: POLICY-2146
Change-Id: Ia0bcabe6cca8e197f1bec8157a3004a420033969
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
huaxing [Thu, 13 Feb 2020 03:40:35 +0000 (11:40 +0800)]
Add/Update test cases for PdpStatistics entity
Add test cases for PdpStatistics / PdpEngineWorkerStatistics / JpaPdpStatistics.
Add lombok.Data annotation to PdpStatistics and
PdpEngineWorkerStatistics to facilitate testing.
Issue-ID: POLICY-1628
Signed-off-by: huaxing <huaxing.jin@est.tech>
Change-Id: I4269678641716a56db260ad67a30c97b904123cd
liamfallon [Mon, 17 Feb 2020 00:51:13 +0000 (00:51 +0000)]
Fix return building on policy get
The service template that is being returned for the "get" has to be built
up in the correct order. A policy and the policy types and data types it
is referencing must be added together. Before, all the policies were added
at once and then the policy types and data types for the policies were added
afterwards. This means that if the service template is validated during
the service template build, validation may fail, depending on the order
of building of the template.
Issue-ID: POLICY-1402
Change-Id: Ia4fb9ee3819dccfc8c346c682545b2d27ebc4058
Signed-off-by: liamfallon <liam.fallon@est.tech>
Pamela Dragosh [Fri, 14 Feb 2020 17:53:13 +0000 (17:53 +0000)]
Merge "Fix return codes and policy get"
liamfallon [Fri, 14 Feb 2020 15:53:50 +0000 (15:53 +0000)]
Fix return codes and policy get
Change the return codes for validation to return more helpful and
correct codes.
Fix the policy "get" request to get policy types and data types for a
policy get.
Issue-ID: POLICY-1402
Change-Id: I89d67f830e9a75bdeef39c4142523c718879f19c
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Thu, 13 Feb 2020 17:34:46 +0000 (12:34 -0500)]
Add Topic Actor superclasses
Issue-ID: POLICY-2363
Change-Id: I5d29d85f6c5f40fb6c8f1bf678d9c718760a7558
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 13 Feb 2020 17:16:10 +0000 (17:16 +0000)]
Merge "Add A&AI actor and some operators"
liamfallon [Thu, 13 Feb 2020 13:05:09 +0000 (13:05 +0000)]
Update models-tosca for hetter handling
More additions, updates, and fixes for TOSCA service template handling.
Better handling of 404 not found on list requests.
Issue-ID: POLICY-1402
Change-Id: Id73b9a3cebb5445d4f05ae83e301330ee38a6598
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Wed, 12 Feb 2020 18:01:57 +0000 (13:01 -0500)]
Add A&AI actor and some operators
Added A&AI Actor, as well as operators for the "custom query" and
the "tenant" query (on which the custom query depends).
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ic9dadc07a6057cb1abb9698da86eb9431fc9ed3e
Pamela Dragosh [Wed, 12 Feb 2020 19:27:42 +0000 (19:27 +0000)]
Merge "Implement validation and hierarchical get"
liamfallon [Tue, 11 Feb 2020 16:18:32 +0000 (16:18 +0000)]
Implement validation and hierarchical get
NOTE: This review will require changes to the persistence.xml file in
other policy framework components.
This change brings in two changes:
1) Validation of the references betwen policies, policy types, and data
types
This change mans that additions to and changes to policies, policy
types, and data types must be structurally correct in the change coming
in and with whatever is already in the database
2) Hierarchical return of referenced entitites on policy types,
policies and data types.
When a policy, policy type, or data type is read from the database, the
entities referenced byt the returned policy, policy type, or data type
are returned as well.
Tests are amended for the stricter validation and structure.
Examples are corrected where they are incorrect.
Issue-ID: POLICY-1402
Change-Id: Ie6a4cb7ed336562338924079114df405f0ab889f
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Sat, 8 Feb 2020 13:32:59 +0000 (08:32 -0500)]
Add more code to facilitate actor implementation
Added obtain() to Context
Added startGuardAsync(), in anticipation of adding guards.
Moved logRestXxx() from Util to HttpOperation.
Added actor.test to facilitate testing of actors.
Changed timeoutSec from long to int in various places.
Made a couple of methods public to support junit testing.
Most of the methods required Params to be passed, which indicated a
design issue. Split Operator and Operation so that the Params could
be kept in a field and thus need not be passed to every method.
Basically, renamed OperatorPartial.java to OperationPartial.java and
created a new OperatorPartial.java. Of course, this makes it look to
gerrit like it's all new code, when in fact, most of it is unchanged,
other than removing the Params argument to the method calls. That
accounts for about half of the "lines changed" count.
Issue-ID: POLICY-1625
Change-Id: I9e98c9dadcbed145bf84deb06c9db1c864a3c24a
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Mon, 10 Feb 2020 15:23:33 +0000 (15:23 +0000)]
Get the tree of parent entities for an entity in a container
Utilityu method to filter out all bit an entity and its parents from a
service template entity container.
Issue-ID: POLICY-1402
Change-Id: I8c3b4c21b27fd8787cdfde0e1b726646f52c437b
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Mon, 10 Feb 2020 12:31:03 +0000 (12:31 +0000)]
Merge "Add data type and policy type reference checking"
Jim Hahn [Fri, 7 Feb 2020 02:48:12 +0000 (21:48 -0500)]
Clean up and enhancement of Actor re-design
Added junits for the remaining code.
Enhancements to facilitate implementation of Operators:
- Added allOf(), anyOf() facilities
- Added AsyncResponseHandler for handling asynchronous I/O via the
HttpClient
- Added logRestRequest() and logRestResponse() for logging REST
requests and responses
- Added HttpActor and HttpOperator, which can be used as superclasses
- Added doTask()
- Lifted data from the event into ControlLoopEventContext
Updates per previous review comments:
- Changed logException() to runFunction().
- Removed the aaiCqResponse field.
- Lifted fields from Policy into ControlLoopOperationParams, eliminating
the need to include Policy in the class.
OperatorPartial depends on the string values in the ControlLoopOperation
being set to one of the string values of PolicyResult. Instead of
passing ControlLoopOperation around, the operators should pass around
an object that uses PolicyResult directly, rather than depending on
the string values being set correctly. Created OperationOutcome for
this purpose.
Stop pipeline when the controller completes.
Use whenComplete() where appropriate.
startOperationAsync() should not block. Modified it to launch the task
in the background via its own thread.
Extracted CallbackManager into its own file.
Replaced actor setOperators() with addOperator()
Renamed add() to wrap(), and modified it to remove the future when it
completes.
Fixed the signature on delayedRemove() and delayedComplete().
Replaced xxxAsync() calls with just xxx() calls, where appropriate to
avoid the extra overhead of submitting it to a work queue.
Renamed handleFailure() to handlePreprocessorFailure().
Updates per WIP review comments
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Id4c4c7ade979bdb76cc54266837609cc69a22c58
Ram Krishna Verma [Fri, 7 Feb 2020 18:06:42 +0000 (18:06 +0000)]
Merge "Change recipe to operation to match type"
liamfallon [Thu, 6 Feb 2020 17:32:48 +0000 (17:32 +0000)]
Add data type and policy type reference checking
Full validation including references to policy types and data types
added. Unit tests fixed to cope with new stricter validation.
Issue-ID: POLICY-1402
Change-Id: I59f37640a99494a53960a54d2fc82cc96861d43b
Signed-off-by: liamfallon <liam.fallon@est.tech>
jhh [Thu, 6 Feb 2020 21:03:54 +0000 (15:03 -0600)]
Change recipe to operation to match type
Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4a79459cf7dfdccd7d9d88ec983afb6bce746493
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Jim Hahn [Thu, 6 Feb 2020 18:55:49 +0000 (18:55 +0000)]
Merge "Actor redesign."
liamfallon [Tue, 4 Feb 2020 15:45:58 +0000 (15:45 +0000)]
Add vaidation for entity hierarchies
This change brings in proper hierarchical checks for service templates,
making sure that all parents of data types, policy types, and policies
must be in place.
Issue-ID: POLICY-1402
Change-Id: I61b1b556403f74aeaa092f0d4d6ed19bf6a0b715
Signed-off-by: liamfallon <liam.fallon@est.tech>
Ram Krishna Verma [Tue, 4 Feb 2020 15:40:22 +0000 (15:40 +0000)]
Merge "Add merge utility for service templates"
liamfallon [Mon, 3 Feb 2020 14:37:33 +0000 (14:37 +0000)]
Add merge utility for service templates
This utility function allows a TOSCA service template fragment to be
merged with an exsiting service template and will be tbe backbone of
"create" methods on the API from now on.
Issue-ID: POLICY-1402
Change-Id: I3381cb2a1bd30621a639dedc213c546eeb2bf9aa
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Thu, 23 Jan 2020 23:56:40 +0000 (18:56 -0500)]
Actor redesign.
Left original code intact so that it can continue to be used until
everything has been converted to use the new approach. Simply added
new methods and classes. (A few minor edits were required to the old
code, e.g., added constructors to the Actor implementations). Code
to be removed is annotated with "TODO".
This only contains one revised actor, SDNC. This actor combines code
from actor.sdnc, sdnc, and drools-applications.
Coverage tests are incomplete, but I anticipate some simplification
to this design in a couple of days; coverage will be added at that
time.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I4b75730e3621a9ee026ad10e557abe92df10dcf4
Pamela Dragosh [Mon, 3 Feb 2020 15:16:46 +0000 (15:16 +0000)]
Merge "name + consistent case in drools policies"
a.sreekumar [Fri, 31 Jan 2020 14:30:29 +0000 (14:30 +0000)]
Design Operational Policy Type for Apex
Design the TOSCA Policy Type for operational policy supported by Apex
so that CLAMP can select this policy type for control loops that are designed to use Apex.
Change-Id: I50099a47d5314fa42e353856715adaaa20352a96
Issue-ID: POLICY-2147
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
jhh [Fri, 31 Jan 2020 14:50:57 +0000 (08:50 -0600)]
name + consistent case in drools policies
Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ibf54e6bac3d53daf0e23256ff0c2e8108b82cd9f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Jorge Hernandez [Tue, 28 Jan 2020 16:35:34 +0000 (16:35 +0000)]
Merge "Add service template persistence provider"
liamfallon [Tue, 28 Jan 2020 00:33:25 +0000 (19:33 -0500)]
Add service template persistence provider
Persistence needs to be carried out at service template level in order
to guarantee consistency of the service template in the database as much
as possible. Therefire, service template lelve reading, writing, and
delting is required.
Issue-ID: POLICY-1402
Change-Id: I5be57c29381bf6ddc87afdbb64ddae66a5ea5e5f
Signed-off-by: liamfallon <liam.fallon@est.tech>
a.sreekumar [Thu, 23 Jan 2020 13:35:07 +0000 (13:35 +0000)]
Handling supported policy type during PdpGroup Update
Change-Id: I62fbfeb80b81f4cc6dc0049bbd4ab9dcc5065773
Issue-ID: POLICY-2023
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
a.sreekumar [Tue, 21 Jan 2020 17:07:50 +0000 (17:07 +0000)]
Handling supported policy type during PdpGroup Update
Change-Id: I469125c232af9d78a55c3dfa71cb701cb3864015
Issue-ID: POLICY-2023
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
jhh [Mon, 20 Jan 2020 23:21:35 +0000 (17:21 -0600)]
vcpe operational policy tosca compliant json
Issue-ID: POLICY-2148
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id8ac0279184e5d063cbff197e47f14745a9ef353
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Jim Hahn [Fri, 17 Jan 2020 15:14:40 +0000 (10:14 -0500)]
Update Dockerfiles for java11 in policy-models
Also modified docker build scripts so they work with SNAPSHOT
or release versions of the tarballs.
Issue-ID: POLICY-1586
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ib5b8c0b83d7736180ab213b0b67d457eab7ee48e
Jorge Hernandez [Thu, 16 Jan 2020 17:36:30 +0000 (17:36 +0000)]
Merge "Ensure one jacoco output file"
Pamela Dragosh [Thu, 16 Jan 2020 16:55:29 +0000 (11:55 -0500)]
Ensure one jacoco output file
Sub-modules under sub-modules need to set the path to
ensure a single jacoco-ut.exec file is produced and
appended to.
I think this only gives us .1% - but that's ok. Its a
step towards consolidation.
Issue-ID: POLICY-2321
Change-Id: I31023843f55200096a905482ee55ad19bf681494
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jorge Hernandez [Thu, 16 Jan 2020 15:22:26 +0000 (15:22 +0000)]
Merge "Added Time agnostic Onset and Abated classes"
jhh [Wed, 15 Jan 2020 04:48:45 +0000 (22:48 -0600)]
Added Time agnostic Onset and Abated classes
These classes can be used for comparison of alarm skeletons
independently of the time at which they were produced.
Issue-ID: POLICY-2323
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I85b9d6a429de56f056eb0a6caa9e4f90fbd68918
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Pamela Dragosh [Thu, 16 Jan 2020 13:44:40 +0000 (13:44 +0000)]
Merge "Clean up TOSCA provider unit tests"
liamfallon [Wed, 15 Jan 2020 08:20:05 +0000 (09:20 +0100)]
Clean up TOSCA provider unit tests
SOme outstanding comment on TOSCA provider unit tests cleaned up.
Issue-ID: POLICY-2315
Change-Id: I235a5fc9996c81f421f17236afb413df7435de19
Signed-off-by: liamfallon <liam.fallon@est.tech>
Pamela Dragosh [Tue, 14 Jan 2020 19:24:20 +0000 (14:24 -0500)]
Update sonar config
Skip module that doesn't have code.
parent now defines the plugins, no need to duplicate
that.
Issue-ID: POLICY-2321
Change-Id: I84a161781cc0b44ba8d328ff5fb269855fcc4b36
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
liamfallon [Sun, 12 Jan 2020 17:49:25 +0000 (17:49 +0000)]
Read resource dirs in models prvider unit tests
Update the unit tests in models-provider so that we can check that the
TOSCA artifact that is read from the database is the same as the TOSCA
artifact that is stored.
This review does some groundwork for that check.
Issue-ID: POLICY-2315
Change-Id: Iabc7b247736b862713585a493752bc254cfe1c3d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Fri, 10 Jan 2020 22:52:57 +0000 (17:52 -0500)]
Remove deprecated methods from models
Addressed the following issues related to the java 11 upgrade:
- forClass().newInstance()
- java.xml.bind no longer included in jdk
- new mockito doesn't clear captured lists
Issue-ID: POLICY-1406
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ia254c1ed21f847d1824e7abc22528975372ee2b6
HOCKLA [Sat, 21 Dec 2019 18:11:33 +0000 (12:11 -0600)]
policy/models jdk 11 upgrades
Issue-ID: POLICY-1592
Change-Id: Iaa6b61c5f1c76f3e7c2043691f4d29dbc43d144e
Signed-off-by: HOCKLA <ah999m@att.com>
HOCKLA [Fri, 10 Jan 2020 18:16:00 +0000 (12:16 -0600)]
Bumped patch version for policy/models
Issue-ID: POLICY-1592
Change-Id: Iafc35fe53e28c815a79041f289cb17b6354ceccd
Signed-off-by: HOCKLA <ah999m@att.com>
HOCKLA [Fri, 10 Jan 2020 17:31:09 +0000 (11:31 -0600)]
Release policy/models 2.2.0
Issue-ID: POLICY-1592
Change-Id: I751dbafc67d5f232e930b56f8399ea326c6efdb1
Signed-off-by: HOCKLA <ah999m@att.com>
Liam Fallon [Fri, 10 Jan 2020 15:37:41 +0000 (15:37 +0000)]
Merge "Added new policy examples to support integration of new version validation feature"
Liam Fallon [Fri, 10 Jan 2020 15:35:58 +0000 (15:35 +0000)]
Merge "Remove supportedPolicyTypes from PdpStatus"
Pamela Dragosh [Fri, 10 Jan 2020 15:00:13 +0000 (15:00 +0000)]
Merge "Remove ControlLoopParams."
Chenfei Gao [Thu, 9 Jan 2020 19:04:05 +0000 (14:04 -0500)]
Added new policy examples to support integration of new version validation feature
Issue-ID: POLICY-2316
Change-Id: Ifcb6739c7dd6c5796067a4b9e2f3eef960e1ace4
Signed-off-by: Chenfei Gao <cgao@research.att.com>
liamfallon [Fri, 10 Jan 2020 13:57:29 +0000 (13:57 +0000)]
Fix policy-models to support data type properties
Data type properties are not being stored correctly into the database
when MariaDB is used (it worked fine in unit tests in H2).
Issue-ID: POLICY-2315
Change-Id: Ia901a070292b338154f3766f5fc7b91d656038df
Signed-off-by: liamfallon <liam.fallon@est.tech>
ramverma [Fri, 10 Jan 2020 10:46:40 +0000 (10:46 +0000)]
Remove supportedPolicyTypes from PdpStatus
Removing supportedPolicyTypes from PdpStatus in policy/models as it is
no longer expected from the Pdps to send it as part of the heartbeat or
initial registration message. Instead the PdpGroupName is expected from
the Pdps in the initial registration message.
Issue-ID: POLICY-2256
Change-Id: I14b76a737027e146d69d89c2fe2c3f098a89e196
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
jhh [Thu, 9 Jan 2020 23:49:31 +0000 (17:49 -0600)]
Remove ControlLoopParams.
This class is only useful in drools-applications repo.
Issue-ID: POLICY-2146
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ifbf281a3742950c3cad2c5b56689122dd766b41a
Jim Hahn [Thu, 9 Jan 2020 14:33:29 +0000 (14:33 +0000)]
Merge "Update tosca utils to remove code duplication"
Jim Hahn [Thu, 9 Jan 2020 13:58:02 +0000 (13:58 +0000)]
Merge "update Db provider to support query number"
liamfallon [Wed, 8 Jan 2020 17:04:50 +0000 (17:04 +0000)]
Update tosca utils to remove code duplication
Refactored the ToscaUtils class to remove code duplication.
Issue-ID: POLICY-2315
Change-Id: Ic06a0881d1797dbb3c45ae1903a150fbda421e72
Signed-off-by: liamfallon <liam.fallon@est.tech>
liamfallon [Tue, 7 Jan 2020 18:26:53 +0000 (18:26 +0000)]
Store and return data types for policies
In this change, the data types of policy types are persisted to the
database. All policy types currently in the database are returned on all
policy type get requests. This will be made more intelligent in the next
review.
Issue-ID: POLICY-2315
Change-Id: I10065ab9b90e72114a453494fc706d8aabc50c0a
Signed-off-by: liamfallon <liam.fallon@est.tech>
ning.xi [Thu, 26 Dec 2019 13:37:52 +0000 (21:37 +0800)]
update Db provider to support query number
Issue-ID: POLICY-1629
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: I42c9542adc44d52b760a70e710ab4cc6fa8a1b3b
liamfallon [Tue, 7 Jan 2020 10:24:12 +0000 (10:24 +0000)]
Support persistence of data types
Data types must be persisted to the database in order for them to be
retrieved in policy type queries and later for policy validation.
Issue-ID: POLICY-2315
Change-Id: Iacb88501a597aeee8f6d8bcc3d9604c13dc09090
Signed-off-by: liamfallon <liam.fallon@est.tech>
Liam Fallon [Mon, 23 Dec 2019 20:18:31 +0000 (20:18 +0000)]
Merge "pdp statistics database provider implementation"
ning.xi [Wed, 11 Dec 2019 07:55:59 +0000 (15:55 +0800)]
pdp statistics database provider implementation
Issue-ID: POLICY-1629
Signed-off-by: ning.xi <ning.xi@est.tech>
Change-Id: Ife65d50c862ed90c3c9a3cea91a2b9a8d874fa14
Pamela Dragosh [Mon, 16 Dec 2019 16:11:05 +0000 (11:11 -0500)]
Modifications to decision request and policy fixes
Discovered while working on both the SDNC naming and
optimization application work.
Fixed the datatype for SDNC naming policy type
Added a copy constructor for Decision request
Added metadata for optimization Subscriber policy type
Issue-ID: POLICY-2066
Change-Id: I83c99533f26747c856c591d05d22691714549cf2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Wed, 11 Dec 2019 16:32:01 +0000 (11:32 -0500)]
Fix timeout bug in dmaap simulator
Also added a start script that can be used to execute the simulator
in stand-alone mode (i.e., outside of a docker container).
Change-Id: I26550ad36cfd2448c96cf0c09fec24e60ffd815b
Issue-ID: POLICY-2298
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Wed, 11 Dec 2019 14:47:53 +0000 (14:47 +0000)]
Merge "Fix minor checksyle issues in models"
Jim Hahn [Wed, 11 Dec 2019 13:34:39 +0000 (13:34 +0000)]
Merge "Update optimization policies"
Pamela Dragosh [Tue, 10 Dec 2019 18:47:55 +0000 (13:47 -0500)]
Update optimization policies
These policies need to be updated.
Issue-ID: POLICY-2066
Change-Id: Idc15aa36f4295477b37aa6398920853436909751
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
liamfallon [Tue, 10 Dec 2019 13:57:32 +0000 (13:57 +0000)]
Fix minor checksyle issues in models
New checkstyle profile flagged some minor issues in policy models.
Issue-ID: POLICY-2165
Change-Id: I17ed070a3d55601ad31e48fdfd29fff01d29fa42
Signed-off-by: liamfallon <liam.fallon@est.tech>
Ram Krishna Verma [Tue, 10 Dec 2019 09:44:19 +0000 (09:44 +0000)]
Merge "Add JpaPdpStatistics entity"
Ram Krishna Verma [Mon, 9 Dec 2019 15:58:06 +0000 (15:58 +0000)]
Merge "Add type_version to naming policy"
Pamela Dragosh [Mon, 9 Dec 2019 15:31:20 +0000 (15:31 +0000)]
Merge "Refactor optimization policies"
shaoqiu [Fri, 8 Nov 2019 03:09:08 +0000 (11:09 +0800)]
Add JpaPdpStatistics entity
Add JpaPdpStatistics entity which will be used in provider.
Add Pdp Statistics entities
Issue-ID: POLICY-1628
Signed-off-by: shaoqiu <tim.huang@est.tech>
Change-Id: Iab12eb02e2e7f0e366aff64fa665b5d6674f2905
Signed-off-by: shaoqiu <tim.huang@est.tech>
Pamela Dragosh [Sun, 8 Dec 2019 22:43:30 +0000 (17:43 -0500)]
Add type_version to naming policy
For testing purposes in the xacml-pdp JUnits.
Issue-ID: POLICY-1740
Change-Id: Ia35583b5aac6a40f62542b907d7f3358fc1bcbcd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Sat, 7 Dec 2019 23:00:36 +0000 (18:00 -0500)]
Refactor optimization policies
Optimization policies need to be further refactored so
that Resource vs Service type policies can be specified.
Issue-ID: POLICY-2066
Change-Id: Ia40a947097692ea7dcc6ea8d13eb8669c37fac14
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Fri, 6 Dec 2019 15:22:48 +0000 (10:22 -0500)]
Add models to support deltas to policy deployments
Change-Id: Ia5134e2ba4faeefe8bcc1333abe6acc57972c243
Issue-ID: POLICY-2274
Signed-off-by: Jim Hahn <jrh3@att.com>
HOCKLA [Fri, 6 Dec 2019 17:46:24 +0000 (11:46 -0600)]
Point to new release version 1.6.1 policy/common
Issue-ID: POLICY-1583
Change-Id: I63b7f3934b9d6e26400c0dd68e5e31b533be1881
Signed-off-by: HOCKLA <ah999m@att.com>
Jorge Hernandez [Fri, 6 Dec 2019 15:07:03 +0000 (15:07 +0000)]
Merge "Add new Operational Policy Type"
Pamela Dragosh [Tue, 5 Nov 2019 14:35:30 +0000 (09:35 -0500)]
Add new Operational Policy Type
New operational policy type for Frankfurt. Updating examples.
added sample CLAMP metadata.
Issue-ID: POLICY-2217
Change-Id: I941c3a4187a4d164bf793ef2d82c34fccc1a2c35
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
HOCKLA [Thu, 5 Dec 2019 16:24:14 +0000 (10:24 -0600)]
Updated pom.xml to point to release versions of policy/parent and policy/common
Issue-ID: POLICY-1594/POLICY-1583
Change-Id: Ib8280ab847d8a81d8470c4f4600a6b2a626ae28b
Signed-off-by: HOCKLA <ah999m@att.com>
a.sreekumar [Wed, 4 Dec 2019 16:40:50 +0000 (16:40 +0000)]
Adding Response model class for PdpGroup Create/Update operation
Change-Id: Ifa3b4c1e51a1446f47adf8d263989440bddfa8b9
Issue-ID: POLICY-2273
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
ramverma [Wed, 4 Dec 2019 09:41:01 +0000 (09:41 +0000)]
Adding native policy type for apex-pdp
Issue-ID: POLICY-2279
Change-Id: Icf9fc690aa885c490ada40b4ad8c6ea1a5fe8586
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
Ram Krishna Verma [Thu, 28 Nov 2019 14:24:22 +0000 (14:24 +0000)]
Merge "Reduce volume of log information on A&AI calls"
liamfallon [Fri, 22 Nov 2019 17:28:02 +0000 (17:28 +0000)]
Reduce volume of log information on A&AI calls
The AaiManager class is logging all the http requests and responses to
and from A&AI to logger.info, creating a large volume of logging text,
the logging of these messages is now set logger.debug, so they are off
by default but can be enabled for debugging.
Issue-ID: POLICY-2125
Change-Id: I5f9674db0f9e5b271606e7af34d5218f5c629b09
Signed-off-by: liamfallon <liam.fallon@est.tech>
Rashmi Pujar [Mon, 25 Nov 2019 17:56:24 +0000 (12:56 -0500)]
CDS actor payload to be JSON object when applicable
When the policy-payload supplied by CLAMP is a valid JSON string
the CDS Blueprint payload must be a JSON object, else retain the
CDS Blueprint payload to be a string.
Issue-ID: POLICY-2253
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I6380ab0424339603ecf52d298e4f6f0cd8df754b
Rashmi Pujar [Mon, 25 Nov 2019 16:00:52 +0000 (11:00 -0500)]
Use dependency management for cds proto-definition artifact
Refer to: https://gerrit.onap.org/r/#/c/policy/parent/+/98733/
Issue-ID: POLICY-2254
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Ie1053ee05f68e8b06bae20c4ce8514dd3aa21d33
Jim Hahn [Fri, 22 Nov 2019 14:20:55 +0000 (14:20 +0000)]
Merge "Added new policy types for native PDP policies"
Jim Hahn [Thu, 21 Nov 2019 19:59:52 +0000 (14:59 -0500)]
Allow wild cards in supported type filter
PAP was rejecting deployment of policies whose supported type
contained a wild card. This was due to the fact that it was
querying the Pdp Groups using a filter on the supported type,
which did not take wild cards into consideration. Updated the
filtering.
Change-Id: I50b3202a00ac85ff09a9861d8bbe1efb6dd49ae3
Issue-ID: POLICY-1636
Signed-off-by: Jim Hahn <jrh3@att.com>
Chenfei Gao [Wed, 13 Nov 2019 15:45:21 +0000 (10:45 -0500)]
Added new policy types for native PDP policies
Issue-ID: POLICY-2212
Change-Id: Ib29ad66994aa64a73f23bc36eebbc1bc03b2ac02
Signed-off-by: Chenfei Gao <cgao@research.att.com>
liamfallon [Thu, 21 Nov 2019 13:59:07 +0000 (13:59 +0000)]
Fix minor checkstyle issuse in models A&AI
Some minor checkstyle issues in the policy models Custom Query support
in A&AI fixed.
Issue-ID: POLICY-2125
Change-Id: I520caa044966acbe28d3cd864b53fb398df2f385
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Fri, 15 Nov 2019 19:12:23 +0000 (14:12 -0500)]
Support wild cards in "supported policy types"
Refactored PfConceptKey, extracting most of it into PfKeyImpl.
Added PfSearchableKey as a subclass of PfKeyImpl.
Change-Id: I524f4ce9208fc9ba09e77db4cc7dde5a21e1d7fc
Issue-ID: POLICY-2224
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 15 Nov 2019 14:18:05 +0000 (14:18 +0000)]
Merge "Removing Named Query."
pramod.jamkhedkar [Wed, 13 Nov 2019 18:21:16 +0000 (13:21 -0500)]
Removing Named Query.
Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query
Issue-ID: POLICY-2125
Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb
Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
Jim Hahn [Wed, 13 Nov 2019 18:05:58 +0000 (13:05 -0500)]
Remove duplicate dao object
Code was creating the DAO object twice - removed the extra line.
Note: this properly doesn't fix the race condition, but it should fix
a memory leak.
Change-Id: I5f5c6002d42f9bb0525d1b5013b1300e80264645
Issue-ID: POLICY-1832
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 8 Nov 2019 14:17:42 +0000 (09:17 -0500)]
Fix sonar issue affecting in drools-applications
Drools-applications has a serializable class that contains AaiCqResponse.
Sonar complained that the latter class must also be serializable, so
made the change in policy-models to fix that. In addition, the latter
class contained a list of Object. To ensure that those are also
serializable, the list was changed to a list of Serializable instead.
The latter change can be reverted, if it causes compilation issues
elsewhere. However, it seems safer to enforce serializability in the
list rather than risk having a later change inject a non-serializable
object into the list.
Change-Id: Ia741a1a96ec4efcc63451e9af31c19b4fe99dd7d
Issue-ID: POLICY-2225
Signed-off-by: Jim Hahn <jrh3@att.com>