Age | Commit message (Collapse) | Author | Files | Lines |
|
Differences between local sonar scan (90.5) and sonarcloud (89.7) after merge
Pushing extra tests to ensure coverage is above 90 on sonarcloud
Issue-ID: POLICY-5069
Change-Id: I684204545044e08e852acdb995fce54ceefb0523
Signed-off-by: waynedunican <wayne.dunican@est.tech>
|
|
Increased code coverage to 90%
SONAR - Removed TODO comments
SONAR - Added NOSONAR where appropriate
SONAR - Replaced stream.Collect() with stream.toList() where applicable
SONAR - Made variables serializable or transient to comply with sonar rules
Issue-ID: POLICY-5069
Change-Id: Ife256eaf4e6f427fe40b138bacc6f112dc5bcea4
Signed-off-by: waynedunican <wayne.dunican@est.tech>
|
|
- fix on side effects from drools-apps fix.
- hibernate does not allow class annotated with @MappedSuperClass
to have also @Table annotation.
Issue-ID: POLICY-4955
Change-Id: I1493f58cd31646842220872c239629f3a499a9f3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
|
|
Review for models-sim and models-tosca
Issue-ID: POLICY-5042
Change-Id: I72533933b34df145e1ff4eb40ebafa93f85cca9a
Signed-off-by: waynedunican <wayne.dunican@est.tech>
|
|
- including dependencies to pom.xml files only where they are used,
avoiding extra dependencies being added in all packages.
Issue-ID: POLICY-4945
Change-Id: I85b18befe3fe2877c754b1ac818d1b4994f9f7f9
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
|
|
Issue-ID: POLICY-4929
Change-Id: Icd796030753c505c99c1840d8d11fb2f8300c15e
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
|
|
Issue-ID: POLICY-4402
Change-Id: Icead1601984f463e557b969f2792f0f0aa05f060
Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech>
|
|
- IQ nexus dependencies
- sonar hotspots and code smells
Issue-ID: POLICY-4760
Change-Id: Ic4260c568f9d9164a33aacb34a5ff3a6f91b1bd8
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
|
|
Issue-ID: POLICY-4669
Change-Id: I0157ae0ea7151658308c7e6d429098f16824c190
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
|
|
Removing last annotations in order to remove dependencies in parent
Issue-ID: POLICY-3465
Change-Id: Id7a070120d452e33af805b08b37dd1eba1374615
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
|
|
Issue-ID: POLICY-4533
Change-Id: I77a6c44c96013963e141265758629cae83e49876
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Issue-ID: POLICY-4045
Change-Id: Iae24996aa0b1047e993c1e08ae1265152a598ece
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Issue-ID: POLICY-4317
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I34158cd21777b6127fd4a306b73fa3446e302c99
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
PDP fails to parse metadataSet from PDP_UPDATE message. MetadataSet(Lob)
needs to be serialized and de-serialized for storage/retrieval to
preserve the format.
Issue-ID: POLICY-3934
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I5f7a0649639f142c7afb4dd93cc8081ebaac4081
|
|
The return type for fetching node templates can be just a List of
ToscaNodetemplates. Removing the map with node template keys as it
provides redundant keys in the output.
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I43d357fc24af9fd4d127cce139b6d21c53cc98d1
|
|
Each metadataSet is represented as a 'node_template' in Tosca
mapped to a specific node type.
Support added for db operations of node templates as
independent entities.
Detailed documentation available here :
https://wiki.onap.org/display/DW/Enable+Handling+of+Policy+Type+Metadata
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I6c189142b1778ba858aae27cd92d4f136d950208
|
|
Issues identified in the entity classes are fixed in this
review. Some fixes doesn't affect the table structure at all.
Tables actually affected by some of these fixes are not really used today, and doesn't
contain any data. A separate review is raised for the db-migrator
changes.
Change-Id: I0efdf2c5f17e12225f1b443b5fe8e27c578229f7
Issue-ID: POLICY-3871
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
|
|
The TOSCA in_range constraint is not supported, causing errors to be
thrown in TOSCA control loop constraint edits.
Issue-ID: POLICY-3695
Change-Id: I95dec4118ce8572c5b76d528878c6782856e0a53
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Add check when reading policies and policy types from db
Issue-ID: POLICY-3606
Change-Id: I7a1d96e4be1841243619e89c31dabc3e761dd17a
Signed-off-by: saul.gill <saul.gill@est.tech>
|
|
The new version of checkstyle identified new issues. Fixed those.
Issue-ID: POLICY-3094
Change-Id: I85314bc0249cba0020a0aefbc250851a2b646dd9
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-3396
Change-Id: I3c9e5ee7ea6da2bab4fe37504d39f7ce63868887
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-3333
Change-Id: I339024677a2d090f61cc55d1b056b832c87d231a
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed:
- a few other "var" cases
- use re2j instead of java.util.regex
- use correct class for constants
- remove unused constants
Issue-ID: POLICY-3094
Change-Id: Ifcb2b0623e8df0527f0a279e666d062422978ded
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed:
- use "var"
Issue-ID: POLICY-3094
Change-Id: Id5ea7ab049c2018744afa75a55d44e47f216d5bc
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Removed GroupValidationResult, replacing it with BeanValidationResult.
Modified the ParameterGroup subclasses to use BeanValidator, adding
annotations where needed to trigger the validations that had been
automatically performed by GroupValidationResult.
Issue-ID: POLICY-2059
Change-Id: I245e4a647fcbb718faa63a7543f9f81c85da958c
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Junits for models often use the same memory DB name which may leave
garbage in the DB from one test to the next. Modified the code to use
distinct names for each XxxTest class.
Issue-ID: POLICY-3171
Change-Id: I2a4a0b4949d532d6949f5d39396288c54d03688b
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Tests refactoring to reduce number of assertions
Issue-ID: POLICY-3094
Change-Id: I8a9a02100e5d103f574cf2cb89d2e924d0f56507
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
|
|
Due to the precision of time stamps being saved to the nearest second,
a millisecond precision timestamp was being compared to a second
precision timestamp, causing the write to fail. This change fixes that.
A unit test is also added to test for this on the provider.
In addition, a USE-MARIADB flag is being introduced, which allows unit
tests to be run against a locally installed MariaDB instance so that the
unit tests can be verified against MariaDB locally rather than H2, the
default in Gerrit.
Issue-ID: POLICY-3146
Change-Id: I878f160956e89506743dc074679ee81ac1c48216
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Tests refactoring to reduce number of assertions
Removed lines 167-169 in PfKeyImplTest
Issue-ID: POLICY-3094
Change-Id: I94ef11068811c81108b0fbf3e5b878d02ab25306
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
|
|
|
|
Currently we have handling for "type" and "type_version" on TOSCA Policy
class. However, the concept of a "type" and "type_version" also exists
on the ToscaCapabilityAssignment, the ToscaNodeTemplate, and the
ToscaRequriement classes.
This review makes the type handling on Policy generic, thus extending it
to the other three types.
Issue-ID: POLICY-2983
Change-Id: Ia20e3a8c485f4841257075df08e0784eac415770
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Tests refactoring to reduce number of assertions to less then 25
Issue-ID: POLICY-3094
Change-Id: Icd3d83c7f8168dd81df13a584229eab36c646f37
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
|
|
Updated JPA classes to use java.sql.TImestamp rather than Instant.
Issue-ID: POLICY-3069
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: If5b874ec96931d4b8dd142d46a9980e83a4708fc
|
|
|
|
Addressed sonar "duplicate code" issue by extracting a common
ToscaNameVersion class from the XxxIdentifier classes.
Also removed junit test for class that no longer exists and renamed
another junit to match the renaming of the class being tested.
Issue-ID: POLICY-2905
Change-Id: I4a28cd7de2478f2771a864439c0b440ad8310299
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The work to remove duplicate code from models introduced as many new
sonars as it eliminated. :-( Addressed the following new issues:
- visibility of constructor
- use of more specific assertThat() calls
Also added two junit test file that were somehow previously left out.
Issue-ID: POLICY-2905
Change-Id: I7a0206bd157412d3c6d98bfe21797f106b37ac65
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Addressed the following issues:
- remove duplicate code; extracted a common class containing properties
Issue-ID: POLICY-2905
Change-Id: I80c423ab45c0c6823d338a034762d222ec334288
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Addressed the following:
- make constructors protected
- check exception type
- too many assertions
- remove annotation lists
- use "<>"
- reduce cognitive complexity
- extract constant
- multiple method calls in one assert
- don't use eq() in verify()
- indentation
Issue-ID: POLICY-2905
Change-Id: I25bb3951f781250e9cdfe8f5f3b80cb63e129184
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The classes PolicyTypeFilter and PolicyFilter only work on Policy types
and policies. However they just filter on name/version/type/typeversion
so there is no reason that the filters could not be applied to other
entities.
This commit adapts the PolicyTypeFilter to EntityFilter and PolicyFilter
to TypedEntityFilter, so the filters can be applied to collections of
any ToscaEntity class.
Issue-ID: POLICY-2995
Change-Id: I8fcf76ee8c8497836b3286b35f928b0c341dac34
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Copy constructors for ToscaServiceTemplate and ToscaTopologyTemplate.
Issue-ID: POLICY-2971
Change-Id: Idb4abf8bce40593e0bf18614b8c647688dd5748d
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
THis change adds a method to create a ToscaConceptIdentifer from a
ToscaEntityKey class. This method reduces the code vloume when
translating between these identifiers.
Issue-ID: POLICY-2971
Change-Id: Idd62339935d2ba78e6c60b40ee95fedac0642bef
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Concenience constructor to create a TosaConceptIdentifier from a PfKey
and a method to create a PfConceptKey from a ToscaConceptIdentifier.
Issue-ID: POLICY-2971
Change-Id: I402b2e12cc11976cd7e98436eb46486c35fdaa31
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
In order to support serialization and deserialization of
ToscaNodeTemplate objects onto DMaaP, we need a copy constructor on the
ToscaNodeTemplate object.
Issue-ID: POLICY-2971
Change-Id: If6dc6c54d5673cef46734a88d0a91ae868c11dcb
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Using keywords as column names in JPA models is causing syntax errors during auto generation of DDL
The errors are visible in the policy api and pap docker logs on startup
This review renames the relevant columns
Issue-ID: POLICY-2670
Signed-off-by: gregory.hayes <gregory.hayes@est.tech>
Change-Id: I52a3156461940465c3945841c69a04fcb2f90117
|
|
Updated the code to place validation annotations directly on the
annotated types instead of using the @Items and @Entries annotations.
Also added/updated junits for validation code.
Issue-ID: POLICY-2648
Change-Id: Ia535da07a38cec77a74c5c3215b5ae784d7a4e1a
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The policy models tosca classes ToscaPolicyIdentifier and
ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA
concept, not just TOSCA policies so they are renamed to
ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion
respectively.
The class ToscaPolicyTypeIdentifier is redundant and is replaced by
ToscaConceptIdentifier.
Issue-ID: POLICY-2900
Change-Id: Id0a37c42ea4e74f07b47e1694c4f8291c35879c9
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Today we can only handle a single service template in the database. We
should be able to handle multiple service templates and assign arbitrary
policy types and policies to maned and versioned service templates.
This review brings in the Java API in models provider for handling
service templates in this way and uses a simplistic single-teplate
implementation in models-tosca, that will work but still only handles a
single service template under the hood.
Issue-ID: POLICY-2900
Change-Id: Ia02dea8abe44b7f407e685090a4b8e0360889653
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Modified models to use annotations instead of function calls for most
field validations. Created a few new validation annotations for use
within models.
Per review comments:
- renamed Key to VerifyKey
- enhanced VerifyKey to imply "@Valid", unless disabled
Issue-ID: POLICY-2648
Change-Id: I2b53f218b0a2ab1ed1f5e278816a3509f1408972
Signed-off-by: Jim Hahn <jrh3@att.com>
|