aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/controller-usecases/src/main')
-rw-r--r--controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java3
-rw-r--r--controlloop/common/controller-usecases/src/main/resources/usecases.drl24
2 files changed, 15 insertions, 12 deletions
diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
index 8d09b1c40..86a189dd3 100644
--- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
+++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020-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.
@@ -36,6 +37,7 @@ import static org.onap.policy.drools.apps.controller.usecases.UsecasesConstants.
import static org.onap.policy.drools.apps.controller.usecases.UsecasesConstants.VSERVER_PROV_STATUS;
import static org.onap.policy.drools.apps.controller.usecases.UsecasesConstants.VSERVER_VSERVER_NAME;
+import java.io.Serial;
import java.util.Deque;
import java.util.Map;
import java.util.Set;
@@ -70,6 +72,7 @@ import org.onap.policy.sdnr.PciMessage;
*/
public class UsecasesEventManager extends ClEventManagerWithEvent<Step2> implements StepContext {
+ @Serial
private static final long serialVersionUID = -1216568161322872641L;
/**
diff --git a/controlloop/common/controller-usecases/src/main/resources/usecases.drl b/controlloop/common/controller-usecases/src/main/resources/usecases.drl
index c10b8d0c9..14bc9a406 100644
--- a/controlloop/common/controller-usecases/src/main/resources/usecases.drl
+++ b/controlloop/common/controller-usecases/src/main/resources/usecases.drl
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-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.
@@ -210,7 +210,7 @@ rule "EVENT"
//
try {
if (notification != null) {
- PolicyEngineConstants.getManager().deliver("POLICY-CL-MGT", notification);
+ PolicyEngineConstants.getManager().deliver("policy-cl-mgt", notification);
}
} catch(RuntimeException e) {
@@ -382,7 +382,7 @@ rule "EVENT.MANAGER.ACCEPT"
notification.setPolicyScope(drools.getRule().getName());
notification.setPolicyName($manager.getPolicyName());
notification.setPolicyVersion($manager.getPolicyVersion());
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -478,7 +478,7 @@ rule "EVENT.MANAGER.GENERATE.SDNR.NOTIFICATION"
try {
ControlLoopResponse clResponse = $manager.makeControlLoopResponse($outcome);
- $manager.deliver("DCAE_CL_RSP", clResponse, "SDNR notification", drools.getRule().getName());
+ $manager.deliver("dcae_cl_rsp", clResponse, "SDNR notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception generating SDNR Response notification",
@@ -536,7 +536,7 @@ rule "EVENT.MANAGER.PROCESS.GUARD.OUTCOME"
+ " is Deny");
}
- $manager.deliver("POLICY-CL-MGT", notification, "GUARD notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "GUARD notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception generating GUARD notification",
@@ -585,7 +585,7 @@ rule "EVENT.MANAGER.PROCESS.POLICY.STARTED"
notification.setHistory(Collections.emptyList());
notification.setMessage($manager.getOperationMessage());
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -684,7 +684,7 @@ rule "EVENT.MANAGER.PROCESS.POLICY.SUCCESS"
$manager.setState(State.POLICY_LOADED);
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -747,7 +747,7 @@ rule "EVENT.MANAGER.PROCESS.FINAL.FAILURE.ACCEPTED"
$manager.getSteps().clear();
$manager.setState(State.POLICY_LOADED);
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -802,7 +802,7 @@ rule "EVENT.MANAGER.PROCESS.FINAL.FAILURE.REJECTED"
notification.setHistory($manager.getPartialHistory().stream().map(OperationOutcome2::getClOperation)
.toList());
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -856,7 +856,7 @@ rule "EVENT.MANAGER.PROCESS.POLICY.FAILURE"
notification.setPolicyName($manager.getPolicyName());
notification.setPolicyVersion($manager.getPolicyVersion());
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception processing operation outcome",
@@ -959,7 +959,7 @@ rule "EVENT.MANAGER.ABORT"
// aborted while processing the SDNR step - generate a notification
ControlLoopResponse clResponse = $manager.makeControlLoopResponse($outcome);
- $manager.deliver("DCAE_CL_RSP", clResponse, "SDNR notification", drools.getRule().getName());
+ $manager.deliver("dcae_cl_rsp", clResponse, "SDNR notification", drools.getRule().getName());
}
if ($step != null) {
@@ -1032,7 +1032,7 @@ rule "EVENT.MANAGER.FINAL"
notification.setMessage($manager.getFinalMessage());
}
- $manager.deliver("POLICY-CL-MGT", notification, "notification", drools.getRule().getName());
+ $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName());
} catch(RuntimeException e) {
logger.warn("{}: {}.{}: manager={} exception generating final notification",