Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7
Issue-ID: POLICY-2914
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
|
|
ONAP DMaaP Message Router no longer supports server-side filtering.
Removed it from policy-endpoints.
Issue-ID: POLICY-2881
Change-Id: I08157f7699608af63992dec78a61c5f9c55037b9
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-1528
Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-2188
Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Addressed the following issues:
- unused imports
- unused method parameters
- use assertEquals, assertSame instead of assertTrue
- provide the parametrized type for this generic
Also fixed some checkstyle issues:
- removed blank lines between "import" groups
Issue-ID: POLICY-2650
Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-1996
Change-Id: Id8a3acf9406c6acada4c3ffee679f2baf819cded
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The default serialization provider for HttpClient and
HttpServletServer was Jackson. Modified to use GSON instead.
Issue-ID: POLICY-1526
Change-Id: Ic6282d119fa63d12470903a4f1eb4da3afd6efe7
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed additional sonar issues:
- infinit loop; while the issue is bogus, it was easy enough to
modify the code to satisfy sonar
- doesn't like "volatile"; again, the issue is bogus, but easy enough
to modify the code
Disabled a couple of sonars in NetworkUtil, as they are not actually
an issue.
Issue-ID: POLICY-2305
Change-Id: I5500183e3fe4060696994cff55bdae4ba7e138c7
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Addressed the following sonar issues:
- missing assertion in junit test case
- disable sonars about setAccessible() as it's required for jackson
emulation
- sleep in junit
- don't use wild-cards (e.g., "*") with java.util Pattern
- use re2j instead of java.util Pattern
- use String methods (e.g., startsWith())
- duplicate method bodies
- duplicate code in Coder classes
- string concatenation in logger calls
- UTF-8 encoding
- return primitive instead of boxed primitive
- add assertion to tests
- renamed support methods from doTestXxx to verifyXxx
- cognitive complexity
- use AtomicRef instead of volatile
- use specific Functionals (e.g., IntConsumer)
- function always returns the same value
- serializable vs transient
Issue-ID: POLICY-2305
Change-Id: I08eb7aa495a80bdc1d26827ba17a7946c83b9828
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Either log or rethrow
Use boolean expression
Add at least one test
Remove commented out code
Issue-ID: POLICY-2204
Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Extracted code from ControlLoopUtils to create a new class in
common, PropertyObjectUtils.
Fixed a deprecated method invocation in a junit.
Fixed an object casting (i.e., sonar) issue in SCO.
Issue-ID: POLICY-2305
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I331a47297f67097ea6986be125ef93cd1954b5ff
|
|
Per Jorge Hernandez, we don't want to fix this as
it falls under the selfSignedCert clause which is
used in testing and non-production environments.
Marking as //NOSONAR
Issue-ID: POLICY-2389
Signed-off-by: Chris Ramstad <cramstad@ciena.com>
Change-Id: Iaf47e19dc8450607b1dc3aa260370e9c0d7d491d
|
|
|
|
|
|
BidirectionalTopicClient use plain TopicSink instead of
TopicSinkClient, because the latter encodes its message, while
BidirectionalTopicClient should not, because encoding should
be left up to the user of the class.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I6c67e1ee0c56e96a0efcc90eaf1c0a940902e8b3
|
|
Issue-ID: POLICY-2349
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Iad10c3b6d77f859235c9e63f3fc0693bd9ba3c27
|
|
Using DefaultServlet to manage static resources
on Jetty Server.
Issue-ID: POLICY-2311
Signed-off-by: Hengye <yehui.wang@est.tech>
Change-Id: Ife0eda06334eb0b6350110254945975050181f20
|
|
Adding DefaultServlet to make embeded jetty not only
support Jersey, but also support static resources, like
html, css and js.
Issue-ID: POLICY-2311
Signed-off-by: Hengye <yehui.wang@est.tech>
Change-Id: I71309036627d75dcc56947b395688a4e2f22c0ce
|
|
variables"
|
|
This patch allows to store and get REST servers password and userName from
environment variables. This is needed if we want to send those
variables by helm secrets.
Issue-ID: OOM-2287
Change-Id: I4d6a8bf188a0d17e5444137d871dd341627ec397
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
|
|
Added review comments:
- check for too many topic sources
Issue-ID: POLICY-2363
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I89f34c4f756fb0c938dd7dda5896f3426cfc7ac2
|
|
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I61ef2fcfde5eb361652d2d6e3f55324af7ca7b4e
|
|
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I0123b98e89b734efd264dd62080bb23573a7a3e6
|
|
Removal of UTF-8 because its already set
capabilities doesn't generate any code, no need to include
override false positives for passwords etc.
override for logging and exception throw that we want
add synchronized to overrides that are synchronized
ignore checking of some conditions
adding synchronized to match set* methods
Issue-ID: POLICY-2321
Change-Id: I26d9ca22a0cdd67fdaae9c44b718b8dc103f190e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Add a common version of Jersey for all Policy Framework components.
Issue-ID: POLICY-2209
Change-Id: I8554a97e9f13887418118966bfe1043b65d9a179
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Issue-ID: POLICY-2204
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If55ea1a804997ab751f15813e6b643572d4f189f
|
|
Several of the Gson and Jackson handlers take a GsonBuilder, which
they then configure with additional adapters prior to create a Gson
object that they subsequently use. The code has been modified so
that the constructors no longer take a GsonBuilder, thus eliminating
the side-effects that they had on the builders. Instead, a
configBuilder() method has been added to the handler classes that
makes it clear tht they modify the GsonBuilder.
This also has the advantage that classes that want a Gson object
configured per a given handler need only call that handler's
configBuilder() method; previously, they had to constructor the
handler and then retrieve its gson object.
Also updated a few tests to specify the HTTP "Accept" header to ensure
that return results are in yaml format.
Change-Id: I2ef98198041ff9f73913d01ee6ee14ecf20ba617
Issue-ID: POLICY-2081
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Refactored StandardYamlCoder, extracting a new class, YamlJsonTranslator,
from it. This facilitates performing yaml translation when not using a
standard "gson" coder.
Added YamlJacksonHandler which supports YAML translation layered on
top of a JacksonHandler instead of a GsonMessageBodyHandler.
Also added junit tests to complete coverage of StandardCoder.
Also added public APPLICATION_YAML to YamlMessageBodyHandler.
Change-Id: Ia470fa194661fbf1aebeaf0f18b57f2a984cb64b
Issue-ID: POLICY-2081
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
With a newer version of jetty being used, a couple of methods have
been deprecated. Modified the code to use the facilities appropriate
to the new jetty version.
Change-Id: Idcaef11836841480c24b1721c06ed642d3d4394a
Issue-ID: POLICY-2100
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added classes and modified code to report bad-request when a servlet
attempts to read invalid YAML.
Change-Id: Iacddee92a448fb69d5c778a3c3f3f2b5528983f7
Issue-ID: POLICY-2085
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Created StandardYamlCoder which is like a StandardCoder, except that
the original converts to/from JSON, while the new class converts to/from
YAML. Also added YamlMessageBodyHandler and incorporated it into the
http server so that it supports a media type of */yaml.
Change-Id: Ibd83a9f6d355a330f63e435f2bb41affcf1947c2
Issue-ID: POLICY-2065
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified common RestServer to inject an exception handler
into the list of providers so that it returns 400 instead
of 500 for JSON parsing errors.
Change-Id: I7c77625e3531e26413d72cc386296a709946cda2
Issue-ID: POLICY-1725
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
A number of places in the code (common & drools-pdp) loop over
features, giving each provider a chance to act on something.
Created a common method in a new ApiUtils class to faciliate
it.
Renamed to FeatureApiUtils per review comment.
Change-Id: I0c2cf0f33854cb5b6921b394f64de498a6234909
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Removed ParameterUtils.
Also made RestServer.getServerProperties() protected so it can be
overridden.
Also fixed issue in TopicParameterGroupTest to prevent it from validating
static fields.
Change-Id: Icb4580f5802b9edca489a38896d61ad24aece449
Issue-ID: POLICY-1953
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
NOOP topic sources configured via TopicParameterGroup are left
unmanaged. Removed a new override method, as it did not pass
the "managed" flag down, while the method that already existed
in the superclass already works correctly.
Also restored "null" lists to TopicParameterGroup so-as not
to break the behavior of its validate() method.
Change-Id: Id392a3263c3bd1c8f278461715b441719817c47c
Issue-ID: POLICY-1953
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Changes to pass the updated parameters from BusTopicParams to
PolicyEndpoints.
Change-Id: I49d3b9d30a2a4c6b2337d0ab76a61583eb9ef04a
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
New services are typically configured using TopicParameters. These
are converted into Properties before being passed to
TopicEndpoint.addTopic(), which then converts them into BusTopicParams
before configuring a given topic. Added
TopicEndpoint.addTopic(List<TopicParams>), which makes it possible
to configure the topics without going into the intermediate Properties.
Furthermore, because TopicParams is a subclass of BusTopicParams, no
conversion is needed for that either, so the TopicParams can be passed
directly into the configuration classes.
Incorporated changes from review.
Change-Id: Id87e2c6812e36ae1a3ac680e6b35208667971782
Issue-ID: POLICY-1953
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Modified TopicParams to set "managed" to true by default.
Change-Id: Ia21caba2b882199f1a63d40b0fed1167ccb93142
Issue-ID: POLICY-1744
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Changes to support parameters which would be critical to run in a
secure environment.
Change-Id: Ia7df174261041b35e57b9f1f2be7552e5dcd2cec
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
Copied and renamed the class to RestServer. Also modified it to
derive from ServiceManagerContainer.
Added getName() method to HttpServletServer, which facilitated
the refactoring.
Renamed "controllers" to "providers".
Change-Id: I905166e41063e3fe84e356fd6c4a91ca9d4cb8a6
Issue-ID: POLICY-1652
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Sonar fixes, other than code coverage. These changes are disruptive
and will likely cause breakage in a number of policy repos.
Renamed constants.
Moved constants/factories from interfaces to classes.
Change-Id: I182d50320aa6b53e383081af806c60dd2f806cbe
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Renamed a constant.
Change-Id: I5e1f2fb6de8445a8f667ea48a595773173c6beae
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
review comment
Making the method to update topic properties object more generic so that
it can be used by other components such as drools if needed.
Change-Id: I29c0f8fde5f4e1dd464072a9b06f2d93cc15b137
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
|
|
Refactored various classes to reduce cyclomatic complexity.
Introduced some endpoint utility classes to facilitate extraction
and conversion of property values, and populating of common
"builder" values.
Change-Id: Ie1c91cd94cb54700dc9127f72780b4d94b82ec39
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
1) Adding Topic parameters and REST parameters into policy-endpoints module as these
are used by other modules such as PAP, APEX and XACML PDPs.
2) ParameterUtils class is also added which can contain related utility methods
Change-Id: I5421fbf2234259305e3626ec0859aee0f36ed9b1
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
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: Iea0995d1167f4837607f194d35f0193eeedeacd7
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Note: A number of these were identified, by SonarLint, in the Test
classes, which are not typically scanned by Sonar.
Removed unnecessary imports.
Removed unneeded "throws Xxx".
Replaced lambda with method references.
Replaced duplicate strings with constants.
Replaced try-fail-catch with assert-j methods to eliminate sonar
complaints about duplicate failure messages.
Added missing @Override annotations.
Use map.computeIfAbsent() where appropriate.
Also fixed some minor checkstyle issues.
Removed unneeded "volatile" declarations.
Replaced some if-else constructs with "?:" construct, per sonar.
Replaced Object.wait() with CountDownLatch.await(); according to sonar
(and javadocs), Object.wait() can return due to "spurious wakeups".
Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse.
Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|