policy/api.git
4 years agoPreloading Tosca compliant operational policy type for apex-pdp 99/101099/4
a.sreekumar [Mon, 3 Feb 2020 14:50:46 +0000 (14:50 +0000)]
Preloading Tosca compliant operational policy type for apex-pdp

Change-Id: I544e275758945007b4d68d0a6b069f5963780178
Issue-ID: POLICY-2147
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agotests for tosca compliant operational policies 98/100598/1
jhh [Wed, 22 Jan 2020 13:40:38 +0000 (07:40 -0600)]
tests for tosca compliant operational policies

Issue-ID: POLICY-2148
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I8c9ab43d75e3fb2bebdcb3a0a5bb16b46832b7ad

4 years agoRemove assembly warning 53/100553/1
Pamela Dragosh [Tue, 21 Jan 2020 16:52:15 +0000 (11:52 -0500)]
Remove assembly warning

Use ${file.separator}

Issue-ID: POLICY-2329
Change-Id: I1e5def27e5cc87c86872c13df3db1347543e60e7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agopreload tosca compliant operational policy types 14/100514/1
jhh [Mon, 20 Jan 2020 19:08:47 +0000 (13:08 -0600)]
preload tosca compliant operational policy types

Issue-ID: POLICY-2148
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I59dc7c4afbf201233d4cbf0240b011e59225864f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoUse alpine image for policy-api 96/100396/1
Jim Hahn [Thu, 16 Jan 2020 21:35:45 +0000 (16:35 -0500)]
Use alpine image for policy-api

Issue-ID: POLICY-1586
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ie6ea1f8dffdc6c859f5f09b726e0ed7a65b62f68

4 years agoSwitch to debain for policy-api 20/100320/3
Jim Hahn [Wed, 15 Jan 2020 14:54:17 +0000 (09:54 -0500)]
Switch to debain for policy-api

Use the latest jre image for now.

Issue-ID: POLICY-1586
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ia5e57a5c94fbe40940c6b0b02c1127fd448abcf8

4 years agoMerge "Update sonar config"
Ram Krishna Verma [Wed, 15 Jan 2020 09:25:10 +0000 (09:25 +0000)]
Merge "Update sonar config"

4 years agoUpdate policy-api for java11 docker 97/100297/1
Jim Hahn [Tue, 14 Jan 2020 22:52:12 +0000 (17:52 -0500)]
Update policy-api for java11 docker

Issue-ID: POLICY-1586
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ifeb693b4849dfd07057d2139b9f5b58e2ce3f0e5

4 years agoUpdate sonar config 94/100294/1
Pamela Dragosh [Tue, 14 Jan 2020 19:57:58 +0000 (14:57 -0500)]
Update sonar config

Removed configuration that will be in policy/parent.
Ignore sub-modules that don't have source code - slight
speed improvement.

Issue-ID: POLICY-2321
Change-Id: I6f483f80510050347452bd85af5340e81402bbc6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoJDK 11 upgrades 69/99769/5
HOCKLA [Wed, 18 Dec 2019 14:57:22 +0000 (08:57 -0600)]
JDK 11 upgrades

Pointed to upgraded policy/parent and policy/common

Issue-ID: POLICY-1582
Change-Id: I66bb6e2c103147916b6b284e594db1c24434e0ba
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoAdded the new versioning validation for policy and policy type 45/100145/5
Chenfei Gao [Thu, 9 Jan 2020 18:33:12 +0000 (13:33 -0500)]
Added the new versioning validation for policy and policy type

The following rules are implemented to validate the version provided
in the POST payloads of policies and policy types:

1) If version field is not specified in POST payload, "406 - Not Acceptable"
   would be returned along with the message "mandantory version field is missing".
2) If the version is not in the DB, we simply insert it.
3) If the version is in the DB, "406 - Not Acceptable" is returned along with
   the message saying "specified version x.x.x" is already existing and the latest
   version is x.x.x. It can force the user to create a newer version than the latest one.
4) The same versioning validation is applied to legacy types of policies too
   so that everything is consistent.

Issue-ID: POLICY-2316
Change-Id: I395df0196a9d3073fd1f09060f943aeeb554d277
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoEnabling logback file to be loaded using oom configmap 89/100089/3
a.sreekumar [Wed, 8 Jan 2020 13:02:10 +0000 (13:02 +0000)]
Enabling logback file to be loaded using oom configmap

Change-Id: I839b687716a72e2538495b46660fa697cdc2f4f8
Issue-ID: POLICY-2308
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoChanges related to persisiting data type of policy in db 24/100124/1
a.sreekumar [Thu, 9 Jan 2020 11:59:00 +0000 (11:59 +0000)]
Changes related to persisiting data type of policy in db

Change-Id: I2ff6af28eead0958e8bb2699e4b0ce91f1146f06
Issue-ID: POLICY-2315
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoSpeed up tests on policy-api 24/99824/3
liamfallon [Thu, 19 Dec 2019 15:51:13 +0000 (09:51 -0600)]
Speed up tests on policy-api

Test initialization and shutown of h2 database and REST server only done
once at beginning of all API unit tests. Duplicate tests removed, all
test done to persistent database and other minor improvements.

We need to check coverage after this review, ti may have dropped by a
few percent. We should design new tests to bring the coverage back up
again.

Issue-ID: POLICY-2297
Change-Id: I7ccb9835e01e08c284fdc4602e3a00e946b5e902
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoUpdate preload optimization types 09/99409/3
Pamela Dragosh [Tue, 10 Dec 2019 12:34:36 +0000 (07:34 -0500)]
Update preload optimization types

The type names were updated and added 2 new types.

Issue-ID: POLICY-2066
Change-Id: Ibbd149dec1809a9a815a5f6b64a8e7855fcc2010
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Preloading native policy type for apex-pdp"
Pamela Dragosh [Fri, 6 Dec 2019 21:54:33 +0000 (21:54 +0000)]
Merge "Preloading native policy type for apex-pdp"

4 years agoPoint to new release version 1.6.1 policy/common 77/99277/1
HOCKLA [Fri, 6 Dec 2019 17:55:55 +0000 (11:55 -0600)]
Point to new release version 1.6.1 policy/common

Issue-ID: POLICY-1583
Change-Id: I95163af6929a6babd5669bee1cf7285cc9dace1c
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoPreloading native policy type for apex-pdp 52/99252/1
ramverma [Fri, 6 Dec 2019 11:33:28 +0000 (11:33 +0000)]
Preloading native policy type for apex-pdp

Preloading native policy type for apex-pdp so that policies can be
created and deployed using this policy type.
Removed few test cases not working on windows.

Issue-ID: POLICY-2279
Change-Id: I8e462118ee21e92fcb862ef94a6d15aec1b893c6
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoPoint to release versions of policy/parent and policy/common 19/99219/2
HOCKLA [Thu, 5 Dec 2019 17:47:53 +0000 (11:47 -0600)]
Point to release versions of policy/parent and policy/common

Issue-ID: POLICY-1594
Change-Id: I1d686487e0276a290fd8ae997d4e368edd474174
Signed-off-by: HOCKLA <ah999m@att.com>
4 years agoMerge "change HealthCheckReport URL from self to hostName"
Jim Hahn [Thu, 5 Dec 2019 16:42:48 +0000 (16:42 +0000)]
Merge "change HealthCheckReport URL from self to hostName"

4 years agochange HealthCheckReport URL from self to hostName 94/99194/1
Hengye [Thu, 5 Dec 2019 07:13:45 +0000 (15:13 +0800)]
change HealthCheckReport URL from self to hostName

Issue-ID: POLICY-1689 Consolidate Policy Health Check into PAP
Change-Id: Ie7f8edf1d1a083c6c696824f249544959f72694d
Signed-off-by: Hengye <yehui.wang@est.tech>
4 years agoFix sonar issues in policy-api 30/99030/2
Jim Hahn [Mon, 2 Dec 2019 18:02:11 +0000 (13:02 -0500)]
Fix sonar issues in policy-api

The change to sonar cloud resulted in new issues being uncovered.
Addressed two of the three issues with this:
  Remove this unused import...
  Add at least one assertion to this test case.
The item left outstanding is:
  Make sure that command line arguments are used safely here.

Issue-ID: POLICY-2206
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ie5dc339640102a5b4471e5b719338358ec3e0209
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoPreload the policy types for native policies 17/98817/2
Chenfei Gao [Mon, 25 Nov 2019 16:22:38 +0000 (11:22 -0500)]
Preload the policy types for native policies

Issue-ID: POLICY-2212, POLICY-2213
Change-Id: I03be8132699b5af9ea60a06cb0e1332c05886ad9
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoBuild tar.gz without requiring docker image build 13/98613/1
jhh [Tue, 19 Nov 2019 16:00:43 +0000 (10:00 -0600)]
Build tar.gz without requiring docker image build

This allows the tar.gz to be released by LF jobs.

Issue-ID: POLICY-2250
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I1e35705c60b7daa86364dd9ca308a6b6708f4ae5

4 years agoAdded changes to make the list of preloaded policy types configurable 41/98341/2
Chenfei Gao [Wed, 13 Nov 2019 03:29:37 +0000 (22:29 -0500)]
Added changes to make the list of preloaded policy types configurable

Issue-ID: POLICY-2210
Change-Id: I84b512a783c1fdc0834cf79bdce4c48a7803b884
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoDo not hardcode io.fabric8 plugin 02/98202/1
Pamela Dragosh [Fri, 8 Nov 2019 19:50:22 +0000 (14:50 -0500)]
Do not hardcode io.fabric8 plugin

policy/parent now has this defined

Issue-ID: POLICY-2222
Change-Id: I0fde39c1bce25ee8f0e0c1dfd773963dc4bdf6ff
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPreload the SDNC Naming Policy type 62/97862/1
Pamela Dragosh [Fri, 1 Nov 2019 15:24:26 +0000 (11:24 -0400)]
Preload the SDNC Naming Policy type

Needs to be available for policy creation.

Issue-ID: POLICY-1740
Change-Id: Id473492ce1ba923131ec3505ecd8f27b18e30013
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoAdd common Jersey version 45/97845/2
liamfallon [Fri, 1 Nov 2019 11:37:50 +0000 (11:37 +0000)]
Add common Jersey version

Add a common version of Jersey for all Policy Framework components.

Issue-ID: POLICY-2209
Change-Id: Ibb7e4fdfe55e34b3c7c788c3637dbcdacc8a70a8
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix new eclipse warnings in policy-api 55/97755/1
Jim Hahn [Wed, 30 Oct 2019 15:31:30 +0000 (11:31 -0400)]
Fix new eclipse warnings in policy-api

Unused import.

Issue-ID: POLICY-2206
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I1d443997a676d3833e60330c9a58a9715844efa2

4 years agoUpdate S3P for new API endpoint 95/97595/1
Chenfei Gao [Fri, 25 Oct 2019 01:26:02 +0000 (21:26 -0400)]
Update S3P for new API endpoint

Issue-ID: POLICY-2185
Change-Id: I2d6e29ab6615734abcb1b16336bc5d6afa9937f1
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoMerge "Add missing Optimization base policy type"
Jorge Hernandez [Mon, 21 Oct 2019 18:38:36 +0000 (18:38 +0000)]
Merge "Add missing Optimization base policy type"

4 years agoAdd missing Optimization base policy type 88/97388/1
Pamela Dragosh [Mon, 21 Oct 2019 18:01:33 +0000 (14:01 -0400)]
Add missing Optimization base policy type

This should be there - it has "matchable" metadata needed by
the XACML PDP optimization application.

Issue-ID: POLICY-2066
Change-Id: Id20996f3cee1b45360e47731bc3d6a4f9457275d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agooverride cert stores 25/97225/2
jhh [Thu, 17 Oct 2019 00:36:39 +0000 (19:36 -0500)]
override cert stores

Issue-ID: POLICY-2064
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I50b0583bfdf940ed1a4d7a7ac511267c715b7223

4 years agoCreated a new simplified API for creating policies 31/96831/1
Chenfei Gao [Wed, 9 Oct 2019 20:36:05 +0000 (16:36 -0400)]
Created a new simplified API for creating policies

Added a new endpoint to create multiple policies in one call
Added corresponding provider method
Added corresponding junit tests

Issue-ID: POLICY-1991
Change-Id: I09202ededfd88cf9f1ac62ea036e98e3b5d78f98
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoAdd changes to support application/yaml in api 86/95786/2
Chenfei Gao [Tue, 17 Sep 2019 02:20:34 +0000 (22:20 -0400)]
Add changes to support application/yaml in api

Issue-ID: POLICY-2101
Change-Id: I0860ff11231b6a649f52355d8d9333eec7d78826
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoBump versions for api master 72/95372/2
Jim Hahn [Tue, 10 Sep 2019 13:57:24 +0000 (09:57 -0400)]
Bump versions for api master

Change-Id: Ic9789f0041e463891d675baac32a7619d9a5bfd4
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoRelease api 2.1.2 88/95288/1 5.0.0-ONAP
Pamela Dragosh [Tue, 10 Sep 2019 00:25:07 +0000 (20:25 -0400)]
Release api 2.1.2

released 2.1.2

Issue-ID: POLICY-2045
Change-Id: Icff2a924188ae57a055aa52853ab4eee21545dc7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to released artifacts 81/95281/1
Pamela Dragosh [Mon, 9 Sep 2019 23:31:33 +0000 (19:31 -0400)]
Upgrade to released artifacts

Released parent, common and models.

Issue-ID: POLICY-2045
Change-Id: I2e7ba2fe54d0761608e1c17104873d0e20e2a3ae
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoKnock on of changing policy types to map 38/94938/3
liamfallon [Thu, 5 Sep 2019 22:25:55 +0000 (22:25 +0000)]
Knock on of changing policy types to map

This review adapts policy-api for the change in the structure
of the toasca service template from a list of maps to a plain map.

DUplication of policy types and policies removed and policy-models
examples used instead.

Issue-ID: POLICY-2047
Change-Id: Ie1fdeef79289348005314c5de9b2e37c0c45d786
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoChange scope to list 93/94693/1
Pamela Dragosh [Fri, 30 Aug 2019 15:51:35 +0000 (11:51 -0400)]
Change scope to list

Missed this change in last review.

Issue-ID: POLICY-1899
Change-Id: I19c9bd3346b9dd870ca3b62e7a5fb61b468e804b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Update optimization policy type"
Jorge Hernandez [Fri, 30 Aug 2019 15:34:07 +0000 (15:34 +0000)]
Merge "Update optimization policy type"

4 years agoUpdate optimization policy type 66/91266/10
Pamela Dragosh [Thu, 11 Jul 2019 13:58:27 +0000 (09:58 -0400)]
Update optimization policy type

Per work with Optimization team, identifying common attributes for matchable
optimization policies.

Fixed TOSCA syntax errors - use map instead of list.

Removed identity from PciPolicy, QueryPolicy and OptimizationPolicy.

Added example of how vCPE policies now look.

Updated the example for HPA Policy based on Ruoyo input. Fixed syntax
errors due to JSON conversion. Trailing spaces.

Added back in list for applicableResources and required scope attribute
for example policies.

Issue-ID: POLICY-1899
Change-Id: Ic8ae6db0575fb21fca6103ab2ed015c8524def80
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPreload control loop coordination type in API 44/94444/4
Jim Hahn [Wed, 28 Aug 2019 13:53:19 +0000 (09:53 -0400)]
Preload control loop coordination type in API

Modified json based on input from Chenfei.

Change-Id: Ibd70c5737713fee5dcd2370e02ef5f567d2a73b3
Issue-ID: POLICY-1847
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoupdate keystore 73/94173/2
jhh [Fri, 23 Aug 2019 03:35:28 +0000 (22:35 -0500)]
update keystore

Issue-ID: POLICY-1988
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia3878cad1ec0eb22b21b09531ed99d33c4d104f2
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoAdd performance test for API component 16/93716/1
Chenfei Gao [Fri, 16 Aug 2019 16:47:31 +0000 (12:47 -0400)]
Add performance test for API component

Added the test plan for performance test.

Issue-ID: POLICY-1806
Change-Id: I3bd283e2aacac58ba3e0397eaa9ee8dada676871
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoMerge "Adding more policy-api junits"
Pamela Dragosh [Fri, 16 Aug 2019 15:33:00 +0000 (15:33 +0000)]
Merge "Adding more policy-api junits"

4 years agoAdding more policy-api junits 48/93548/4
Bilal A [Wed, 14 Aug 2019 19:03:07 +0000 (15:03 -0400)]
Adding more policy-api junits

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: If85abb8280e28da7391bb4b4cb502473a404065b

4 years agoMerge "Disbale Jetty messages"
Pamela Dragosh [Thu, 15 Aug 2019 13:18:55 +0000 (13:18 +0000)]
Merge "Disbale Jetty messages"

4 years agoMerge "Add get deployed endpoints for legacy policies"
Jorge Hernandez [Wed, 14 Aug 2019 12:53:43 +0000 (12:53 +0000)]
Merge "Add get deployed endpoints for legacy policies"

4 years agoDisbale Jetty messages 27/92927/2
Bilal A [Tue, 13 Aug 2019 19:09:27 +0000 (15:09 -0400)]
Disbale Jetty messages

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: I0fbf300af65e5500c3cc8e7bddf43bb29d988471

4 years agoAdd get deployed endpoints for legacy policies 16/92616/2
Chenfei Gao [Fri, 2 Aug 2019 20:41:19 +0000 (16:41 -0400)]
Add get deployed endpoints for legacy policies

Issue-ID: POLICY-1810
Change-Id: I47046fbbd7d319b58cabf57ff470ec0d5246c88a
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoUpgrade to snapshot integration parent artifact 00/93100/1
Bruno Sakoto [Thu, 8 Aug 2019 15:01:18 +0000 (11:01 -0400)]
Upgrade to snapshot integration parent artifact

Issue-ID: POLICY-1603
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I1318c17c48714d59966e8de60671bd3f1d14c351

4 years agoBump version of policy/api 23/92923/2
jrh3 [Wed, 7 Aug 2019 16:25:21 +0000 (12:25 -0400)]
Bump version of policy/api

Change-Id: I919625bd6a439d27c84389a046f6a5545e6f1911
Issue-ID: POLICY-1965
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd 2.1.1 release file 06/92806/1
jhh [Tue, 6 Aug 2019 14:00:49 +0000 (09:00 -0500)]
Add 2.1.1 release file

Issue-ID: POLICY-1953
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I24838e03bfbe78df5896a89789cd995291917e3a

4 years agoUpdate to latest common/models released versions 80/92680/3
jhh [Mon, 5 Aug 2019 13:28:15 +0000 (08:28 -0500)]
Update to latest common/models released versions

policy/models: 2.1.2
policy/common: 1.5.1

Issue-ID: POLICY-1953
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5221b35a4e2b6337ac32e51b5d62f89bf6401b41

4 years agoPolicy API Junit tests 93/92493/2
Bilal A [Thu, 1 Aug 2019 17:53:39 +0000 (13:53 -0400)]
Policy API Junit tests

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: I8ee41b6df32a97cebdc4e07782e564698d10154b

4 years agoMerge "Policy API JUnit Tests"
Jim Hahn [Thu, 1 Aug 2019 15:36:11 +0000 (15:36 +0000)]
Merge "Policy API JUnit Tests"

4 years agoMerge "Add policy api stability test"
Jorge Hernandez [Thu, 1 Aug 2019 12:42:34 +0000 (12:42 +0000)]
Merge "Add policy api stability test"

4 years agoAdd policy api stability test 39/92239/3
Chenfei Gao [Tue, 30 Jul 2019 03:03:37 +0000 (23:03 -0400)]
Add policy api stability test

Add jmeter test plan for api stability test
Add scripts and config files for setting up api docker
Add scripts and config files for setting up other components

Issue-ID: POLICY-1805
Change-Id: I103288fc4a4e97997cbf99a0af0cddec7d570416
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoPolicy API JUnit Tests 95/92395/1
Bilal A [Wed, 31 Jul 2019 17:49:11 +0000 (13:49 -0400)]
Policy API JUnit Tests

1) Adds tests for testing LegacyGuardPolicyProvider and
LegacyOperationalPolicyProvider

2) Fixes issue in LegacyGuardPolicyProvider and
LegacyOperationalPolicyProvider to handle
policy version number properly while deleting policies.

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: I01d48b5352e7e6da403faf1e4997d3550024755f

4 years agoPolicy API more JUnit Tests 58/92058/5
Bilal A [Thu, 25 Jul 2019 22:10:07 +0000 (18:10 -0400)]
Policy API more JUnit Tests

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: I8882d9aa6e1e56e9425224b9fdfba01552b5e993

4 years agoAdd lombok.config to API 12/92112/1
Jim Hahn [Fri, 26 Jul 2019 13:12:19 +0000 (09:12 -0400)]
Add lombok.config to API

This prevents sonar from checking lombok annotations for code coverage.

Change-Id: Idde21c8a4f2fea13bdea989fe94f361b594550a8
Issue-ID: POLICY-1938
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoModify policy/api to use RestServer from common 96/91696/3
Jim Hahn [Wed, 17 Jul 2019 13:43:08 +0000 (09:43 -0400)]
Modify policy/api to use RestServer from common

This also entailed removing the local copy of RestServerParameters.

Change-Id: Ie5c581ab70aee60844d1660fe0a61290de6470ec
Issue-ID: POLICY-1652
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdding unit tests for Policy API. 96/91396/5
Bilal A [Fri, 12 Jul 2019 23:29:11 +0000 (19:29 -0400)]
Adding unit tests for Policy API.

Issue-ID: POLICY-1771
Signed-off-by: Bilal A <bilal@research.att.com>
Change-Id: I8ea0729ca029c15edcb7564fa35c8811976ca6a8

4 years agoFix sonar issues in policy-api 92/91292/3
Jim Hahn [Thu, 11 Jul 2019 19:26:12 +0000 (15:26 -0400)]
Fix sonar issues in policy-api

Extracted some methods to address cyclomatic complexity.
Created super classes to address duplicate code.
Did not address code coverage.

Change-Id: I2ec07cdad9e671b0e239e2d4ae9395e89b9e4266
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix api due to sonar changes in common 44/91044/1
Jim Hahn [Mon, 8 Jul 2019 15:15:07 +0000 (11:15 -0400)]
Fix api due to sonar changes in common

Fixed breakages due to changes made in policy/common to satisfy
sonar.
Also modified the code to allocate ports for junit tests, writing
them into the config files.

Change-Id: Id31d19e0691f7450c3e4158090dac6f3c3849631
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd curly braces in shell script file 41/90641/1
shaoqiu [Fri, 28 Jun 2019 05:42:45 +0000 (05:42 +0000)]
Add curly braces in shell script file

According to comment:
https://gerrit.onap.org/r/c/policy/xacml-pdp/+/90495/1/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh#43

Issue-ID: POLICY-1702
Change-Id: I105fe178c9d724f6e443aa2cff49ae02c76b67ca
Signed-off-by: shaoqiu <tim.huang@est.tech>
4 years agoBump up models to 2.1.1-SNAPSHOT 86/90586/1
ramverma [Thu, 27 Jun 2019 11:17:21 +0000 (11:17 +0000)]
Bump up models to 2.1.1-SNAPSHOT

Change-Id: I5259b1f2e977f69cdfe7f6391fa8ddc238752776
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agochange policy/models version to 2.1.0 47/90547/1
ramverma [Wed, 26 Jun 2019 18:42:44 +0000 (18:42 +0000)]
change policy/models version to 2.1.0

As per comment on last review, going back to 2.1.0 policy/models

Change-Id: I9ace10dc13590ef498c9a7d0f1fc519957023309
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoUse ToStringTester from utils-test 29/90529/1
ramverma [Wed, 26 Jun 2019 15:00:39 +0000 (15:00 +0000)]
Use ToStringTester from utils-test

Changing ToStringTester from utils to utils-test.
Correcting the policy/common & policy/models version.

Change-Id: I33a590367732ff315a9b03aca917e4be5f1ae05e
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoBump api patch to 2.1.1 12/90512/1
Pamela Dragosh [Wed, 26 Jun 2019 12:31:31 +0000 (08:31 -0400)]
Bump api patch to 2.1.1

Released 2.1.0

Issue-ID: POLICY-1737
Change-Id: I65909e110fd5cb7b8d99863e161562235025a9bd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRemove POLICY_API_HOME in Dockerfile 72/89972/3
shaoqiu [Tue, 25 Jun 2019 06:10:52 +0000 (06:10 +0000)]
Remove POLICY_API_HOME in Dockerfile

To use POLICY_HOME not POLICY_XXX_HOME

Issue-ID: POLICY-1702
Change-Id: I14e3415f1ee00cd7a82b0d1768eb6c1ab8775424
Signed-off-by: shaoqiu <tim.huang@est.tech>
4 years agoUpgrade to released common & models 32/90332/1 2.1.0
Pamela Dragosh [Fri, 21 Jun 2019 20:16:43 +0000 (16:16 -0400)]
Upgrade to released common & models

Released common 1.5.0 and models 2.1.0

Issue-ID: POLICY-1737
Change-Id: I95cd82c79d57df1b410ea0deaa2b93dee12878b0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to release 3.0.0 parent 57/90257/1
Pamela Dragosh [Thu, 20 Jun 2019 20:29:49 +0000 (16:29 -0400)]
Upgrade to release 3.0.0 parent

Policy/parent released

Issue-ID: POLICY-1737
Change-Id: I5d0bb151235da73c95f0b3486da5ea9ba1e7ffcd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix the bug of cannot return multiple versions of tosca entity 40/90040/4
Chenfei Gao [Mon, 17 Jun 2019 21:15:37 +0000 (17:15 -0400)]
Fix the bug of cannot return multiple versions of tosca entity

Issue-ID: POLICY-1807
Change-Id: I143f3228fd5e23365c95ee13f2e639f9862fc33e
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoMerge "added file to test RestServerParameters.java"
Liam Fallon [Tue, 18 Jun 2019 13:06:20 +0000 (13:06 +0000)]
Merge "added file to test RestServerParameters.java"

4 years agoMerge "Change getCanonicalName() to getName() in api"
Liam Fallon [Tue, 18 Jun 2019 12:42:51 +0000 (12:42 +0000)]
Merge "Change getCanonicalName() to getName() in api"

4 years agoChange getCanonicalName() to getName() in api 10/90010/2
Jim Hahn [Mon, 17 Jun 2019 14:00:18 +0000 (10:00 -0400)]
Change getCanonicalName() to getName() in api

Per javadocs, getName() should generally be used instead of
Class.getCanonicalName(). This change only applies to classes; it
does not apply to File objects.

Change-Id: Ia1726f178f906bfdfbd056c50598228cff8e1a2d
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoadded file to test ApiStatisticsManager.java 80/89780/1
Sandeep J [Thu, 13 Jun 2019 07:17:39 +0000 (12:47 +0530)]
added file to test ApiStatisticsManager.java

to increase code coverage

Issue-ID: POLICY-1791
Change-Id: Ie0a5027ad61224c44b30127348c4a81454549fc9
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
4 years agoadded file to test RestServerParameters.java 74/89774/1
Sandeep J [Thu, 13 Jun 2019 07:03:28 +0000 (12:33 +0530)]
added file to test RestServerParameters.java

to increase code coverage

Issue-ID: POLICY-1791
Change-Id: I9d6632d995b4dfd014b51467a66b95d042d6113c
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
4 years agopolicy/api must publish docker images with tag X.Y-SNAPSHOT-latest 05/89605/1
Rashmi Pujar [Fri, 7 Jun 2019 19:48:40 +0000 (15:48 -0400)]
policy/api must publish docker images with tag X.Y-SNAPSHOT-latest

Issue-ID: POLICY-1808
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: Iedd6b7ef98524424ac104e18285a10bb76cd29cc

4 years agoFix api docker chmod 73/89273/2
Jim Hahn [Tue, 4 Jun 2019 18:41:34 +0000 (14:41 -0400)]
Fix api docker chmod

The chmod in the docker builder for my local VM does not appear to
support the "+x" style options. Modified the api docker
file to use "755" instead.

Change-Id: Idf376d0d4e2a44ee5a605b473b0307d8770b4ced
Issue-ID: POLICY-1829
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump to version 2.1.0 96/88896/1
Pamela Dragosh [Thu, 30 May 2019 13:42:01 +0000 (09:42 -0400)]
Bump to version 2.1.0

New snapshot due to branch

Issue-ID: POLICY-1747
Change-Id: I8f82950ec863987322c39fb7254f9ea8b5d7f471
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoBump to 2.0.2-SNAPSHOT 23/88423/1
Pamela Dragosh [Thu, 23 May 2019 23:05:25 +0000 (19:05 -0400)]
Bump to 2.0.2-SNAPSHOT

Released 2.0.1

Issue-ID: POLICY-1700
Change-Id: I75e2ea1e32dca747f1e093d352909818513f0820
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpgrade to released policy/models 89/88389/1 2.0.1 4.0.0-ONAP
Pamela Dragosh [Thu, 23 May 2019 17:13:03 +0000 (13:13 -0400)]
Upgrade to released policy/models

2.0.1 is released

Issue-ID: POLICY-1700
Change-Id: I88ef0a619818c2bde982e6143fdd8360581a26ca
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoLog POST requests 78/88378/1
Jim Hahn [Thu, 23 May 2019 15:29:51 +0000 (11:29 -0400)]
Log POST requests

Add logging of POST requests received via the REST API.

Change-Id: I8c71df3a45b8a3369b48eee06165dd5034c115a6
Issue-ID: POLICY-1777
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Reserve version integer check and delete eligibility check"
Pamela Dragosh [Wed, 22 May 2019 17:07:54 +0000 (17:07 +0000)]
Merge "Reserve version integer check and delete eligibility check"

4 years agoReserve version integer check and delete eligibility check 84/88284/1
Chenfei Gao [Wed, 22 May 2019 16:40:48 +0000 (12:40 -0400)]
Reserve version integer check and delete eligibility check

Per Jim's comment, version integer check should come first before
checking delete elibibility (i.e. checking if policy is deployed
in PDP group or not).

Issue-ID: POLICY-1777
Change-Id: Ibd3d8d05a40ef34c558a2e9389596396a69469fe
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoUpdate INFO.yaml to add Jim and Ram 58/88258/1
liamfallon [Wed, 22 May 2019 14:41:54 +0000 (14:41 +0000)]
Update INFO.yaml to add Jim and Ram

Issue-ID: POLICY-1775
Change-Id: I50ece282341da05652fb6a2e186a6033ce40bd1e
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoModify legacy API and policy provider to support version enabled features in legacy... 14/88214/1
Chenfei Gao [Wed, 22 May 2019 02:43:25 +0000 (22:43 -0400)]
Modify legacy API and policy provider to support version enabled features in legacy db provider

Includes:
a) Modify legacy API endpoints to retrieve the latest version of legacy policies
b) Modify legacy policy providers to support newly added version enabled features in db provider
c) Fix corresponding junit test failures

Issue-ID: POLICY-1777
Change-Id: I641170b37e2929b5060414832d4b8395493cecdc
Signed-off-by: Chenfei Gao <cgao@research.att.com>
4 years agoStep snapshot version of policy-api 51/87851/1
liamfallon [Thu, 16 May 2019 08:55:47 +0000 (08:55 +0000)]
Step snapshot version of policy-api

Change-Id: I41df0fbcb1e3e830ad3e0b93c8a2dc42cf7e2ffb
Issue-ID: POLICY-1630
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoUpgrade to release policy/models 23/87723/1 2.0.0
Pamela Dragosh [Wed, 15 May 2019 00:12:40 +0000 (20:12 -0400)]
Upgrade to release policy/models

Release 2.0.0

Issue-ID: POLICY-1630
Change-Id: I08b3ee06e8a97e7ec08ade2011b37973137fd8df
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Upgrade policy/parent & policy/common in api"
Jorge Hernandez [Mon, 13 May 2019 14:18:09 +0000 (14:18 +0000)]
Merge "Upgrade policy/parent & policy/common in api"

5 years agoUpgrade policy/parent & policy/common in api 34/87534/1
ramverma [Mon, 13 May 2019 10:18:26 +0000 (10:18 +0000)]
Upgrade policy/parent & policy/common in api

Change-Id: I656c0caccce674aed51df00dfa2cc80a1677a7ab
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
5 years agoAdd more filtering conditions to filter returned PdpGroups with specified policy... 88/87488/1
Chenfei Gao [Fri, 10 May 2019 21:15:39 +0000 (17:15 -0400)]
Add more filtering conditions to filter returned PdpGroups with specified policy deployed

Add groupState=ACTIVE and pdpState=ACTIVE to pdpGroupFilter for filtering
returned pdpGroup list with specified policy deployed in it.

Issue-ID: POLICY-1738
Change-Id: Ie777ab1f6438871b2034c8f2fe7a61595a3f633c
Signed-off-by: Chenfei Gao <cgao@research.att.com>
5 years agoPreload legacy operational policy type and guard policy types 80/87180/2
Chenfei Gao [Tue, 7 May 2019 18:46:22 +0000 (14:46 -0400)]
Preload legacy operational policy type and guard policy types

Includes:
a) Add legacy operational policy type and guard policy types into
preloading list.
b) Fix corresponding junit test failure.

Issue-ID: POLICY-1738
Change-Id: I071e898be31e62f47d427094f1e76069fafd0148
Signed-off-by: Chenfei Gao <cgao@research.att.com>
5 years agoFix api sonar bugs - logging exceptions 59/86759/3
Chenfei Gao [Thu, 2 May 2019 00:48:00 +0000 (20:48 -0400)]
Fix api sonar bugs - logging exceptions

Fix api sonar bugs by logging exceptions in api controllers

Issue-ID: POLICY-1710
Change-Id: Ie591e0d4709c43f3e91aa7b94a1305d8814bd695
Signed-off-by: Chenfei Gao <cgao@research.att.com>
5 years agoAdd version to preloaded policy types 33/86733/1
Jim Hahn [Wed, 1 May 2019 18:43:09 +0000 (14:43 -0400)]
Add version to preloaded policy types

Change-Id: Iee60e74742dce9df03b5409356dcf2cb433c811c
Issue-ID: POLICY-1724
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoFix legacy policy type names 15/86415/1 3.0.2-ONAP
Pamela Dragosh [Fri, 26 Apr 2019 16:51:22 +0000 (12:51 -0400)]
Fix legacy policy type names

The default names were incorrect in the api path.

Issue-ID: POLICY-1704
Change-Id: Ib95a7954c6b4a6fef0e871dfd4130e600e03c957
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdd exact version of parent image 58/83858/2
Dmitry Puzikov [Mon, 1 Apr 2019 12:39:15 +0000 (14:39 +0200)]
Add exact version of parent image

Change-Id: I70b6f703e7eaf63c348df75e15b93a42834b2b3e
Issue-ID: INT-998
Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>