aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java8
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java3
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java5
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java2
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java4
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java40
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/Main.java3
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java8
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java8
-rw-r--r--policy-management/src/main/resources/openapi/openapi.yaml226
-rw-r--r--policy-management/src/main/resources/swagger/swagger.json276
-rw-r--r--policy-management/src/main/server-gen/bin/add-secured-participant2
-rw-r--r--policy-management/src/main/server-gen/bin/create-api-key2
-rw-r--r--policy-management/src/main/server-gen/bin/create-secured-topic2
-rw-r--r--policy-management/src/main/server-gen/bin/features2
-rw-r--r--policy-management/src/main/server-gen/bin/pdpd-configuration7
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java232
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java5
18 files changed, 180 insertions, 655 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
index 1965e22f..7f28f9bb 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/IndexedDroolsControllerFactory.java
@@ -258,13 +258,7 @@ class IndexedDroolsControllerFactory implements DroolsControllerFactory {
private String getPropertyTopicPrefix(Topic topic) {
boolean isSource = topic instanceof TopicSource;
var commInfra = topic.getTopicCommInfrastructure();
- if (commInfra == CommInfrastructure.UEB) {
- if (isSource) {
- return PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + ".";
- } else {
- return PolicyEndPointProperties.PROPERTY_UEB_SINK_TOPICS + ".";
- }
- } else if (commInfra == CommInfrastructure.NOOP) {
+ if (commInfra == CommInfrastructure.NOOP) {
if (isSource) {
return PolicyEndPointProperties.PROPERTY_NOOP_SOURCE_TOPICS + ".";
} else {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java
index 87001ad6..8edf394e 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/features/PolicyEngineFeatureApi.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -232,7 +233,7 @@ public interface PolicyEngineFeatureApi extends OrderedService {
}
/**
- * Intercept an event from UEB/DMaaP before the PolicyEngine processes it.
+ * Intercept an event from Bus before the PolicyEngine processes it.
*
* @return True if this feature intercepts and takes ownership of the operation
* preventing the invocation of lower priority features. False, otherwise.
diff --git a/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java b/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
index d35f5469..9fb76d87 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/persistence/FileSystemPersistence.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -152,13 +153,13 @@ public class FileSystemPersistence implements SystemPersistence {
protected Properties getProperties(Path propertiesPath) {
if (!Files.exists(propertiesPath)) {
- throw new IllegalArgumentException("properties for " + propertiesPath.toString() + " are not persisted.");
+ throw new IllegalArgumentException("properties for " + propertiesPath + " are not persisted.");
}
try {
return PropertyUtil.getProperties(propertiesPath.toFile());
} catch (final Exception e) {
- throw new IllegalArgumentException("can't read properties for " + propertiesPath.toString(), e);
+ throw new IllegalArgumentException("can't read properties for " + propertiesPath, e);
}
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java b/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
index ba6c5e71..dba6d4c1 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/persistence/SystemPersistenceConstants.java
@@ -32,7 +32,7 @@ public final class SystemPersistenceConstants {
public static final String DEFAULT_CONFIGURATION_DIR = "config";
/**
- * Persistence Manager. For now it is a file-based properties management, In the future, it will
+ * Persistence Manager. For now, it is a file-based properties management, In the future, it will
* probably be DB based, so manager implementation will change.
*/
@Getter
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
index 1201c26e..f008407c 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
@@ -242,7 +242,7 @@ public class PdpdConfiguration {
} else {
throw new IllegalArgumentException(
"property \"requestID\" is of type \"java.lang.String\", but got "
- + value.getClass().toString());
+ + value.getClass());
}
}
@@ -257,7 +257,7 @@ public class PdpdConfiguration {
} else {
throw new IllegalArgumentException(
"property \"entity\" is of type \"java.lang.String\", but got "
- + value.getClass().toString());
+ + value.getClass());
}
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
index ec06882f..48cd8140 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java
@@ -1392,7 +1392,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}")
+ @Path("engine/topics/sources/{comm: kafka|noop}")
public Response commSources(
@PathParam("comm") String comm) {
if (!checkValidNameInput(comm)) {
@@ -1405,9 +1405,6 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
List<TopicSource> sources = new ArrayList<>();
var status = Status.OK;
switch (CommInfrastructure.valueOf(comm.toUpperCase())) {
- case UEB:
- sources.addAll(TopicEndpointManager.getManager().getUebTopicSources());
- break;
case NOOP:
sources.addAll(TopicEndpointManager.getManager().getNoopTopicSources());
break;
@@ -1427,7 +1424,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}")
+ @Path("engine/topics/sinks/{comm: kafka|noop}")
public Response commSinks(
@PathParam("comm") String comm) {
if (!checkValidNameInput(comm)) {
@@ -1440,9 +1437,6 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
List<TopicSink> sinks = new ArrayList<>();
var status = Status.OK;
switch (CommInfrastructure.valueOf(comm.toUpperCase())) {
- case UEB:
- sinks.addAll(TopicEndpointManager.getManager().getUebTopicSinks());
- break;
case NOOP:
sinks.addAll(TopicEndpointManager.getManager().getNoopTopicSinks());
break;
@@ -1462,7 +1456,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}")
public Response sourceTopic(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1478,7 +1472,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}")
public Response sinkTopic(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1494,7 +1488,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/events")
public Response sourceEvents(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1510,7 +1504,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/events")
public Response sinkEvents(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1526,7 +1520,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches")
public Response commSourceTopicSwitches(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1538,7 +1532,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@GET
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches")
public Response commSinkTopicSwitches(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1550,7 +1544,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSourceTopicLock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1564,7 +1558,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSourceTopicUnlock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1578,7 +1572,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSourceTopicActivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1592,7 +1586,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSourceTopicDeactivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1606,7 +1600,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSinkTopicLock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1620,7 +1614,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/lock")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/lock")
public Response commSinkTopicUnlock(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1634,7 +1628,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSinkTopicActivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1648,7 +1642,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@DELETE
- @Path("engine/topics/sinks/{comm: ueb|kafka|noop}/{topic}/switches/activation")
+ @Path("engine/topics/sinks/{comm: kafka|noop}/{topic}/switches/activation")
public Response commSinkTopicDeactivation(
@PathParam("comm") String comm,
@PathParam("topic") String topic) {
@@ -1676,7 +1670,7 @@ public class RestManager implements SwaggerApi, DefaultApi, FeaturesApi, InputsA
*/
@Override
@PUT
- @Path("engine/topics/sources/{comm: ueb|kafka|noop}/{topic}/events")
+ @Path("engine/topics/sources/{comm: kafka|noop}/{topic}/events")
@Consumes(MediaType.TEXT_PLAIN)
public Response commEventOffer(
@PathParam("comm") String comm,
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
index 3d167352..f0530d05 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,7 +125,7 @@ public class Main {
try {
engineProperties = SystemPersistenceConstants.getManager().getEngineProperties();
} catch (IllegalArgumentException iae) {
- logger.warn("Main: engine properties not found. Using default configuration.", iae);
+ logger.warn("Main: engine properties not found. Using default configuration. {}", iae.getMessage());
engineProperties = PolicyEngineConstants.getManager().defaultTelemetryConfig();
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
index 75e7c74a..3fc2e292 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2022 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,13 +42,10 @@ import org.onap.policy.drools.stats.PolicyStatsManager;
/**
* Policy Engine, the top abstraction for the Drools PDP Policy Engine. It abstracts away a Drools
- * PDP Engine from management purposes. This is the best place to looking at the code from a top
- * down approach. Other managed entities can be obtained from the PolicyEngine, hierarchically. <br>
+ * PDP Engine from management purposes. This is the best place to looking at the code from a top-down
+ * approach. Other managed entities can be obtained from the PolicyEngine, hierarchically. <br>
* PolicyEngine 1 --- * PolicyController 1 --- 1 DroolsController 1 --- 1 PolicyContainer 1 --- *
* PolicySession <br> PolicyEngine 1 --- 1 TopicEndpointManager 1 -- * TopicReader 1 --- 1
- * UebTopicReader <br> PolicyEngine 1 --- 1 TopicEndpointManager 1 -- * TopicReader 1 --- 1
- * DmaapTopicReader <br> PolicyEngine 1 --- 1 TopicEndpointManager 1 -- * TopicWriter 1 --- 1
- * DmaapTopicWriter <br> PolicyEngine 1 --- 1 TopicEndpointManager 1 -- * TopicReader 1 --- 1
* RestTopicReader <br> PolicyEngine 1 --- 1 TopicEndpointManager 1 -- * TopicWriter 1 --- 1
* RestTopicWriter <br> PolicyEngine 1 --- 1 ManagementServer
*/
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
index 06b3f4ea..2c85c26e 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -140,9 +140,9 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
this.name = name;
/*
- * 1. Register read topics with network infrastructure (ueb, dmaap, rest) 2. Register write
- * topics with network infrastructure (ueb, dmaap, rest) 3. Register with drools
- * infrastructure
+ * 1. Register read topics with network infrastructure
+ * 2. Register write topics with network infrastructure
+ * 3. Register with drools infrastructure
*/
// Create/Reuse Readers/Writers for all event sources endpoints
diff --git a/policy-management/src/main/resources/openapi/openapi.yaml b/policy-management/src/main/resources/openapi/openapi.yaml
index 80a3ae63..da1b17d9 100644
--- a/policy-management/src/main/resources/openapi/openapi.yaml
+++ b/policy-management/src/main/resources/openapi/openapi.yaml
@@ -2238,7 +2238,7 @@ paths:
tags:
- pdp-d-telemetry
summary: Retrieves the managed topic sources
- description: Network Topic Sources Agregation
+ description: Network Topic Sources Aggregation
operationId: sources
responses:
200:
@@ -2255,7 +2255,7 @@ paths:
tags:
- pdp-d-telemetry
summary: Retrieves the managed topic sinks
- description: Network Topic Sinks Agregation
+ description: Network Topic Sinks Aggregation
operationId: sinks
responses:
200:
@@ -2338,7 +2338,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
responses:
200:
@@ -2363,7 +2363,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
responses:
200:
@@ -2389,7 +2389,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2412,7 +2412,7 @@ paths:
tags:
- pdp-d-telemetry
summary: Retrieves a managed topic sink
- description: This is a Network Communicaton Endpoint destination of messages
+ description: This is a Network Communication Endpoint destination of messages
from the Engine
operationId: sinkTopic
parameters:
@@ -2421,7 +2421,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2443,8 +2443,8 @@ paths:
get:
tags:
- pdp-d-telemetry
- summary: Retrieves the latest events received by an UEB topic
- description: This is a Network Communicaton Endpoint source of messages for
+ summary: Retrieves the latest events received by a topic
+ description: This is a Network Communication Endpoint source of messages for
the Engine
operationId: sourceEvents
parameters:
@@ -2453,7 +2453,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2483,7 +2483,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2523,8 +2523,8 @@ paths:
get:
tags:
- pdp-d-telemetry
- summary: Retrieves the latest events received by an UEB topic
- description: This is a Network Communicaton Endpoint source of messages for
+ summary: Retrieves the latest events received by a topic
+ description: This is a Network Communication Endpoint source of messages for
the Engine
operationId: sinkEvents
parameters:
@@ -2533,7 +2533,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2563,7 +2563,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2596,7 +2596,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2631,7 +2631,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2662,7 +2662,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2692,7 +2692,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2725,7 +2725,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2759,7 +2759,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2792,7 +2792,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2826,7 +2826,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2859,7 +2859,7 @@ paths:
description: Communication Mechanism
required: true
schema:
- pattern: ueb|dmaap|noop
+ pattern: kafka|noop
type: string
- name: topic
in: path
@@ -2886,7 +2886,7 @@ paths:
tags:
- pdp-d-legacy
summary: Legacy Engine Configuration Properties
- description: Used for booststrapping the engine
+ description: Used for bootstrapping the engine
operationId: properties
responses:
200:
@@ -2935,8 +2935,6 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
@@ -3008,8 +3006,6 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
@@ -3822,80 +3818,6 @@ components:
$ref: '#/components/schemas/CoderFilters'
customCoder:
$ref: '#/components/schemas/CustomCoder'
- DmaapTopicSink:
- type: object
- properties:
- partitionKey:
- type: string
- apiKey:
- type: string
- apiSecret:
- type: string
- effectiveTopic:
- type: string
- recentEvents:
- type: array
- items:
- type: string
- topic:
- type: string
- servers:
- type: array
- items:
- type: string
- topicCommInfrastructure:
- type: string
- enum:
- - UEB
- - DMAAP
- - KAFKA
- - NOOP
- - REST
- alive:
- type: boolean
- locked:
- type: boolean
- DmaapTopicSource:
- type: object
- properties:
- consumerInstance:
- type: string
- consumerGroup:
- type: string
- fetchTimeout:
- type: integer
- format: int32
- fetchLimit:
- type: integer
- format: int32
- apiKey:
- type: string
- apiSecret:
- type: string
- effectiveTopic:
- type: string
- recentEvents:
- type: array
- items:
- type: string
- topic:
- type: string
- servers:
- type: array
- items:
- type: string
- topicCommInfrastructure:
- type: string
- enum:
- - UEB
- - DMAAP
- - KAFKA
- - NOOP
- - REST
- alive:
- type: boolean
- locked:
- type: boolean
KafkaTopicSink:
type: object
properties:
@@ -3920,8 +3842,6 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
@@ -3961,8 +3881,6 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
@@ -3992,8 +3910,6 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
@@ -4019,26 +3935,12 @@ components:
topicCommInfrastructure:
type: string
enum:
- - UEB
- - DMAAP
- KAFKA
- NOOP
- REST
TopicEndpoint:
type: object
properties:
- uebTopicSources:
- type: array
- items:
- $ref: '#/components/schemas/UebTopicSource'
- uebTopicSinks:
- type: array
- items:
- $ref: '#/components/schemas/UebTopicSink'
- dmaapTopicSinks:
- type: array
- items:
- $ref: '#/components/schemas/DmaapTopicSink'
kafkaTopicSinks:
type: array
items:
@@ -4047,10 +3949,6 @@ components:
type: array
items:
$ref: '#/components/schemas/NoopTopicSink'
- dmaapTopicSources:
- type: array
- items:
- $ref: '#/components/schemas/DmaapTopicSource'
kafkaTopicSources:
type: array
items:
@@ -4071,80 +3969,6 @@ components:
type: boolean
locked:
type: boolean
- UebTopicSink:
- type: object
- properties:
- partitionKey:
- type: string
- apiKey:
- type: string
- apiSecret:
- type: string
- effectiveTopic:
- type: string
- recentEvents:
- type: array
- items:
- type: string
- topic:
- type: string
- servers:
- type: array
- items:
- type: string
- topicCommInfrastructure:
- type: string
- enum:
- - UEB
- - DMAAP
- - KAFKA
- - NOOP
- - REST
- alive:
- type: boolean
- locked:
- type: boolean
- UebTopicSource:
- type: object
- properties:
- consumerInstance:
- type: string
- consumerGroup:
- type: string
- fetchTimeout:
- type: integer
- format: int32
- fetchLimit:
- type: integer
- format: int32
- apiKey:
- type: string
- apiSecret:
- type: string
- effectiveTopic:
- type: string
- recentEvents:
- type: array
- items:
- type: string
- topic:
- type: string
- servers:
- type: array
- items:
- type: string
- topicCommInfrastructure:
- type: string
- enum:
- - UEB
- - DMAAP
- - KAFKA
- - NOOP
- - REST
- alive:
- type: boolean
- locked:
- type: boolean
PdpdConfiguration:
type: object
properties:
diff --git a/policy-management/src/main/resources/swagger/swagger.json b/policy-management/src/main/resources/swagger/swagger.json
index 9fb709b9..b3433208 100644
--- a/policy-management/src/main/resources/swagger/swagger.json
+++ b/policy-management/src/main/resources/swagger/swagger.json
@@ -3187,7 +3187,7 @@
"get" : {
"tags" : [ "pdp-d-telemetry" ],
"summary" : "Retrieves the managed topic sources",
- "description" : "Network Topic Sources Agregation",
+ "description" : "Network Topic Sources Aggregation",
"operationId" : "sources",
"responses" : {
"200" : {
@@ -3212,7 +3212,7 @@
"get" : {
"tags" : [ "pdp-d-telemetry" ],
"summary" : "Retrieves the managed topic sinks",
- "description" : "Network Topic Sinks Agregation",
+ "description" : "Network Topic Sinks Aggregation",
"operationId" : "sinks",
"responses" : {
"200" : {
@@ -3328,7 +3328,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
} ],
@@ -3365,7 +3365,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
} ],
@@ -3402,7 +3402,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3439,7 +3439,7 @@
"get" : {
"tags" : [ "pdp-d-telemetry" ],
"summary" : "Retrieves a managed topic sink",
- "description" : "This is a Network Communicaton Endpoint destination of messages from the Engine",
+ "description" : "This is a Network Communication Endpoint destination of messages from the Engine",
"operationId" : "sinkTopic",
"parameters" : [ {
"name" : "comm",
@@ -3449,7 +3449,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3485,8 +3485,8 @@
"/topics/sources/{comm}/{topic}/events" : {
"get" : {
"tags" : [ "pdp-d-telemetry" ],
- "summary" : "Retrieves the latest events received by an UEB topic",
- "description" : "This is a Network Communicaton Endpoint source of messages for the Engine",
+ "summary" : "Retrieves the latest events received by a topic",
+ "description" : "This is a Network Communication Endpoint source of messages for the Engine",
"operationId" : "sourceEvents",
"parameters" : [ {
"name" : "comm",
@@ -3496,7 +3496,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3541,7 +3541,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3601,8 +3601,8 @@
"/topics/sinks/{comm}/{topic}/events" : {
"get" : {
"tags" : [ "pdp-d-telemetry" ],
- "summary" : "Retrieves the latest events received by an UEB topic",
- "description" : "This is a Network Communicaton Endpoint source of messages for the Engine",
+ "summary" : "Retrieves the latest events received by a topic",
+ "description" : "This is a Network Communication Endpoint source of messages for the Engine",
"operationId" : "sinkEvents",
"parameters" : [ {
"name" : "comm",
@@ -3612,7 +3612,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3658,7 +3658,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3706,7 +3706,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3757,7 +3757,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3804,7 +3804,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3850,7 +3850,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3898,7 +3898,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3948,7 +3948,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -3996,7 +3996,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -4046,7 +4046,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -4094,7 +4094,7 @@
"style" : "simple",
"explode" : false,
"schema" : {
- "pattern" : "ueb|dmaap|noop",
+ "pattern" : "kafka|noop",
"type" : "string"
}
}, {
@@ -4135,7 +4135,7 @@
"get" : {
"tags" : [ "pdp-d-legacy" ],
"summary" : "Legacy Engine Configuration Properties",
- "description" : "Used for booststrapping the engine",
+ "description" : "Used for bootstrapping the engine",
"operationId" : "properties",
"responses" : {
"200" : {
@@ -4207,7 +4207,7 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
},
"alive" : {
"type" : "boolean"
@@ -4299,7 +4299,7 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
},
"alive" : {
"type" : "boolean"
@@ -5486,101 +5486,6 @@
}
}
},
- "DmaapTopicSink" : {
- "type" : "object",
- "properties" : {
- "partitionKey" : {
- "type" : "string"
- },
- "apiKey" : {
- "type" : "string"
- },
- "apiSecret" : {
- "type" : "string"
- },
- "effectiveTopic" : {
- "type" : "string"
- },
- "recentEvents" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topic" : {
- "type" : "string"
- },
- "servers" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topicCommInfrastructure" : {
- "type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
- },
- "alive" : {
- "type" : "boolean"
- },
- "locked" : {
- "type" : "boolean"
- }
- }
- },
- "DmaapTopicSource" : {
- "type" : "object",
- "properties" : {
- "consumerInstance" : {
- "type" : "string"
- },
- "consumerGroup" : {
- "type" : "string"
- },
- "fetchTimeout" : {
- "type" : "integer",
- "format" : "int32"
- },
- "fetchLimit" : {
- "type" : "integer",
- "format" : "int32"
- },
- "apiKey" : {
- "type" : "string"
- },
- "apiSecret" : {
- "type" : "string"
- },
- "effectiveTopic" : {
- "type" : "string"
- },
- "recentEvents" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topic" : {
- "type" : "string"
- },
- "servers" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topicCommInfrastructure" : {
- "type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
- },
- "alive" : {
- "type" : "boolean"
- },
- "locked" : {
- "type" : "boolean"
- }
- }
- },
"KafkaTopicSink" : {
"type" : "object",
"properties" : {
@@ -5613,7 +5518,7 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
},
"alive" : {
"type" : "boolean"
@@ -5666,7 +5571,7 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
},
"alive" : {
"type" : "boolean"
@@ -5705,7 +5610,7 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
}
}
},
@@ -5738,31 +5643,13 @@
},
"topicCommInfrastructure" : {
"type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
+ "enum" : [ "KAFKA", "NOOP", "REST" ]
}
}
},
"TopicEndpoint" : {
"type" : "object",
"properties" : {
- "uebTopicSources" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/UebTopicSource"
- }
- },
- "uebTopicSinks" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/UebTopicSink"
- }
- },
- "dmaapTopicSinks" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/DmaapTopicSink"
- }
- },
"kafkaTopicSinks" : {
"type" : "array",
"items" : {
@@ -5775,12 +5662,6 @@
"$ref" : "#/components/schemas/NoopTopicSink"
}
},
- "dmaapTopicSources" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/DmaapTopicSource"
- }
- },
"kafkaTopicSources" : {
"type" : "array",
"items" : {
@@ -5813,101 +5694,6 @@
}
}
},
- "UebTopicSink" : {
- "type" : "object",
- "properties" : {
- "partitionKey" : {
- "type" : "string"
- },
- "apiKey" : {
- "type" : "string"
- },
- "apiSecret" : {
- "type" : "string"
- },
- "effectiveTopic" : {
- "type" : "string"
- },
- "recentEvents" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topic" : {
- "type" : "string"
- },
- "servers" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topicCommInfrastructure" : {
- "type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
- },
- "alive" : {
- "type" : "boolean"
- },
- "locked" : {
- "type" : "boolean"
- }
- }
- },
- "UebTopicSource" : {
- "type" : "object",
- "properties" : {
- "consumerInstance" : {
- "type" : "string"
- },
- "consumerGroup" : {
- "type" : "string"
- },
- "fetchTimeout" : {
- "type" : "integer",
- "format" : "int32"
- },
- "fetchLimit" : {
- "type" : "integer",
- "format" : "int32"
- },
- "apiKey" : {
- "type" : "string"
- },
- "apiSecret" : {
- "type" : "string"
- },
- "effectiveTopic" : {
- "type" : "string"
- },
- "recentEvents" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topic" : {
- "type" : "string"
- },
- "servers" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "topicCommInfrastructure" : {
- "type" : "string",
- "enum" : [ "UEB", "DMAAP", "KAFKA", "NOOP", "REST" ]
- },
- "alive" : {
- "type" : "boolean"
- },
- "locked" : {
- "type" : "boolean"
- }
- }
- },
"PdpdConfiguration" : {
"type" : "object",
"properties" : {
diff --git a/policy-management/src/main/server-gen/bin/add-secured-participant b/policy-management/src/main/server-gen/bin/add-secured-participant
index 3ddc120f..579f4d47 100644
--- a/policy-management/src/main/server-gen/bin/add-secured-participant
+++ b/policy-management/src/main/server-gen/bin/add-secured-participant
@@ -73,7 +73,7 @@ until [ -z "$1" ]; do
done
if [ -z "${BUS_HOST}" ]; then
- echo "An UEB/KAFKA server must be provided."
+ echo "A KAFKA server must be provided."
echo
usage
exit 1
diff --git a/policy-management/src/main/server-gen/bin/create-api-key b/policy-management/src/main/server-gen/bin/create-api-key
index e57c1e92..6d320729 100644
--- a/policy-management/src/main/server-gen/bin/create-api-key
+++ b/policy-management/src/main/server-gen/bin/create-api-key
@@ -53,7 +53,7 @@ until [ -z "$1" ]; do
done
if [ -z "${BUS_HOST}" ]; then
- echo "An UEB/KAFKA server must be provided."
+ echo "A KAFKA server must be provided."
echo
usage
exit 1
diff --git a/policy-management/src/main/server-gen/bin/create-secured-topic b/policy-management/src/main/server-gen/bin/create-secured-topic
index 2aed99ae..f5c640f2 100644
--- a/policy-management/src/main/server-gen/bin/create-secured-topic
+++ b/policy-management/src/main/server-gen/bin/create-secured-topic
@@ -72,7 +72,7 @@ until [ -z "$1" ]; do
done
if [ -z "${BUS_HOST}" ]; then
- echo "An UEB/KAFKA server must be provided."
+ echo "A KAFKA server must be provided."
echo
usage
exit 1
diff --git a/policy-management/src/main/server-gen/bin/features b/policy-management/src/main/server-gen/bin/features
index 93f58239..3343ffc4 100644
--- a/policy-management/src/main/server-gen/bin/features
+++ b/policy-management/src/main/server-gen/bin/features
@@ -773,7 +773,7 @@ function disableFeatureDeps()
rm -f "${LIB}"/"${depJarName}"
# case there were multiple features using this library
- # re-enable link fron an enabled feature
+ # re-enable link from an enabled feature
for aDepsEnabledMap in ${xDepsEnabledMap}; do
if [ $(basename "${aDepsEnabledMap}") = ${depJarName} ]; then
ln -s -f "${aDepsEnabledMap}" "${LIB}/"
diff --git a/policy-management/src/main/server-gen/bin/pdpd-configuration b/policy-management/src/main/server-gen/bin/pdpd-configuration
index 5182f3ad..0be7cef3 100644
--- a/policy-management/src/main/server-gen/bin/pdpd-configuration
+++ b/policy-management/src/main/server-gen/bin/pdpd-configuration
@@ -38,9 +38,10 @@ function usage() {
echo ""
}
-BUS_PORT=9092
+BUS_PORT=29092
+BUS_HOST=kafka
REQUEST_ID="7f5474ca-16a9-42ac-abc0-d86f62296fbc"
-TOPIC="PDPD-CONFIGURATION"
+TOPIC="pdpd-configuration"
# command line options parsing
until [ -z "$1" ]; do
@@ -88,7 +89,7 @@ until [ -z "$1" ]; do
done
if [ -z "${BUS_HOST}" ]; then
- echo "An UEB/KAFKA server must be provided."
+ echo "A KAFKA server must be provided."
echo
usage
exit 1
diff --git a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
index 65447d80..6a17f269 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
@@ -69,26 +69,18 @@ public class RestManagerTest {
private static final String TELEMETRY_USER = "x";
private static final String TELEMETRY_PASSWORD = "y";
private static final String FOO_CONTROLLER = "foo";
-
- private static final String UEB_TOPIC = "ueb-topic-test";
private static final String KAFKA_TOPIC = "kafka-topic-test";
private static final String NOOP_TOPIC = "noop_topic";
-
- private static final String UEB_SOURCE_SERVER_PROPERTY = PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + "."
- + UEB_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
- private static final String UEB_SINK_SERVER_PROPERTY = PolicyEndPointProperties.PROPERTY_UEB_SINK_TOPICS + "."
- + UEB_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
private static final String KAFKA_SOURCE_SERVER_PROPERTY = PolicyEndPointProperties.PROPERTY_KAFKA_SOURCE_TOPICS
- + "." + KAFKA_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
+ + "." + KAFKA_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
private static final String KAFKA_SINK_SERVER_PROPERTY = PolicyEndPointProperties.PROPERTY_KAFKA_SINK_TOPICS + "."
- + KAFKA_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
- private static final String UEB_SERVER = "localhost";
+ + KAFKA_TOPIC + PolicyEndPointProperties.PROPERTY_TOPIC_SERVERS_SUFFIX;
private static final String KAFKA_SERVER = "localhost:9092";
private static final String FOO_CONTROLLER_FILE = FOO_CONTROLLER + "-controller.properties";
private static final String FOO_CONTROLLER_FILE_BAK = FOO_CONTROLLER_FILE + ".bak";
private static final String PDP_CONFIGURATION_JSON =
- "src/test/resources/org/onap/policy/drools/server/restful/PdpConfiguration.json";
+ "src/test/resources/org/onap/policy/drools/server/restful/PdpConfiguration.json";
private static CloseableHttpClient client;
@@ -108,28 +100,24 @@ public class RestManagerTest {
/* override default port */
final Properties engineProps = PolicyEngineConstants.getManager().defaultTelemetryConfig();
engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
- + PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
- + PolicyEndPointProperties.PROPERTY_HTTP_PORT_SUFFIX, "" + DEFAULT_TELEMETRY_PORT);
+ + PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ + PolicyEndPointProperties.PROPERTY_HTTP_PORT_SUFFIX, "" + DEFAULT_TELEMETRY_PORT);
engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+ PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ PolicyEndPointProperties.PROPERTY_HTTP_AUTH_USERNAME_SUFFIX,
- TELEMETRY_USER);
+ TELEMETRY_USER);
engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+ PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ PolicyEndPointProperties.PROPERTY_HTTP_AUTH_PASSWORD_SUFFIX,
- TELEMETRY_PASSWORD);
+ TELEMETRY_PASSWORD);
engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+ PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ PolicyEndPointProperties.PROPERTY_HTTP_SERIALIZATION_PROVIDER,
- String.join(",", JacksonHandler.class.getName(), YamlJacksonHandler.class.getName()));
+ String.join(",", JacksonHandler.class.getName(), YamlJacksonHandler.class.getName()));
/* other properties */
- engineProps.put(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS, UEB_TOPIC);
- engineProps.put(PolicyEndPointProperties.PROPERTY_UEB_SINK_TOPICS, UEB_TOPIC);
engineProps.put(PolicyEndPointProperties.PROPERTY_KAFKA_SOURCE_TOPICS, KAFKA_TOPIC);
engineProps.put(PolicyEndPointProperties.PROPERTY_KAFKA_SINK_TOPICS, KAFKA_TOPIC);
- engineProps.put(UEB_SOURCE_SERVER_PROPERTY, UEB_SERVER);
- engineProps.put(UEB_SINK_SERVER_PROPERTY, UEB_SERVER);
engineProps.put(KAFKA_SOURCE_SERVER_PROPERTY, KAFKA_SERVER);
engineProps.put(KAFKA_SINK_SERVER_PROPERTY, KAFKA_SERVER);
@@ -197,41 +185,30 @@ public class RestManagerTest {
}
private void putDeleteTopicSwitches() throws IOException {
- putDeleteSwitch("/engine/topics/sources/ueb/", UEB_TOPIC, "lock");
putDeleteSwitch("/engine/topics/sources/kafka/", KAFKA_TOPIC, "lock");
putDeleteSwitch("/engine/topics/sources/noop/", NOOP_TOPIC, "lock");
- putDeleteSwitch("/engine/topics/sinks/ueb/", UEB_TOPIC, "lock");
putDeleteSwitch("/engine/topics/sinks/kafka/", KAFKA_TOPIC, "lock");
putDeleteSwitch("/engine/topics/sinks/noop/", NOOP_TOPIC, "lock");
- putDeleteSwitch("/engine/topics/sources/ueb/", UEB_TOPIC, "activation");
putDeleteSwitch("/engine/topics/sources/kafka/", KAFKA_TOPIC, "activation");
putDeleteSwitch("/engine/topics/sources/noop/", NOOP_TOPIC, "activation");
- putDeleteSwitch("/engine/topics/sinks/ueb/", UEB_TOPIC, "activation");
putDeleteSwitch("/engine/topics/sinks/kafka/", KAFKA_TOPIC, "activation");
putDeleteSwitch("/engine/topics/sinks/noop/", NOOP_TOPIC, "activation");
- putSwitch("/engine/topics/sources/ueb/", UEB_TOPIC, "activation");
putSwitch("/engine/topics/sources/kafka/", KAFKA_TOPIC, "activation");
putSwitch("/engine/topics/sources/noop/", NOOP_TOPIC, "activation");
- putSwitch("/engine/topics/sinks/ueb/", UEB_TOPIC, "activation");
putSwitch("/engine/topics/sinks/kafka/", KAFKA_TOPIC, "activation");
putSwitch("/engine/topics/sinks/noop/", NOOP_TOPIC, "activation");
}
private void putDeleteTopicsSources() throws IOException {
- putTest(HOST_URL + "/engine/topics/sources/ueb/" + UEB_TOPIC + "/events", 200,
- "{x:y}", ContentType.TEXT_PLAIN);
putTest(HOST_URL + "/engine/topics/sources/noop/" + NOOP_TOPIC + "/events", 200,
"{x:y}", ContentType.TEXT_PLAIN);
putTest(HOST_URL + "/engine/topics/sources/kafka/" + KAFKA_TOPIC + "/events", 200,
"FOOOO", ContentType.TEXT_PLAIN);
- putTest(HOST_URL + "/engine/topics/sources/ueb/fiznits/events", 406, "FOOOO", ContentType.TEXT_PLAIN);
putTest(HOST_URL + "/engine/topics/sources/kafka/fiznits/events", 406,
"FOOOO", ContentType.TEXT_PLAIN);
putTest(HOST_URL + "/engine/topics/switches/lock", 200);
- putTest(HOST_URL + "/engine/topics/sources/ueb/" + UEB_TOPIC + "/events",
- 406, "FOOOO", ContentType.TEXT_PLAIN);
putTest(HOST_URL + "/engine/topics/sources/kafka/" + KAFKA_TOPIC + "/events",
406, "FOOOO", ContentType.TEXT_PLAIN);
deleteTest(HOST_URL + "/engine/topics/switches/lock", 200);
@@ -246,10 +223,10 @@ public class RestManagerTest {
deleteTest(HOST_URL + "/engine/controllers/" + FOO_CONTROLLER, 200);
}
- private void postTest(String uri, int statusCode, String payload, ContentType contentType) throws IOException {
+ private void postTest(String uri, int statusCode, String payload) throws IOException {
HttpPost post = new HttpPost(uri);
- if (contentType != null) {
- post.setEntity(new StringEntity(payload, contentType));
+ if (ContentType.APPLICATION_JSON != null) {
+ post.setEntity(new StringEntity(payload, ContentType.APPLICATION_JSON));
}
requestTest(post, statusCode);
}
@@ -293,28 +270,19 @@ public class RestManagerTest {
@Test
void testPost() throws IOException {
postTest(HOST_URL + "/engine/inputs/configuration", 406,
- Files.readString(Paths.get(PDP_CONFIGURATION_JSON)),
- ContentType.APPLICATION_JSON);
+ Files.readString(Paths.get(PDP_CONFIGURATION_JSON)));
- postTest(HOST_URL + "/engine/controllers", 400,
- "{}",
- ContentType.APPLICATION_JSON);
+ postTest(HOST_URL + "/engine/controllers", 400, "{}");
- postTest(HOST_URL + "/engine/controllers", 304,
- "{controller.name : foo}",
- ContentType.APPLICATION_JSON);
+ postTest(HOST_URL + "/engine/controllers", 304, "{controller.name : foo}");
- postTest(HOST_URL + "/engine/controllers", 206,
- "{controller.name : new}",
- ContentType.APPLICATION_JSON);
+ postTest(HOST_URL + "/engine/controllers", 206, "{controller.name : new}");
deleteTest(HOST_URL + "/engine/controllers/new", 200);
- postTest(HOST_URL + "/engine/controllers/foo/drools/facts/session1/query1/entity1", 200,
- "[{f:v}]", ContentType.APPLICATION_JSON);
+ postTest(HOST_URL + "/engine/controllers/foo/drools/facts/session1/query1/entity1", 200, "[{f:v}]");
- postTest(HOST_URL + "/engine/controllers/new/drools/facts/session1/query1/entity1", 404,
- "[{f:v}]", ContentType.APPLICATION_JSON);
+ postTest(HOST_URL + "/engine/controllers/new/drools/facts/session1/query1/entity1", 404, "[{f:v}]");
}
@Test
@@ -491,6 +459,18 @@ public class RestManagerTest {
assertEquals(404, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
+ testGetDroolsControllers();
+
+ testGetControllersDecoders();
+
+ testGetTopics();
+
+ testGetEngineTools();
+ }
+
+ private static void testGetDroolsControllers() throws IOException {
+ CloseableHttpResponse response;
+ HttpGet httpGet;
/*
* GET: /engine/controllers/controllerName/drools/facts
* /engine/controllers/controllerName/drools/facts/session
@@ -523,7 +503,7 @@ public class RestManagerTest {
httpGet.releaseConnection();
httpGet = new HttpGet(
- HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/drools/facts/session/query/queriedEntity");
+ HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/drools/facts/session/query/queriedEntity");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(200, response.getStatusLine().getStatusCode());
@@ -534,8 +514,36 @@ public class RestManagerTest {
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(404, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
+ }
+ private static void testGetEngineTools() throws IOException {
+ CloseableHttpResponse response;
+ HttpGet httpGet;
+ /*
+ * GET: /engine/tools/uuid /engine/tools/loggers /engine/tools/loggers/loggerName
+ */
+ httpGet = new HttpGet(HOST_URL + "/engine/tools/uuid");
+ response = client.execute(httpGet);
+ logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
+ assertEquals(200, response.getStatusLine().getStatusCode());
+ httpGet.releaseConnection();
+ httpGet = new HttpGet(HOST_URL + "/engine/tools/loggers");
+ response = client.execute(httpGet);
+ logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
+ assertEquals(200, response.getStatusLine().getStatusCode());
+ httpGet.releaseConnection();
+
+ httpGet = new HttpGet(HOST_URL + "/engine/tools/loggers/ROOT");
+ response = client.execute(httpGet);
+ logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
+ assertEquals(200, response.getStatusLine().getStatusCode());
+ httpGet.releaseConnection();
+ }
+
+ private static void testGetControllersDecoders() throws IOException {
+ HttpGet httpGet;
+ CloseableHttpResponse response;
/*
* GET: /engine/controllers/controllerName/decoders
* /engine/controllers/controllerName/decoders/filters
@@ -589,14 +597,14 @@ public class RestManagerTest {
httpGet.releaseConnection();
httpGet = new HttpGet(
- HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/decoders/topic/filters/factType/rules");
+ HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/decoders/topic/filters/factType/rules");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(404, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
httpGet = new HttpGet(
- HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/decoders/topic/filters/factType/rules/ruleName");
+ HOST_URL + "/engine/controllers/" + FOO_CONTROLLER + "/decoders/topic/filters/factType/rules/ruleName");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(404, response.getStatusLine().getStatusCode());
@@ -607,15 +615,22 @@ public class RestManagerTest {
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(200, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
+ }
+ private static void testGetTopics() throws IOException {
+ CloseableHttpResponse response;
+ HttpGet httpGet;
/*
- * GET: /engine/topics /engine/topics/switches /engine/topics/sources /engine/topics/sinks
- * /engine/topics/sinks/ueb /engine/topics/sources/ueb /engine/topics/sinks/kafka
- * /engine/topics/sources/kafka /engine/topics/sinks/ueb/topic
- * /engine/topics/sources/ueb/topic /engine/topics/sinks/kafka/topic
- * /engine/topics/sources/kafka/topic /engine/topics/sinks/ueb/topic/events
- * /engine/topics/sources/ueb/topic/events /engine/topics/sinks/kafka/topic/events
- * /engine/topics/sources/kafka/topic/events /engine/topics/sources/ueb/topic/switches
+ * GET: /engine/topics
+ * /engine/topics/switches
+ * /engine/topics/sources
+ * /engine/topics/sinks
+ * /engine/topics/sinks/kafka
+ * /engine/topics/sources/kafka
+ * /engine/topics/sinks/kafka/topic
+ * /engine/topics/sources/kafka/topic
+ * /engine/topics/sinks/kafka/topic/events
+ * /engine/topics/sources/kafka/topic/events
* /engine/topics/sources/kafka/topic/switches
*/
httpGet = new HttpGet(HOST_URL + "/engine/topics");
@@ -642,18 +657,6 @@ public class RestManagerTest {
assertEquals(200, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/kafka");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
@@ -678,30 +681,6 @@ public class RestManagerTest {
assertEquals(200, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb/" + UEB_TOPIC);
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb/foobar");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(500, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb/" + UEB_TOPIC);
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb/foobar");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(500, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/kafka/" + KAFKA_TOPIC);
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
@@ -750,30 +729,6 @@ public class RestManagerTest {
assertEquals(500, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb/" + UEB_TOPIC + "/events");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb/foobar/events");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(500, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb/" + UEB_TOPIC + "/events");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb/foobar/events");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(500, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/kafka/" + KAFKA_TOPIC + "/events");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
@@ -822,12 +777,6 @@ public class RestManagerTest {
assertEquals(500, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/ueb/" + UEB_TOPIC + "/switches");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
httpGet = new HttpGet(HOST_URL + "/engine/topics/sources/kafka/" + KAFKA_TOPIC + "/switches");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
@@ -840,12 +789,6 @@ public class RestManagerTest {
assertEquals(200, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
- httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/ueb/" + UEB_TOPIC + "/switches");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
httpGet = new HttpGet(HOST_URL + "/engine/topics/sinks/kafka/" + KAFKA_TOPIC + "/switches");
response = client.execute(httpGet);
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
@@ -857,27 +800,6 @@ public class RestManagerTest {
logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
assertEquals(200, response.getStatusLine().getStatusCode());
httpGet.releaseConnection();
-
- /*
- * GET: /engine/tools/uuid /engine/tools/loggers /engine/tools/loggers/loggerName
- */
- httpGet = new HttpGet(HOST_URL + "/engine/tools/uuid");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/tools/loggers");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
-
- httpGet = new HttpGet(HOST_URL + "/engine/tools/loggers/ROOT");
- response = client.execute(httpGet);
- logger.info(httpGet.getRequestLine() + " response code: {}", response.getStatusLine().getStatusCode());
- assertEquals(200, response.getStatusLine().getStatusCode());
- httpGet.releaseConnection();
}
/**
@@ -902,10 +824,10 @@ public class RestManagerTest {
private static void cleanUpWorkingDirs() throws IOException {
final Path testControllerPath = Paths.get(
- SystemPersistenceConstants.getManager().getConfigurationPath().toString(), FOO_CONTROLLER_FILE);
+ SystemPersistenceConstants.getManager().getConfigurationPath().toString(), FOO_CONTROLLER_FILE);
final Path testControllerBakPath =
- Paths.get(SystemPersistenceConstants.getManager().getConfigurationPath().toString(),
- FOO_CONTROLLER_FILE_BAK);
+ Paths.get(SystemPersistenceConstants.getManager().getConfigurationPath().toString(),
+ FOO_CONTROLLER_FILE_BAK);
Files.deleteIfExists(testControllerPath);
Files.deleteIfExists(testControllerBakPath);
diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
index a6b8ac3f..b4915ef4 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineTest.java
@@ -25,6 +25,7 @@ import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.onap.policy.drools.system.PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME;
import java.io.File;
import java.io.IOException;
@@ -33,7 +34,6 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Test;
@@ -49,6 +49,7 @@ import org.onap.policy.drools.protocol.coders.EventProtocolCoderConstants;
import org.onap.policy.drools.protocol.coders.EventProtocolParams;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
import org.onap.policy.drools.protocol.configuration.DroolsConfiguration;
+import org.onap.policy.drools.server.restful.RestManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -152,6 +153,8 @@ class PolicyEngineTest {
void test100Configure() {
var manager = (PolicyEngineManager) PolicyEngineConstants.getManager();
var engineProps = manager.defaultTelemetryConfig();
+ engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + TELEMETRY_SERVER_DEFAULT_NAME
+ + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX, RestManager.class.getName());
/* override default port */
engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."