policy/models.git
3 years agoWork around docker rate limit in CSITs 42/115142/2 frankfurt
Jim Hahn [Thu, 19 Nov 2020 19:38:14 +0000 (14:38 -0500)]
Work around docker rate limit in CSITs

CSITs are failing regularly due to download rate limits that were
recently introduced on dockerhub.  Modified the Dockerfiles for the
simulators that are used by the CSITs to pull the base images from
nexus3 instead of dockerhub.
Based on feedback from Steve Winslow, it's OK to pull base images from
nexus3 provided that the docker images generated from it are not
actually released.  In the case of the simulators, only snapshot images
are ever created.
Also added the policy alpine version number to ensure the appropriate
docker base is used for frankfurt.

Issue-ID: POLICY-2895
Change-Id: I61393f3551c2257b75948f39add0b5163265e152
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoupdate keystore cert 86/111586/1
Taka Cho [Tue, 25 Aug 2020 23:15:10 +0000 (19:15 -0400)]
update keystore cert

new expiration date is
3/17/2021

Issue-ID: POLICY-2795
Change-Id: I6c4b636b48ca2aef8165c1f4fd19067b242aedb4
Signed-off-by: Taka Cho <takamune.cho@att.com>
(cherry picked from commit 1812fc7a55aab7e15443fd85dd0f46f8f17cd178)

3 years agoChange models default to frankfurt 13/107913/1
Ram Krishna Verma [Tue, 19 May 2020 19:19:35 +0000 (15:19 -0400)]
Change models default to frankfurt

Issue-ID: POLICY-2514
Change-Id: If028143077cbdc8b811f400230edc329de4f9ac2
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoBump models to 2.2.7-SNAPSHOT 96/107896/2
Ram Krishna Verma [Tue, 19 May 2020 16:39:05 +0000 (12:39 -0400)]
Bump models to 2.2.7-SNAPSHOT

Issue-ID: POLICY-2514
Change-Id: Ie482926a56a5250be5d78a97aa7c1c19311a292c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoRelease models 2.2.6 artifacts 78/107878/1 6.0.0-ONAP
Ram Krishna Verma [Tue, 19 May 2020 14:29:46 +0000 (10:29 -0400)]
Release models 2.2.6 artifacts

Issue-ID: POLICY-2514
Change-Id: Ie9892bfcd16d96cc93534c7540921f54f09fdf9e
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agoCannot parse finishTime in legacy SO responses 56/107756/2
Jim Hahn [Fri, 15 May 2020 18:46:15 +0000 (14:46 -0400)]
Cannot parse finishTime in legacy SO responses

Adding the actual sample responses to the SO simulator broke the
drools-apps junit for usecases.  Fixed (in theory) by updating the
legacy SO actor to properly decode the finishTime.  Refactored the
new SO actor, extracting the type adapter into its own class file
so it could be shared between the new and legacy actors.

Issue-ID: POLICY-2570
Change-Id: I061b603172440b1a91da16d09b4f2a0d289dfc41
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoCannot parse finishTime in SO responses 50/107750/2
Jim Hahn [Fri, 15 May 2020 13:52:35 +0000 (09:52 -0400)]
Cannot parse finishTime in SO responses

The timestamp in SO responses appears to follow RFC-1123/RFC-822
format instead of ISO format.
Added a type adapter for SO.  In Guilin, we may want to consider
combining the two type adapters for LocalDateTime so that either format
is accepted.
Also modified the SO simulator to return responses that are actual
samples from SO.
As part of that work, discovered that the legacy SO actor is not able
to parse these timestamps either.  However, as that code is now
deprecated, left it as is.

Issue-ID: POLICY-2570
Change-Id: I322318d1007e36eef47bb8867fd8ed01cb60223a
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoSO poll should not require request ID 15/107715/3
Jim Hahn [Thu, 14 May 2020 23:08:02 +0000 (19:08 -0400)]
SO poll should not require request ID

When SO is polled for the result of a previous request, it
does not necessarily include the originally returned request
ID in the response.  This causes the SO actor to generate a
"missing request ID in response" exception.
Modified the actor to only extract the request ID from the
first response and cache it for subsequeent responses.
Testing this required the SO simulator to be modified so that
it would return an INCOMPLETE on the initial request, forcing
the actor to poll until it returns a COMPLETE.  Made this a
settable flag so that it could be enabled just to test the
SO actor without impacting other components (e.g., drools-apps,
CSITs).
Also fixed a couple of checkstyle issues in the simulators.

Issue-ID: POLICY-2568
Change-Id: Ifad8b3c0c2c0b03cb82da693c2cf5ced44ede105
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoFix race condition in AaiCqResponse 79/107579/3
Jim Hahn [Tue, 12 May 2020 16:11:14 +0000 (12:11 -0400)]
Fix race condition in AaiCqResponse

The JAXB unmarshaller used by AaiCqResponse is not thread safe.  As a
result, if two responses are decoded at the same time, it will generate
exceptions.

Issue-ID: POLICY-2556
Change-Id: I5e81d5f3c39b9ba321c146dc6f4f73e558aaca3e
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Policy DB contents removed on DB deadlock"
Pamela Dragosh [Mon, 11 May 2020 13:26:40 +0000 (13:26 +0000)]
Merge "Policy DB contents removed on DB deadlock"

3 years agoPolicy DB contents removed on DB deadlock 22/107422/2
liamfallon [Sun, 10 May 2020 14:53:46 +0000 (15:53 +0100)]
Policy DB contents removed on DB deadlock

When a DB deadlock occurs, the DB contents can sometimes be deleted
becasue the DB removes the Service Template object and recreates a new
one in two separate DB transactions.

This change makes sure that the object remove and re-create is in a
sngle DB transaction, so the operation will either happen or not happen
so the DB will not be cleared.

Legacy policy handling must also use the SimpleToscaProvider rather than
accessing the DB directly, as SimpleToscaProvider keeps the DB structure
correct.

Issue-ID: POLICY-2548
Change-Id: I263a41cd1d8bec5d7b421045b3b14aad6e6c66d3
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years agoMerge "Add another blacklist entry for testing"
Liam Fallon [Sun, 10 May 2020 15:08:25 +0000 (15:08 +0000)]
Merge "Add another blacklist entry for testing"

3 years agoAdd another blacklist entry for testing 11/107411/1
Pamela Dragosh [Fri, 8 May 2020 20:43:03 +0000 (16:43 -0400)]
Add another blacklist entry for testing

So I can adequately test blacklist.

Issue-ID: POLICY-2490
Change-Id: I60c9a0fb0d597c1517a756b96dfcc32fcd39dd37
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoAdd missing payload section in vFW examples 01/107401/1
jhh [Fri, 8 May 2020 18:45:57 +0000 (13:45 -0500)]
Add missing payload section in vFW examples

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

3 years agoFix simultaneous get access to policy provider 07/107307/1
liamfallon [Thu, 7 May 2020 09:57:38 +0000 (10:57 +0100)]
Fix simultaneous get access to policy provider

When a "get" is executed while a "create" or "delete" is underway, the
DB sessions overlp and data is lost in the database. "get" requests must
also be synchronized.

Issue-ID: POLICY-2533
Change-Id: Idbe155568e5d793fe82b7cc3aad5ef121e8209b9
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMake type and type_version mandatory on policies 50/107250/1
liamfallon [Wed, 6 May 2020 15:19:38 +0000 (16:19 +0100)]
Make type and type_version mandatory on policies

Up until now, the "type" and "type_version" fields defaulted to "NULL"
and "0.0.0" respectively when they were not specified because the
"type_version" field was not always specified on policies in previous
releases. In cases where the "type_version" field was not specified, it
was assumend that a "0.0.0" version of the policy type existed. In
parallel, if the version field was not specified on the policy type, the
version was stored as 0.0.0.

This behaviour is now changed and the "type" and "type_version" fields
are now always mandatory.

Issue-ID: POLICY-2538
Change-Id: I4279adfa86f531205879dbb87986453604624032
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoPoint to released parent,common 66/107166/1
Pamela Dragosh [Tue, 5 May 2020 18:27:20 +0000 (14:27 -0400)]
Point to released parent,common

Issue-ID: POLICY-2514
Change-Id: Ib7bb52f147c30e9a4c588d29cb13495905ee1ac6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPolicy delete should only return deleted policy 09/107109/1
liamfallon [Tue, 5 May 2020 12:05:11 +0000 (13:05 +0100)]
Policy delete should only return deleted policy

The policy type delete and policy delete now only return what is deleted
in the service template.

Issue-ID: POLICY-2534
Change-Id: I1b8d10c22d4392b0bbb655aa6876ac900ebc81df
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoFix simultaneous write access to policy provider 01/107001/2
liamfallon [Sat, 2 May 2020 00:35:07 +0000 (01:35 +0100)]
Fix simultaneous write access to policy provider

This change serializes write access to the policy database via the
AUthorative TOSCA provider by making sure that only one request is
executed at a time. His change should be repolaced by proper session
handling in the next release of the Policy Framework project.

Issue-ID: POLICY-2533
Change-Id: I5fe4c0f2846981a66eb2f4e1da936fe3c9490ae5
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agomodifications in example sdnc naming policy 40/106740/9
jhh [Tue, 28 Apr 2020 12:10:13 +0000 (07:10 -0500)]
modifications in example sdnc naming policy

Issue-ID: POLICY-2525
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I7c6880b63b3ff8f986fb0de27656eda8f6e596a2
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoRemove provided scope for endpoints in model-impl/cds 93/106693/1
a.sreekumar [Mon, 27 Apr 2020 15:45:50 +0000 (16:45 +0100)]
Remove provided scope for endpoints in model-impl/cds

Change-Id: Ic3571df8ed874267fb803d1f384ec5cb02fb80bb
Issue-ID: POLICY-2524
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
4 years agoBump models patch 2.2.6-SNAPSHOT 05/106605/1
Pamela Dragosh [Fri, 24 Apr 2020 16:26:14 +0000 (12:26 -0400)]
Bump models patch 2.2.6-SNAPSHOT

Also point to parent, common snapshots

Issue-ID: POLICY-2510
Change-Id: Iad79c341bcfb8cb6bb828ee71e199ba3bb9a838b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRelease 2.2.5 models artifacts 99/106599/1
Pamela Dragosh [Fri, 24 Apr 2020 15:02:05 +0000 (11:02 -0400)]
Release 2.2.5 models artifacts

Issue-ID: POLICY-2510
Change-Id: I224eb922ff4efe61a6826e8d6a61160645ea3ed2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Test latest policy version is returned"
Jim Hahn [Mon, 20 Apr 2020 16:29:48 +0000 (16:29 +0000)]
Merge "Test latest policy version is returned"

4 years agoMerge "Update monitoring policies to match DCAE"
Pamela Dragosh [Mon, 20 Apr 2020 11:20:50 +0000 (11:20 +0000)]
Merge "Update monitoring policies to match DCAE"

4 years agoTest latest policy version is returned 50/106250/1
liamfallon [Mon, 20 Apr 2020 08:43:36 +0000 (09:43 +0100)]
Test latest policy version is returned

Load 21 versions of the same policy and make sure that the latest
version is returned when the LATEST policy is set on the version filter.

Issue-ID: POLICY-2352
Change-Id: Iddee33ae53096e18ed2ec67b0c3e837d1d7410a9
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add PNF support to new CDS actor"
Ram Krishna Verma [Sun, 19 Apr 2020 20:22:50 +0000 (20:22 +0000)]
Merge "Add PNF support to new CDS actor"

4 years agoAdd PNF support to new CDS actor 22/106222/2
Jim Hahn [Fri, 17 Apr 2020 19:09:21 +0000 (15:09 -0400)]
Add PNF support to new CDS actor

Made the following updates:
- added new A&AI get-PNF Operation by refactoring AaiGetOperation,
  separating out Tenant and PNF operations
- added PNF support to the CDS actor
- added logging to the CDS Handler
- added get-pnf to the A&AI simulator

Issue-ID: POLICY-2505
Change-Id: Iff140e7c864f762790d8e2ecaba62c161c859e6e
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoUpdate monitoring policies to match DCAE 15/106215/1
Pamela Dragosh [Fri, 17 Apr 2020 19:38:24 +0000 (15:38 -0400)]
Update monitoring policies to match DCAE

From testing last Wednesday 4/15. Update our policies to match
what DCAE is loading and is used for Integration E2E testing.

https://git.onap.org/dcaegen2/platform/blueprints/tree/blueprints/k8s-tca.yaml

Issue-ID: POLICY-2507
Change-Id: I2492e214625099884113ac0bc76e26181f992f0e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdating pdp-simulator as per recent changes to send PdpGroup in status 81/106181/1
a.sreekumar [Fri, 17 Apr 2020 09:25:23 +0000 (10:25 +0100)]
Updating pdp-simulator as per recent changes to send PdpGroup in status

Change-Id: Ic2ad6bd7f65633eef73d6432f244be77d7c760f9
Issue-ID: POLICY-2499
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoCDS Operator should be generic 66/106166/1
Jim Hahn [Thu, 16 Apr 2020 22:51:40 +0000 (18:51 -0400)]
CDS Operator should be generic

Like the SDNR Operator, the CDS Operator should work regardless
of the operation name.

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

4 years agoMerge "Add version to example yaml files"
Pamela Dragosh [Thu, 16 Apr 2020 18:42:05 +0000 (18:42 +0000)]
Merge "Add version to example yaml files"

4 years agoMerge "CDS actor was not registered"
Jorge Hernandez [Thu, 16 Apr 2020 18:04:49 +0000 (18:04 +0000)]
Merge "CDS actor was not registered"

4 years agoCDS actor was not registered 13/106113/2
Jim Hahn [Thu, 16 Apr 2020 16:34:52 +0000 (12:34 -0400)]
CDS actor was not registered

Moved the spi file to register the actor and added a test to
ensure that the registration worked.
Also removed some deprecated code from the CDS junits.

Issue-ID: POLICY-2501
Change-Id: I06f50ea8f074cdb7a89c7e387f9f31ea7cffa7e2
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAdd version to example yaml files 03/106103/3
Jim Hahn [Thu, 16 Apr 2020 14:21:15 +0000 (10:21 -0400)]
Add version to example yaml files

Determined that some of the yaml files were not suitable for use
in the CSITs, because they were missing the "version" property.
Added it where needed.  Also added type_version where it was missing,
as well.

Issue-ID: POLICY-2491
Change-Id: I47bf0ec2b99d29580390a6e90512dfd903b042d6
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Fixing minor bug in policy-models/pdp-simulator script"
Ram Krishna Verma [Thu, 16 Apr 2020 13:55:23 +0000 (13:55 +0000)]
Merge "Fixing minor bug in policy-models/pdp-simulator script"

4 years agoFixing minor bug in policy-models/pdp-simulator script 83/106083/1
a.sreekumar [Thu, 16 Apr 2020 09:15:41 +0000 (10:15 +0100)]
Fixing minor bug in policy-models/pdp-simulator script

Change-Id: I3b7bdfdd2fdd73b38cf7996457f6bea735752d46
Issue-ID: POLICY-2499
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoAdd example drools native artifact policies 42/106042/2
jhh [Wed, 15 Apr 2020 19:28:45 +0000 (14:28 -0500)]
Add example drools native artifact policies

Issue-ID: POLICY-2378
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iab36c4b3214bef90dfe4a6f00ff68df04e3de203
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoBump models to 2.2.5-SNAPSHOT 44/105944/1
Ram Krishna Verma [Tue, 14 Apr 2020 19:03:24 +0000 (15:03 -0400)]
Bump models to 2.2.5-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I5461bafd3c2d19f4f457da0816bba117a2d8b550
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoRelease models 2.2.4 35/105935/1
Ram Krishna Verma [Tue, 14 Apr 2020 18:23:13 +0000 (14:23 -0400)]
Release models 2.2.4

Issue-ID: POLICY-2378
Change-Id: Ia31590fe8dc76cc8c6bea66b1bab6ba1bb96cb14
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoPoint to released common 27/105927/1
Ram Krishna Verma [Tue, 14 Apr 2020 17:01:45 +0000 (13:01 -0400)]
Point to released common

Issue-ID: POLICY-2378
Change-Id: Ib956135eb681e8f9d9a7da9ecebc9c8d4fd615e6
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoMerge "Example usecases as controller native policy"
Ram Krishna Verma [Tue, 14 Apr 2020 17:00:57 +0000 (17:00 +0000)]
Merge "Example usecases as controller native policy"

4 years agoExample usecases as controller native policy 25/105925/1
jhh [Tue, 14 Apr 2020 16:32:47 +0000 (11:32 -0500)]
Example usecases as controller native policy

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

4 years agoChange length to a string 09/105909/2
Pamela Dragosh [Tue, 14 Apr 2020 12:20:51 +0000 (08:20 -0400)]
Change length to a string

This field is now a string.

Issue-ID: POLICY-2486
Change-Id: Ie6707e29f2b069e3938897b62bd0591fd023016e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoFix strings in naming policy 61/105861/1
Pamela Dragosh [Mon, 13 Apr 2020 19:52:16 +0000 (15:52 -0400)]
Fix strings in naming policy

Issue-ID: POLICY-2486
Change-Id: I89b2bfd2ac00c407aa90c34e898e9701cca54925
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoBump models patch 2.2.4-SNAPSHOT 17/105817/1
Pamela Dragosh [Sat, 11 Apr 2020 19:13:35 +0000 (15:13 -0400)]
Bump models patch 2.2.4-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I51c6c57bdcc0299c25b5ee05f47c20f4542bc02d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRelease models 2.2.3 07/105807/1
Pamela Dragosh [Fri, 10 Apr 2020 19:35:08 +0000 (15:35 -0400)]
Release models 2.2.3

Issue-ID: POLICY-2378
Change-Id: I428d048da455d359eea01dc5136f424eaee95153
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoPoint to released parent and common 75/105775/1
Pamela Dragosh [Fri, 10 Apr 2020 17:50:50 +0000 (13:50 -0400)]
Point to released parent and common

parent 3.1.2
common 1.6.3

Issue-ID: POLICY-2378
Change-Id: I9cc0b0b8739f3fb017dc5a68584c12af9912bd29
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Disable sonar main args for models"
Ram Krishna Verma [Thu, 9 Apr 2020 16:24:44 +0000 (16:24 +0000)]
Merge "Disable sonar main args for models"

4 years agoMerge "SDNR Actor enhancements"
Jim Hahn [Thu, 9 Apr 2020 13:58:04 +0000 (13:58 +0000)]
Merge "SDNR Actor enhancements"

4 years agoDisable sonar main args for models 80/105680/1
Jim Hahn [Thu, 9 Apr 2020 13:55:43 +0000 (09:55 -0400)]
Disable sonar main args for models

Issue-ID: POLICY-2305
Change-Id: Ie8c45fb767ec9b2f9b1b541532fede52306c36b4
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoSDNR Actor enhancements 58/105558/3
Jim Hahn [Wed, 8 Apr 2020 16:37:20 +0000 (12:37 -0400)]
SDNR Actor enhancements

Made the following changes:
- Enhanced SDNR Actor to support any operation name specified within
  the policy, constructing the same request, but passing a different
  "RPC name" and "Action" in the request.
- Added ControlLoopResponse to OperationOutcome
- Modified SDNR Actor to populate ControlLoopResponse

Issue-ID: POLICY-2468
Change-Id: I50ee0674077d975f3cd211454656edc47d78520f
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMore sonar fixes in models 01/105501/1
Jim Hahn [Wed, 8 Apr 2020 14:04:29 +0000 (10:04 -0400)]
More sonar fixes in models

Addressed the following sonar issues:
- missing assert in junit
- duplicate code blocks
  - fixed those in the simulators
  - leaving the others in the concept classes for Liam/"G"

Issue-ID: POLICY-2305
Change-Id: Icfe80afb378b4cdec4de3d33d0e33227e04845d8
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoAddress sonar issues in models 47/105447/2
Jim Hahn [Tue, 7 Apr 2020 17:58:09 +0000 (13:58 -0400)]
Address sonar issues in models

Addressed the following sonar issues:
- use RE2 instead of java.util Pattern for "+" and "*"
- don't use deprecated methods
  - for Date(long), sonar appeared not to parse the argument's
    type correctly.  Modified the code slightly to make sonar happy
- duplicate blocks of code
- either log or throw
- missing assert in junit
  - for SDNR & VFC, eliminated threads, as they are unnecessary
- duplicate code block in different branches
- useless assignments
- redeclaring abstract methods
- cyclomatic complexity
  - used lombok in some cases (e.g., EqualsAndHashCode)
- assert argument order
  - actually deleted ControlLoopTargetType, because it is not needed
    and sonar complains regardless of which order is used
- add private constructor to utility classes
- use StandardCharsets instead of literals

Also:
- added logback-test.xml to SO to eliminate the voluminous output
  from the junit test

Issue-ID: POLICY-2305
Change-Id: I586c331781bedbd54a115a71847d04d293689445
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Models junits are failing locally"
Jim Hahn [Mon, 6 Apr 2020 14:00:11 +0000 (14:00 +0000)]
Merge "Models junits are failing locally"

4 years agoModels junits are failing locally 08/105108/2
Jim Hahn [Fri, 3 Apr 2020 21:45:29 +0000 (17:45 -0400)]
Models junits are failing locally

Junits were failing in my local eclipse environment.  Fixed the
following:
- more cases of "is marked @NonNull but is null" (I thought Liam had
  already fixed all of these, but I'm still seeing errors, so fixed
  some more)
- comparing "Instant" values in event time stamps assumes that
  the times will be different, but may not be, if the JVM is fast
  enough.  Modified the test to set the times of the new events to
  Instant+1, to ensure that they are different from the original

Issue-ID: POLICY-2305
Change-Id: Ic05bc6a58b559ba589583ce887711ee01f76691c
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoRefer io.netty from policy/parent 98/105098/1
Ram Krishna Verma [Fri, 3 Apr 2020 17:35:33 +0000 (13:35 -0400)]
Refer io.netty from policy/parent

Issue-ID: POLICY-2467
Change-Id: If06f5fbf26269f7a34104bb2194258494a6488bf
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agochange drools op. policies controller name 34/105034/1
jhh [Thu, 2 Apr 2020 19:22:23 +0000 (14:22 -0500)]
change drools op. policies controller name

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

4 years agoSet sub request ID before start callback 79/104879/3
Jim Hahn [Wed, 1 Apr 2020 15:03:31 +0000 (11:03 -0400)]
Set sub request ID before start callback

Modified new actor code to generate the sub request ID
before invoking the start callback.

Issue-ID: POLICY-2461
Change-Id: I4adabd6efda2c30c0e2da31f95f01dd5fe546c0a
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix the policy model metadata for CLAMP 16/104716/1
sebdet [Mon, 30 Mar 2020 23:02:25 +0000 (01:02 +0200)]
Fix the policy model metadata for CLAMP

Fix the metadata section for CDS/operation, there was a mistake in the parameter value

Issue-ID: CLAMP-801
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: Ic25173dc24874d0877969872f20ad4d8df0703fd

4 years agoTest new actors against simulators 17/104617/4
Jim Hahn [Fri, 27 Mar 2020 16:35:23 +0000 (12:35 -0400)]
Test new actors against simulators

Also modified HttpParams to allow "path" to be blank to support any
cases that really have no "path" to append to the context URI base
path.

Issue-ID: POLICY-2405
Change-Id: I49eebde6759659d2804b5a11c1504c37674bd0c4
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoPoint to latest snapshot 87/104587/1
Pamela Dragosh [Fri, 27 Mar 2020 16:56:44 +0000 (12:56 -0400)]
Point to latest snapshot

Issue-ID: POLICY-2378
Change-Id: I5cd316100ee01b81a3cc59d57095beb6d97d7ec3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoCleanup sonar bugs and security hotspot 77/104577/1
Pamela Dragosh [Fri, 27 Mar 2020 15:25:29 +0000 (11:25 -0400)]
Cleanup sonar bugs and security hotspot

Just some trivial sonar bugs for missing argument and a
couple sonar overrides to clear security hotspots.

Issue-ID: POLICY-2165
Change-Id: I392e5fee458465c66313a16a8912e23a3a119848
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoDiscard requests in APPC legacy actor 23/104523/1
Jim Hahn [Thu, 26 Mar 2020 15:51:52 +0000 (11:51 -0400)]
Discard requests in APPC legacy actor

The new actor for legacy APPC attempts to discard request
messages received on the response topic by discarding those
that have a null response.  Unfortunately, when it decodes them,
the Response object creates a status object, even if there isn't
one in the json message, thus the test fails and the actor treats
it as a failed response.

Issue-ID: POLICY-2434
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I26cfb25443ff2ed394781d309f9097d50b8f160b
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump models 2.2.3-SNAPSHOT 46/104446/1
Pamela Dragosh [Wed, 25 Mar 2020 23:57:02 +0000 (19:57 -0400)]
Bump models 2.2.3-SNAPSHOT

Released 2.2.2

Issue-ID: POLICY-2378
Change-Id: I829f0dfc88aeaf1f9b7efad91c983628f2a5d706
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRelease models 2.2.2 98/104398/1
Pamela Dragosh [Wed, 25 Mar 2020 17:24:56 +0000 (13:24 -0400)]
Release models 2.2.2

This includes a change in the Operational Common policy
type for CLAMP team via pairwise testing.

Issue-ID: POLICY-2378
Change-Id: Ifd0790af8f90a3299c38cfbe4e3f677094c88aa7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Cleanup eclipse warnings"
Pamela Dragosh [Wed, 25 Mar 2020 16:36:25 +0000 (16:36 +0000)]
Merge "Cleanup eclipse warnings"

4 years agoChange metadata for clamp 79/104379/3
sebdet [Wed, 25 Mar 2020 15:21:57 +0000 (08:21 -0700)]
Change metadata for clamp

Update metadata form clamp in the operational common model, so that it helps the user in the UI.

Issue-ID: CLAMP-786
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: Ib44391bd58a478558c3881243839b65cf2b1846d

4 years agoCleanup eclipse warnings 73/104373/1
Pamela Dragosh [Wed, 25 Mar 2020 13:55:19 +0000 (09:55 -0400)]
Cleanup eclipse warnings

Issue-ID: POLICY-2165
Change-Id: Iaad54af1b1210fe96fa44dcaa609834c46557877
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoSecurity fixes for cds actor in policy/models 65/104265/1
Ram Krishna Verma [Tue, 24 Mar 2020 15:38:01 +0000 (11:38 -0400)]
Security fixes for cds actor in policy/models

Upgrading io.netty to 4.1.48.Final as the current version has security issues.

Issue-ID: POLICY-2442
Change-Id: I5dbfdc7890c85571ef6b6bcc7a9f95310868f6a0
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
4 years agoBump policy-models to version 2.2.2-SNAPSHOT 32/104232/2
liamfallon [Tue, 24 Mar 2020 09:50:17 +0000 (09:50 +0000)]
Bump policy-models to version 2.2.2-SNAPSHOT

Issue-ID: POLICY-2378
Change-Id: I644e45822154f57d2bf6a81e55df07e2e4ca6966
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoRelease models 2.2.1 69/104169/2
Pamela Dragosh [Mon, 23 Mar 2020 14:37:23 +0000 (10:37 -0400)]
Release models 2.2.1

Releasing for RC0

Issue-ID: POLICY-2378
Change-Id: I9e1c17a966265ddc1f02f9d1225c08a668c3b844
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Add version to compliant operational policies"
Pamela Dragosh [Mon, 23 Mar 2020 22:14:17 +0000 (22:14 +0000)]
Merge "Add version to compliant operational policies"

4 years agoAdd version to compliant operational policies 83/104183/2
jhh [Mon, 23 Mar 2020 20:59:49 +0000 (15:59 -0500)]
Add version to compliant operational policies

Issue-ID: POLICY-2356
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5636ec4e92ff87fdefb9a6372a150ad021aeec16
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
4 years agoNew Guard actor request structure is incorrect 81/104181/3
Jim Hahn [Mon, 23 Mar 2020 19:04:46 +0000 (15:04 -0400)]
New Guard actor request structure is incorrect

Missing various fields within the request structure (e.g.,
ONAPName).  Fixed.
In the process, also modified makeGuardPayload() so that it
only constructs the inner "guard" JSON object, making it easier
for invoking code to modify it.

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

4 years agoUpdate new SDNR actor with v2.0 structures 70/104170/2
Jim Hahn [Mon, 23 Mar 2020 15:36:09 +0000 (11:36 -0400)]
Update new SDNR actor with v2.0 structures

SDNR v2.0 introduced an extra "input" and "output" layer within
the body of the messages.  Added POJOs to match that, and updated
the actor to use the new POJOs so that no extra steps are needed
during serialization or deserialization.
Also modified the SDNR and APPC-LCM simulators to discard request messages
when looking for the response, if the sink and source topics happen to
be the same.
Added the SDNR simulator.
Added more coverage to the SDNR actor.
Fixed a sonar issue in the SDNR junit code:
- use a constant instead of a literal (i.e., for "ModifyConfig")

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

4 years agoMerge "Bug fixes in models simulators"
Liam Fallon [Mon, 23 Mar 2020 12:22:15 +0000 (12:22 +0000)]
Merge "Bug fixes in models simulators"

4 years agoMerge "Exception not propagated by processResponse"
Liam Fallon [Mon, 23 Mar 2020 12:21:50 +0000 (12:21 +0000)]
Merge "Exception not propagated by processResponse"

4 years agoFix legacy APPC handling of Request 98/104098/2
Jim Hahn [Fri, 20 Mar 2020 22:08:52 +0000 (18:08 -0400)]
Fix legacy APPC handling of Request

Legacy APPC uses the same topic for both requests and responses.
Unfortunately, when the actor sees the request, thinking it's a
response, it throws an exception because it can't find the status
code.  Fixed.

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

4 years agoException not propagated by processResponse 99/104099/1
Jim Hahn [Fri, 20 Mar 2020 22:29:21 +0000 (18:29 -0400)]
Exception not propagated by processResponse

If the topic processResponse() method throws an exception, then
the actor/operation is left in an incomplete state.

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

4 years agoBug fixes in models simulators 92/104092/2
Jim Hahn [Fri, 20 Mar 2020 19:53:47 +0000 (15:53 -0400)]
Bug fixes in models simulators

Fixed these issues:
- topics weren't started
- appc topics were reversed
- prevent appc simulator from responding to a response (i.e., infinite
  loop)

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

4 years agoMerge "Add docker file for all simulators"
Jim Hahn [Fri, 20 Mar 2020 18:07:33 +0000 (18:07 +0000)]
Merge "Add docker file for all simulators"

4 years agoTest cascaded multiple revision gets 52/104052/1
liamfallon [Fri, 20 Mar 2020 12:50:35 +0000 (12:50 +0000)]
Test cascaded multiple revision gets

This patch tests cascaded get requests with multiple revisions.

Issue-ID: POLICY-2377
Change-Id: Ie7dc849d7b930b861d38c386a9950ae7e84e2a05
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdd docker file for all simulators 12/103912/7
Jim Hahn [Tue, 17 Mar 2020 21:41:59 +0000 (17:41 -0400)]
Add docker file for all simulators

Some CSITs may require multiple simulators.  This adds a class that
will start all of the simulators.  A tarball is generated from which
a docker image can be built.
Added simulators for Topics: appc and appc-lcm.
Fixed licenses in files in packages directory.
Fixed per review comments:
- add version to Dockerfile

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

4 years agoMerge "Point to released common and parent"
Liam Fallon [Fri, 20 Mar 2020 09:51:38 +0000 (09:51 +0000)]
Merge "Point to released common and parent"

4 years agoMerge "Misc simple sonar issue fixes"
Liam Fallon [Fri, 20 Mar 2020 09:31:29 +0000 (09:31 +0000)]
Merge "Misc simple sonar issue fixes"

4 years agoPoint to released common and parent 19/104019/1
Pamela Dragosh [Fri, 20 Mar 2020 00:17:05 +0000 (20:17 -0400)]
Point to released common and parent

common 1.6.2 and parent 3.1.1

Issue-ID: POLICY-2378
Change-Id: I668814f6d121db4f22050d2b6d307d5d3743ddf4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMisc simple sonar issue fixes 16/103816/2
Chris Ramstad [Tue, 17 Mar 2020 18:52:02 +0000 (11:52 -0700)]
Misc simple sonar issue fixes

Issue-ID: POLICY-2389
Signed-off-by: Chris Ramstad <cramstad@ciena.com>
Change-Id: I7ce91e331a128aaadaab5ac837e19873a3388164

4 years agoAdd unit test for Version fetch change 89/103989/1
liamfallon [Thu, 19 Mar 2020 17:37:05 +0000 (17:37 +0000)]
Add unit test for Version fetch change

Issue-ID: POLICY-2377
Change-Id: Iaad1da84de058fcb50d24663156b4b0bcedd427e
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAllow fetch of old policy type verisons 77/103977/1
liamfallon [Thu, 19 Mar 2020 15:28:49 +0000 (15:28 +0000)]
Allow fetch of old policy type verisons

Due to the problems with TOSCA and version handling, the filtering for
policy types on old versions did not work. This change fixes that
problem.

Issue-ID: POLICY-2377
Change-Id: I462bd5710b9dea37475861d1021d28b2c7391a24
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "renew policy certs till 03/17/2021"
Pamela Dragosh [Wed, 18 Mar 2020 19:54:16 +0000 (19:54 +0000)]
Merge "renew policy certs till 03/17/2021"

4 years agoReturn latest entity on null versions 54/103854/1
liamfallon [Wed, 18 Mar 2020 11:47:20 +0000 (11:47 +0000)]
Return latest entity on null versions

This review amends the behaviour of "get" operations on entities to
always return the latest version of an entity when the version of the
search key is the null key (value of 0.0.0).

Issue-ID: POLICY-2377
Change-Id: I4f7c12637c90bc1a83ce2ba5ef40e15b461a7d51
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agorenew policy certs till 03/17/2021 27/103827/1
jhh [Wed, 18 Mar 2020 00:40:32 +0000 (19:40 -0500)]
renew policy certs till 03/17/2021

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

4 years agoMerge "Consistent returns on Service Template gets"
Pamela Dragosh [Mon, 16 Mar 2020 19:29:00 +0000 (19:29 +0000)]
Merge "Consistent returns on Service Template gets"

4 years agoConsistent returns on Service Template gets 68/103668/3
liamfallon [Fri, 13 Mar 2020 12:34:58 +0000 (12:34 +0000)]
Consistent returns on Service Template gets

This review enables specification of versions of entities on incoming
service templates using a ':' delimiter.

So this will load version 1.00, version 2.0.0, and version 3.0.0:
org.onap.entitiy:1.0.0:
   version: 1.0.0
org.onap.entity:2.0.0:
   version: 2.0.0
org.onap.entity
   version: 3.0.0

So this will load version 1.00, version 2.0.0, and version 4.0.0:
org.onap.entitiy:1.0.0:
   version: 1.0.0
org.onap.entity:2.0.0:
   version: 2.0.0
org.onap.entity:
   version: 3.0.0
org.onap.entity:
   version: 4.0.0

This will load
org.onap.entity:1.0.0
   name: org.onap.entity
   version: 1.0.0

This will throw an exception
org.onap.entity:1.0.0
   name: org.onap.some.other.entity
   version: 1.0.0

This will throw an exception
org.onap.entity:1.0.0:
   name: org.onap.entity
   version: 2.0.0

Issue-ID: POLICY-2377
Change-Id: I34bccf065b4ee4d2fe71b052bf009d4a40e2cba8
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoAdding APEX example to policy models 73/103673/1
a.sreekumar [Fri, 13 Mar 2020 13:54:28 +0000 (13:54 +0000)]
Adding APEX example to policy models

Change-Id: Idc3da44d99d8d8228a9bc6be49039c2fa02b350e
Issue-ID: POLICY-2424
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoRevert some UUID variable names 47/103647/2
Jim Hahn [Thu, 12 Mar 2020 22:55:21 +0000 (18:55 -0400)]
Revert some UUID variable names

Unfortunately, some code uses "new Yaml(...)" to decode policies and
"Yaml" doesn't understand GSON annotations.  As a result, this means
that the field names must match the serialized name, thus they must
continue to end with "UUID" instead of "Uuid".

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

4 years agoMerge "Clean up minor checkstyle/sonar issues"
Pamela Dragosh [Thu, 12 Mar 2020 19:25:47 +0000 (19:25 +0000)]
Merge "Clean up minor checkstyle/sonar issues"

4 years agoClean up minor checkstyle/sonar issues 05/103605/5
liamfallon [Thu, 12 Mar 2020 12:15:04 +0000 (12:15 +0000)]
Clean up minor checkstyle/sonar issues

A few minor eclipse warnings and checkstyle warnings in policy models.

Issue-ID: POLICY-1910
Change-Id: I612c6514fa7d88cb8658a7ee1618869a525e48d7
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoSONAR: Squelch bug regarding non-initalized lombok.NonNull values 64/103564/1
Chris Ramstad [Wed, 11 Mar 2020 23:06:14 +0000 (16:06 -0700)]
SONAR: Squelch bug regarding non-initalized lombok.NonNull values

Issue-ID: POLICY-2389
Signed-off-by: Chris Ramstad <cramstad@ciena.com>
Change-Id: Iba9faf9e878d55022be7882e862ebed826dc76c1