diff options
52 files changed, 333 insertions, 126 deletions
diff --git a/controlloop/common/controller-usecases/pom.xml b/controlloop/common/controller-usecases/pom.xml index 9280ecde0..3253796aa 100644 --- a/controlloop/common/controller-usecases/pom.xml +++ b/controlloop/common/controller-usecases/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>controller-usecases</artifactId> diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java index 29689edf7..8341be1d3 100644 --- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java +++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 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. @@ -93,11 +93,16 @@ public class GetTargetEntityOperation2 extends OperationPartial { throw new IllegalArgumentException("The target type is null"); } - return switch (targetType) { - case PNF -> detmPnfTarget(); - case VM, VNF, VFMODULE -> detmVfModuleTarget(); - default -> throw new IllegalArgumentException("The target type is not supported"); - }; + switch (targetType) { + case PNF: + return detmPnfTarget(); + case VM: + case VNF: + case VFMODULE: + return detmVfModuleTarget(); + default: + throw new IllegalArgumentException("The target type is not supported"); + } } /** 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 86a189dd3..62d5f70a9 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 @@ -37,7 +37,6 @@ 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; @@ -72,7 +71,6 @@ import org.onap.policy.sdnr.PciMessage; */ public class UsecasesEventManager extends ClEventManagerWithEvent<Step2> implements StepContext { - @Serial private static final long serialVersionUID = -1216568161322872641L; /** @@ -255,7 +253,8 @@ public class UsecasesEventManager extends ClEventManagerWithEvent<Step2> impleme throw new ControlLoopException("The Target type is null"); } switch (event.getTargetType()) { - case VM, VNF: + case VM: + case VNF: validateAaiVmVnfData(eventAai); return; case PNF: diff --git a/controlloop/common/controller-usecases/src/main/resources/usecases.drl b/controlloop/common/controller-usecases/src/main/resources/usecases.drl index 70a1cd8a1..f337f2179 100644 --- a/controlloop/common/controller-usecases/src/main/resources/usecases.drl +++ b/controlloop/common/controller-usecases/src/main/resources/usecases.drl @@ -741,7 +741,7 @@ rule "EVENT.MANAGER.PROCESS.FINAL.FAILURE.ACCEPTED" notification.setPolicyName($manager.getPolicyName()); notification.setPolicyVersion($manager.getPolicyVersion()); notification.setHistory($manager.getPartialHistory().stream().map(OperationOutcome2::getClOperation) - .toList()); + .collect(Collectors.toList())); // trigger move to the next policy - clear all steps $manager.getSteps().clear(); @@ -800,7 +800,7 @@ rule "EVENT.MANAGER.PROCESS.FINAL.FAILURE.REJECTED" notification.setPolicyName($manager.getPolicyName()); notification.setPolicyVersion($manager.getPolicyVersion()); notification.setHistory($manager.getPartialHistory().stream().map(OperationOutcome2::getClOperation) - .toList()); + .collect(Collectors.toList())); $manager.deliver("policy-cl-mgt", notification, "notification", drools.getRule().getName()); @@ -1004,7 +1004,7 @@ rule "EVENT.MANAGER.FINAL" notification.setPolicyName($manager.getPolicyName()); notification.setPolicyVersion($manager.getPolicyVersion()); notification.setHistory($manager.getFullHistory().stream().map(OperationOutcome2::getClOperation) - .toList()); + .collect(Collectors.toList())); OperationFinalResult finalResult = $manager.getFinalResult(); if (finalResult == null) { diff --git a/controlloop/common/controller-usecases/src/test/resources/config/usecases-controller.properties b/controlloop/common/controller-usecases/src/test/resources/config/usecases-controller.properties index 1bd4766dd..fda80c611 100644 --- a/controlloop/common/controller-usecases/src/test/resources/config/usecases-controller.properties +++ b/controlloop/common/controller-usecases/src/test/resources/config/usecases-controller.properties @@ -48,9 +48,9 @@ noop.source.topics.sdnr-cl-rsp.events=org.onap.policy.sdnr.PciResponseWrapper noop.source.topics.sdnr-cl-rsp.events.org.onap.policy.sdnr.PciResponseWrapper.filter=[?($.type == 'response')] noop.source.topics.sdnr-cl-rsp.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson -noop.source.topics.a1-p-RSP.events=org.onap.policy.sdnr.PciResponseWrapper -noop.source.topics.a1-p-RSP.events.org.onap.policy.sdnr.PciResponseWrapper.filter=[?($.type == 'response')] -noop.source.topics.a1-p-RSP.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson +noop.source.topics.a1-p-rsp.events=org.onap.policy.sdnr.PciResponseWrapper +noop.source.topics.a1-p-rsp.events.org.onap.policy.sdnr.PciResponseWrapper.filter=[?($.type == 'response')] +noop.source.topics.a1-p-rsp.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson noop.source.topics.policy-cl-mgt.events=org.onap.policy.controlloop.VirtualControlLoopNotification noop.source.topics.policy-cl-mgt.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty diff --git a/controlloop/common/coordination/pom.xml b/controlloop/common/coordination/pom.xml index e5e17adff..2a5de7c20 100644 --- a/controlloop/common/coordination/pom.xml +++ b/controlloop/common/coordination/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>coordination</artifactId> diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml index 92b6e7d7d..2cd71c72b 100644 --- a/controlloop/common/eventmanager/pom.xml +++ b/controlloop/common/eventmanager/pom.xml @@ -3,7 +3,7 @@ eventmanager ================================================================================ Copyright (C) 2017-2022 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2019,2023 Nordix Foundation. + Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation. Modifications Copyright (C) 2019-2020 Bell Canada. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>eventmanager</artifactId> @@ -186,8 +186,8 @@ <version>${policy.models.version}</version> </dependency> <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> + <groupId>org.apache.httpcomponents.client5</groupId> + <artifactId>httpclient5</artifactId> <scope>provided</scope> </dependency> <dependency> diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java index 014ccd497..2eb6c4a25 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java @@ -21,7 +21,6 @@ package org.onap.policy.controlloop.drl.legacy; -import java.io.Serial; import java.io.Serializable; import lombok.Data; import lombok.NoArgsConstructor; @@ -31,7 +30,6 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; @NoArgsConstructor public class ControlLoopParams implements Serializable { - @Serial private static final long serialVersionUID = 970755684770982776L; private String closedLoopControlName; diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java index bb322f825..43742df4f 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java @@ -21,7 +21,6 @@ package org.onap.policy.controlloop.eventmanager; -import java.io.Serial; import java.util.HashMap; import lombok.AccessLevel; import lombok.Getter; @@ -47,7 +46,6 @@ public abstract class ClEventManagerWithEvent<T extends Step> extends ClEventMan implements StepContext { private static final Logger logger = LoggerFactory.getLogger(ClEventManagerWithEvent.class); - @Serial private static final long serialVersionUID = -1216568161322872641L; public enum NewEventStatus { diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithOutcome.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithOutcome.java index 84389b8c5..3fdb5d6b9 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithOutcome.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithOutcome.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 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. @@ -21,7 +21,6 @@ package org.onap.policy.controlloop.eventmanager; -import java.io.Serial; import java.util.Deque; import java.util.LinkedList; import java.util.UUID; @@ -46,7 +45,6 @@ import org.onap.policy.drools.domain.models.operational.OperationalTarget; public abstract class ClEventManagerWithOutcome<T extends Step> extends ClEventManagerWithSteps<T> implements StepContext { - @Serial private static final long serialVersionUID = -1216568161322872641L; /** diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithSteps.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithSteps.java index 511d93b9d..31d8c93b7 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithSteps.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithSteps.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 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. @@ -21,7 +21,6 @@ package org.onap.policy.controlloop.eventmanager; -import java.io.Serial; import java.util.ArrayDeque; import java.util.Deque; import java.util.LinkedHashMap; @@ -57,7 +56,6 @@ import org.slf4j.LoggerFactory; public abstract class ClEventManagerWithSteps<T extends Step> extends ControlLoopEventManager implements StepContext { private static final Logger logger = LoggerFactory.getLogger(ClEventManagerWithSteps.class); - @Serial private static final long serialVersionUID = -1216568161322872641L; /** diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index f93b2acf5..72d498a7a 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -21,7 +21,6 @@ package org.onap.policy.controlloop.eventmanager; -import java.io.Serial; import java.io.Serializable; import java.time.Instant; import java.util.Deque; @@ -63,7 +62,6 @@ import org.slf4j.LoggerFactory; public class ControlLoopEventManager implements StepContext, Serializable { private static final Logger logger = LoggerFactory.getLogger(ControlLoopEventManager.class); - @Serial private static final long serialVersionUID = -1216568161322872641L; /** diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithStepsTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithStepsTest.java index 5caca45c3..b9ec0757e 100644 --- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithStepsTest.java +++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithStepsTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021, 2023 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. @@ -38,7 +38,6 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import java.io.Serial; import java.time.Instant; import java.util.ArrayList; import java.util.List; @@ -401,7 +400,6 @@ class ClEventManagerWithStepsTest { private class MyManager extends ClEventManagerWithSteps<MyStep> { - @Serial private static final long serialVersionUID = 1L; public MyManager(EventManagerServices services, ControlLoopParams params, UUID requestId, WorkingMemory workMem) @@ -435,7 +433,6 @@ class ClEventManagerWithStepsTest { private static class RealManager extends ClEventManagerWithSteps<MyStep> { - @Serial private static final long serialVersionUID = 1L; public RealManager(EventManagerServices services, ControlLoopParams params, UUID requestId, diff --git a/controlloop/common/feature-controlloop-management/pom.xml b/controlloop/common/feature-controlloop-management/pom.xml index 9152c4dc5..c45a73eeb 100644 --- a/controlloop/common/feature-controlloop-management/pom.xml +++ b/controlloop/common/feature-controlloop-management/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>feature-controlloop-management</artifactId> @@ -119,6 +119,7 @@ <dateLibrary>java17</dateLibrary> <interfaceOnly>true</interfaceOnly> <jakarta>true</jakarta> + <skipIfSpecIsUnchanged>false</skipIfSpecIsUnchanged> </configOptions> </configuration> </execution> diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-RSP-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-RSP-topic.properties index 60e54276d..2efeaba17 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-RSP-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-RSP-topic.properties @@ -19,3 +19,5 @@ kafka.source.topics=a1-p-rsp kafka.source.topics.a1-p-rsp.servers=${envd:KAFKA_SERVERS} +kafka.source.topics.a1-p-rsp.https=${envd:KAFKA_HTTPS:false} + diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-topic.properties index d15f966e0..a5c0ae9b1 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/A1-P-topic.properties @@ -18,5 +18,6 @@ # ============LICENSE_END========================================================= kafka.sink.topics=a1-p -kafka.sink.topics.A1-P.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.a1-p.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.a1-p.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-CL-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-CL-topic.properties index a2c3c628a..5970ebc75 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-CL-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-CL-topic.properties @@ -18,6 +18,9 @@ # ============LICENSE_END========================================================= kafka.source.topics=appc-cl -kafka.sink.topics=appc-cl kafka.source.topics.appc-cl.servers=${envd:KAFKA_SERVERS} +kafka.source.topics.appc-cl.https=${envd:KAFKA_HTTPS:false} + +kafka.sink.topics=appc-cl kafka.sink.topics.appc-cl.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.appc-cl.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-READ-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-READ-topic.properties index dde79f830..40efa7ee9 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-READ-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-READ-topic.properties @@ -19,3 +19,4 @@ kafka.sink.topics=appc-lcm-read kafka.sink.topics.appc-lcm-read.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.appc-lcm-read.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-WRITE-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-WRITE-topic.properties index 261d74557..a0a3065ee 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-WRITE-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/APPC-LCM-WRITE-topic.properties @@ -19,3 +19,4 @@ kafka.source.topics=appc-lcm-write kafka.source.topics.appc-lcm-write.servers=${envd:KAFKA_SERVERS} +kafka.source.topics.appc-lcm-write.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_CL_RSP-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_CL_RSP-topic.properties index 2c860f1a6..e3572c9c0 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_CL_RSP-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_CL_RSP-topic.properties @@ -17,5 +17,6 @@ # limitations under the License. # ============LICENSE_END========================================================= -kafka.sink.topics=dcae-cl-rsp -kafka.sink.topics.dcae-cl-rsp.servers=${env:KAFKA_SERVERS} +kafka.sink.topics=dcae_cl_rsp +kafka.sink.topics.dcae_cl_rsp.servers=${env:KAFKA_SERVERS} +kafka.sink.topics.dcae_cl_rsp.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_TOPIC-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_TOPIC-topic.properties index c7ff538df..6b2da4896 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_TOPIC-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/DCAE_TOPIC-topic.properties @@ -21,3 +21,4 @@ kafka.source.topics=dcae_topic kafka.source.topics.dcae_topic.effectiveTopic=${envd:DCAE_TOPIC} kafka.source.topics.dcae_topic.servers=${envd:KAFKA_SERVERS} kafka.source.topics.dcae_topic.consumerGroup=${envd:DCAE_CONSUMER_GROUP} +kafka.source.topics.dcae_topic.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/POLICY-CL-MGT-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/POLICY-CL-MGT-topic.properties index 22fe4b2a6..7a6a4fb83 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/POLICY-CL-MGT-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/POLICY-CL-MGT-topic.properties @@ -19,3 +19,4 @@ kafka.sink.topics=policy-cl-mgt kafka.sink.topics.policy-cl-mgt.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.policy-cl-mgt.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-RSP-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-RSP-topic.properties index a76ca2c45..001b9c0e2 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-RSP-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-RSP-topic.properties @@ -19,3 +19,4 @@ kafka.source.topics=sdnr-cl-rsp kafka.source.topics.sdnr-cl-rsp.servers=${envd:KAFKA_SERVERS} +kafka.source.topics.sdnr-cl-rsp.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-topic.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-topic.properties index 4ddd00758..3a58f8f42 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-topic.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/SDNR-CL-topic.properties @@ -19,3 +19,4 @@ kafka.sink.topics=sdnr-cl kafka.sink.topics.sdnr-cl.servers=${envd:KAFKA_SERVERS} +kafka.sink.topics.sdnr-cl.https=${envd:KAFKA_HTTPS:false} diff --git a/controlloop/common/feature-controlloop-management/src/main/feature/config/event-manager.properties b/controlloop/common/feature-controlloop-management/src/main/feature/config/event-manager.properties index de3537aee..7124989b5 100644 --- a/controlloop/common/feature-controlloop-management/src/main/feature/config/event-manager.properties +++ b/controlloop/common/feature-controlloop-management/src/main/feature/config/event-manager.properties @@ -4,6 +4,7 @@ # =============================================================================== # Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. # Modifications Copyright (C) 2022 CTC, Inc. and others. +# 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. @@ -44,16 +45,16 @@ actor.service.AAI.operations.CustomQuery.path=aai/v21/query actor.service.AAI.operations.Pnf.path=aai/v21/network/pnfs/pnf actor.service.AAI.operations.Tenant.path=aai/v21/search/nodes-query -actor.service.APPC.sinkTopic=APPC-LCM-READ -actor.service.APPC.sourceTopic=APPC-LCM-WRITE +actor.service.APPC.sinkTopic=appc-lcm-read +actor.service.APPC.sourceTopic=appc-lcm-write actor.service.APPC.operations.ConfigModify.placeholder= actor.service.APPC.operations.Migrate.placeholder= actor.service.APPC.operations.Restart.placeholder= actor.service.APPC.operations.Rebuild.placeholder= # legacy APPC - must specify sink and source for each operation -actor.service.APPC.operations.ModifyConfig.sinkTopic=APPC-CL -actor.service.APPC.operations.ModifyConfig.sourceTopic=APPC-CL +actor.service.APPC.operations.ModifyConfig.sinkTopic=appc-cl +actor.service.APPC.operations.ModifyConfig.sourceTopic=appc-cl actor.service.CDS.operations.any.host=${envd:CDS_GRPC_HOST:} actor.service.CDS.operations.any.port=${envd:CDS_GRPC_PORT:} @@ -67,12 +68,12 @@ actor.service.SDNC.operations.BandwidthOnDemand.path=\ actor.service.SDNC.operations.Reroute.path=\ GENERIC-RESOURCE-API:network-topology-operation -actor.service.SDNR.sinkTopic=SDNR-CL -actor.service.SDNR.sourceTopic=SDNR-CL-RSP +actor.service.SDNR.sinkTopic=sdnr-cl +actor.service.SDNR.sourceTopic=sdnr-cl-rsp actor.service.SDNR.operations.any.placeholder= -actor.service.A1P.sinkTopic=A1-P -actor.service.A1P.sourceTopic=A1-P-RSP +actor.service.A1P.sinkTopic=a1-p +actor.service.A1P.sourceTopic=a1-p-rsp actor.service.A1P.operations.any.placeholder= actor.service.SO.clientName=SO diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java index db078b20c..06a09998a 100644 --- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java +++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2018-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. @@ -53,7 +54,7 @@ public class ControlLoopManagementFeature implements PolicyEngineFeatureApi { throw new IllegalArgumentException("Invalid Controller Name"); } - if (controller.getDrools().getSessionNames().stream().filter(sessionName::equals).count() <= 0) { + if (controller.getDrools().getSessionNames().stream().noneMatch(sessionName::equals)) { throw new IllegalArgumentException("Invalid Session Name"); } diff --git a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java index 279b47c38..b418fd802 100644 --- a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java +++ b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2018-2021 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. @@ -26,7 +26,6 @@ import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.assertEquals; import jakarta.ws.rs.core.Response.Status; -import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Properties; @@ -37,7 +36,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.kie.api.builder.ReleaseId; import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance; -import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.logging.LoggerUtils; import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.drools.persistence.SystemPersistenceConstants; @@ -89,7 +87,7 @@ class RestControlLoopManagerTest { /** * test set up. * - * @throws Exception if failure to complete the set up. + * @throws Exception if failure to complete the setup. */ @BeforeAll public static void setUp() throws Exception { diff --git a/controlloop/common/feature-controlloop-trans/pom.xml b/controlloop/common/feature-controlloop-trans/pom.xml index f17daa89b..c79ab6b12 100644 --- a/controlloop/common/feature-controlloop-trans/pom.xml +++ b/controlloop/common/feature-controlloop-trans/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>feature-controlloop-trans</artifactId> diff --git a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java index 93f204df3..23133f538 100644 --- a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java +++ b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2019-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. @@ -167,10 +167,16 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics { setNotificationValues(controller, notification); switch (notification.getNotification()) { - case REJECTED, FINAL_FAILURE, FINAL_SUCCESS, FINAL_OPENLOOP: + case REJECTED: + case FINAL_FAILURE: + case FINAL_SUCCESS: + case FINAL_OPENLOOP: endTransaction(controller, notification); break; - case ACTIVE, OPERATION, OPERATION_SUCCESS, OPERATION_FAILURE: + case ACTIVE: + case OPERATION: + case OPERATION_SUCCESS: + case OPERATION_FAILURE: /* any other value is an in progress transaction */ inProgressTransaction(notification); break; @@ -353,14 +359,14 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics { .setEndTime(notification.getNotificationTime().toInstant()); switch (notification.getNotification()) { - case FINAL_OPENLOOP, + case FINAL_OPENLOOP: /* fall through */ - FINAL_SUCCESS: + case FINAL_SUCCESS: trans.setStatusCode(true); break; - case FINAL_FAILURE, + case FINAL_FAILURE: /* fall through */ - REJECTED: + case REJECTED: trans.setStatusCode(false); break; default: diff --git a/controlloop/common/feature-controlloop-usecases/pom.xml b/controlloop/common/feature-controlloop-usecases/pom.xml index 13eb7dae7..14665b25d 100644 --- a/controlloop/common/feature-controlloop-usecases/pom.xml +++ b/controlloop/common/feature-controlloop-usecases/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>feature-controlloop-usecases</artifactId> diff --git a/controlloop/common/feature-controlloop-usecases/src/main/feature/config/usecases-controller.properties b/controlloop/common/feature-controlloop-usecases/src/main/feature/config/usecases-controller.properties index 5cf3ce2b5..e394d95c5 100644 --- a/controlloop/common/feature-controlloop-usecases/src/main/feature/config/usecases-controller.properties +++ b/controlloop/common/feature-controlloop-usecases/src/main/feature/config/usecases-controller.properties @@ -21,43 +21,41 @@ controller.name=usecases -kafka.source.topics=DCAE_TOPIC,APPC-CL,APPC-LCM-WRITE,SDNR-CL-RSP -kafka.sink.topics=APPC-CL,APPC-LCM-READ,POLICY-CL-MGT,SDNR-CL,DCAE_CL_RSP +kafka.source.topics=dcae_topic,appc-cl,appc-lcm-write,sdnr-cl-rsp +kafka.sink.topics=appc-cl,appc-lcm-read,policy-cl-mgt,sdnr-cl,dcae_cl_rsp -kafka.source.topics.DCAE_TOPIC.events=\ +kafka.source.topics.dcae_topic.events=\ org.onap.policy.controlloop.CanonicalOnset,org.onap.policy.controlloop.CanonicalAbated -kafka.source.topics.DCAE_TOPIC.events.org.onap.policy.controlloop.CanonicalOnset.\ - filter=[?($.closedLoopEventStatus == 'ONSET')] -kafka.source.topics.DCAE_TOPIC.events.org.onap.policy.controlloop.CanonicalAbated.\ - filter=[?($.closedLoopEventStatus == 'ABATED')] -kafka.source.topics.DCAE_TOPIC.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gson +kafka.source.topics.dcae_topic.events.org.onap.policy.controlloop.CanonicalOnset.filter=[?($.closedLoopEventStatus == 'ONSET')] +kafka.source.topics.dcae_topic.events.org.onap.policy.controlloop.CanonicalAbated.filter=[?($.closedLoopEventStatus == 'ABATED')] +kafka.source.topics.dcae_topic.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gson -kafka.source.topics.APPC-CL.events=org.onap.policy.appc.Response -kafka.source.topics.APPC-CL.events.org.onap.policy.appc.Response.filter=[?($.CommonHeader && $.Status)] -kafka.source.topics.APPC-CL.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty +kafka.source.topics.appc-cl.events=org.onap.policy.appc.Response +kafka.source.topics.appc-cl.events.org.onap.policy.appc.Response.filter=[?($.CommonHeader && $.Status)] +kafka.source.topics.appc-cl.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty -kafka.source.topics.APPC-LCM-WRITE.events=org.onap.policy.appclcm.AppcLcmMessageWrapper -kafka.source.topics.APPC-LCM-WRITE.events.org.onap.policy.appclcm.AppcLcmMessageWrapper.filter=[?($.type == 'response')] -kafka.source.topics.APPC-LCM-WRITE.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson +kafka.source.topics.appc-lcm-write.events=org.onap.policy.appclcm.AppcLcmMessageWrapper +kafka.source.topics.appc-lcm-write.events.org.onap.policy.appclcm.AppcLcmMessageWrapper.filter=[?($.type == 'response')] +kafka.source.topics.appc-lcm-write.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson -kafka.sink.topics.APPC-CL.events=org.onap.policy.appc.Request -kafka.sink.topics.APPC-CL.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty +kafka.sink.topics.appc-cl.events=org.onap.policy.appc.Request +kafka.sink.topics.appc-cl.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty -kafka.sink.topics.APPC-LCM-READ.events=org.onap.policy.appclcm.AppcLcmMessageWrapper -kafka.sink.topics.APPC-LCM-READ.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson +kafka.sink.topics.appc-lcm-read.events=org.onap.policy.appclcm.AppcLcmMessageWrapper +kafka.sink.topics.appc-lcm-read.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson -kafka.sink.topics.POLICY-CL-MGT.events=org.onap.policy.controlloop.VirtualControlLoopNotification -kafka.sink.topics.POLICY-CL-MGT.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty +kafka.sink.topics.policy-cl-mgt.events=org.onap.policy.controlloop.VirtualControlLoopNotification +kafka.sink.topics.policy-cl-mgt.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty -kafka.sink.topics.SDNR-CL.events=org.onap.policy.sdnr.PciRequestWrapper -kafka.sink.topics.SDNR-CL.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson +kafka.sink.topics.sdnr-cl.events=org.onap.policy.sdnr.PciRequestWrapper +kafka.sink.topics.sdnr-cl.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson -kafka.sink.topics.DCAE_CL_RSP.events=org.onap.policy.controlloop.ControlLoopResponse -kafka.sink.topics.DCAE_CL_RSP.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty +kafka.sink.topics.dcae_cl_rsp.events=org.onap.policy.controlloop.ControlLoopResponse +kafka.sink.topics.dcae_cl_rsp.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty -kafka.source.topics.SDNR-CL-RSP.events=org.onap.policy.sdnr.PciResponseWrapper -kafka.source.topics.SDNR-CL-RSP.events.org.onap.policy.sdnr.PciResponseWrapper.filter=[?($.type == 'response')] -kafka.source.topics.SDNR-CL-RSP.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson +kafka.source.topics.sdnr-cl-rsp.events=org.onap.policy.sdnr.PciResponseWrapper +kafka.source.topics.sdnr-cl-rsp.events.org.onap.policy.sdnr.PciResponseWrapper.filter=[?($.type == 'response')] +kafka.source.topics.sdnr-cl-rsp.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson rules.groupId=${project.groupId} rules.artifactId=controller-usecases diff --git a/controlloop/common/feature-controlloop-utils/pom.xml b/controlloop/common/feature-controlloop-utils/pom.xml index f9f26dabf..0e5ae9086 100644 --- a/controlloop/common/feature-controlloop-utils/pom.xml +++ b/controlloop/common/feature-controlloop-utils/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>feature-controlloop-utils</artifactId> diff --git a/controlloop/common/pom.xml b/controlloop/common/pom.xml index 7b8b8ebf2..ef25f0729 100644 --- a/controlloop/common/pom.xml +++ b/controlloop/common/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop</groupId> <artifactId>controlloop</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> diff --git a/controlloop/common/rules-test/pom.xml b/controlloop/common/rules-test/pom.xml index 8da817303..b0e67fb13 100644 --- a/controlloop/common/rules-test/pom.xml +++ b/controlloop/common/rules-test/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.common</groupId> <artifactId>drools-applications-common</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>rules-test</artifactId> diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java index 15e03e634..a4d1739f3 100644 --- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java +++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; +import java.util.stream.Collectors; import java.util.stream.Stream; import lombok.AccessLevel; import lombok.Getter; @@ -209,7 +210,7 @@ public abstract class BaseTest { /** * Service123 with Tosca Compliant Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testService123Compliant() { policyClMgt = createNoficationTopicListener(); appcLcmRead = topics.createListener(APPC_LCM_READ_TOPIC, AppcLcmMessageWrapper.class, APPC_LCM_CODER); @@ -255,7 +256,7 @@ public abstract class BaseTest { * to obtain a lock since it is a different target. After processing of all events * there should only be the policy and params objects left in memory. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testDuplicatesEvents() { policyClMgt = createNoficationTopicListener(); appcLcmRead = topics.createListener(APPC_LCM_READ_TOPIC, AppcLcmMessageWrapper.class, APPC_LCM_CODER); @@ -288,7 +289,7 @@ public abstract class BaseTest { // get the list of target names, so we can ensure there's one of each List<String> actual = Stream.of(notif1, notif2).map(notif -> notif.getAai().get("generic-vnf.vnf-id")) - .sorted().toList(); + .sorted().collect(Collectors.toList()); assertEquals(List.of("duplicate-VNF", "vCPE_Infrastructure_vGMUX_demo_app").toString(), actual.toString()); @@ -303,7 +304,7 @@ public abstract class BaseTest { /** * Sunny Day with Tosca Compliant Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVcpeSunnyDayCompliant() { appcLcmSunnyDay(VCPE_TOSCA_COMPLIANT_POLICY, VCPE_ONSET_1, APPC_RESTART_OP); } @@ -313,7 +314,7 @@ public abstract class BaseTest { * simulate the flooding behavior of the DCAE TCA microservice. TCA could blast tens * or hundreds of ONSETs within sub-second intervals. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVcpeOnsetFloodPrevention() { appcLcmSunnyDay(VCPE_TOSCA_COMPLIANT_POLICY, List.of(VCPE_ONSET_1, VCPE_ONSET_2, VCPE_ONSET_3), APPC_RESTART_OP); @@ -324,7 +325,7 @@ public abstract class BaseTest { /** * Sunny Day with Tosca Compliant Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVdnsSunnyDayCompliant() { httpSunnyDay(VDNS_TOSCA_COMPLIANT_POLICY, VDNS_ONSET); } @@ -343,7 +344,7 @@ public abstract class BaseTest { /** * VFW Sunny Day with Tosca Compliant Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVfwSunnyDayCompliant() { appcLegacySunnyDay(VFW_TOSCA_COMPLIANT_POLICY, VFW_ONSET, APPC_MODIFY_CONFIG_OP); } @@ -367,7 +368,7 @@ public abstract class BaseTest { /** * VPCI Sunny Day Tosca Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVpciSunnyDayCompliant() { sdnrSunnyDay(VPCI_TOSCA_COMPLIANT_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS, SDNR_MODIFY_CONFIG_OP, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC); @@ -378,7 +379,7 @@ public abstract class BaseTest { /** * VSONH Sunny Day with Tosca Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void testVsonhSunnyDayCompliant() { sdnrSunnyDay(VSONH_TOSCA_COMPLIANT_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS, SNDR_MODIFY_CONFIG_ANR_OP, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC); @@ -387,7 +388,7 @@ public abstract class BaseTest { /** * Sunny day 5G SON 01 Modify01Config Operational Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void test5gSonO1SunnyDayCompliant() { sdnrSunnyDay(V5G_SON_O1_TOSCA_POLICY, V5G_SON_O1_ONSET, V5G_SON_O1_SDNR_SUCCESS, MODIFY_O1_CONFIG_OPERATION, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC); @@ -396,7 +397,7 @@ public abstract class BaseTest { /** * Sunny day 5G SON A1 ModifyA1Policy Operational Policy. */ - //TODO This test needs to be enabled in java-17 branch + @Test public void test5gSonA1SunnyDayCompliant() { sdnrSunnyDay(V5G_SON_A1_TOSCA_POLICY, V5G_SON_A1_ONSET, V5G_SON_A1_SDNR_SUCCESS, PUT_A1_POLICY_OPERATION, A1P_CL_TOPIC, A1P_CL_RSP_TOPIC); diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/SimulatorException.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/SimulatorException.java index 73dd2b348..7b886a485 100644 --- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/SimulatorException.java +++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/SimulatorException.java @@ -21,13 +21,10 @@ package org.onap.policy.controlloop.common.rules.test; -import java.io.Serial; - /** * Exception thrown by <i>Simulators</i>. */ public class SimulatorException extends RuntimeException { - @Serial private static final long serialVersionUID = 1L; public SimulatorException() { diff --git a/controlloop/packages/apps-controlloop/pom.xml b/controlloop/packages/apps-controlloop/pom.xml index 14d15cbd1..b199c21d1 100644 --- a/controlloop/packages/apps-controlloop/pom.xml +++ b/controlloop/packages/apps-controlloop/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> <artifactId>drools-applications-packages</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>apps-controlloop</artifactId> diff --git a/controlloop/packages/artifacts-controlloop/pom.xml b/controlloop/packages/artifacts-controlloop/pom.xml index 26b2a4347..f6d1a88f7 100644 --- a/controlloop/packages/artifacts-controlloop/pom.xml +++ b/controlloop/packages/artifacts-controlloop/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> <artifactId>drools-applications-packages</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>artifacts-controlloop</artifactId> diff --git a/controlloop/packages/basex-controlloop/pom.xml b/controlloop/packages/basex-controlloop/pom.xml index e33516893..727b939b5 100644 --- a/controlloop/packages/basex-controlloop/pom.xml +++ b/controlloop/packages/basex-controlloop/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> <artifactId>drools-applications-packages</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>basex-controlloop</artifactId> diff --git a/controlloop/packages/docker-controlloop/pom.xml b/controlloop/packages/docker-controlloop/pom.xml index d03bdf609..e957182be 100644 --- a/controlloop/packages/docker-controlloop/pom.xml +++ b/controlloop/packages/docker-controlloop/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> <artifactId>drools-applications-packages</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>docker-controlloop</artifactId> <packaging>pom</packaging> diff --git a/controlloop/packages/docker-controlloop/pom.xml.versionsBackup b/controlloop/packages/docker-controlloop/pom.xml.versionsBackup new file mode 100644 index 000000000..1bc2d6548 --- /dev/null +++ b/controlloop/packages/docker-controlloop/pom.xml.versionsBackup @@ -0,0 +1,174 @@ +<!-- + ============LICENSE_START======================================================= + ONAP + ================================================================================ + Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + Modifications Copyright (C) 2019-2020 Bell Canada. + Modifications Copyright (C) 2022-2023 Nordix Foundation. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> + <artifactId>drools-applications-packages</artifactId> + <version>2.1.3-SNAPSHOT</version> + </parent> + <artifactId>docker-controlloop</artifactId> + <packaging>pom</packaging> + + <name>docker-controlloop</name> + <description>ONAP Policy Control Loop PDP-D Docker Build</description> + + <properties> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <dist.project.version>${project.version}</dist.project.version> + <docker.skip>false</docker.skip> + <docker.skip.build>false</docker.skip.build> + <docker.skip.push>false</docker.skip.push> + <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format> + <docker.buildArg.BUILD_VERSION_APP_CL>${project.version}</docker.buildArg.BUILD_VERSION_APP_CL> + </properties> + + <build> + <finalName>${project.artifactId}-${project.version}</finalName> + <plugins> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>io.github.git-commit-id</groupId> + <artifactId>git-commit-id-maven-plugin</artifactId> + </plugin> + + <!--fabric8.io docker-maven-plugin does not support ARG usage in the FROM statement of Dockerfile + even though docker supports it: https://github.com/fabric8io/docker-maven-plugin/issues/859. + As a workaround we shall use maven-antrun-plugin to copy the Dockerfile and apply filters to + replace the parameterized base-image version. The fabric8.io docker-maven-plugin shall use this filtered file + to build the image. After the image is built we perform a cleanup to remove the filtered file.--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>3.1.0</version> + <executions> + <execution> + <id>update-parameterized-dockerfile</id> + <phase>initialize</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <copy file="src/main/docker/Dockerfile" + toFile="${project.build.directory}/docker-tmp/Dockerfile"> + <filterset> + <filter token="version.policy.drools-pdp" value="${version.policy.drools-pdp}"/> + </filterset> + </copy> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration> + <verbose>true</verbose> + <apiVersion>1.23</apiVersion> + <pullRegistry>${docker.pull.registry}</pullRegistry> + <pushRegistry>${docker.push.registry}</pushRegistry> + <images> + <image> + <name>onap/policy-pdpd-cl</name> + <build> + <cleanup>try</cleanup> + <contextDir>${project.build.directory}/docker-tmp</contextDir> + <dockerFile>Dockerfile</dockerFile> + <tags> + <tag>${project.version}</tag> + <tag>${project.version}-${maven.build.timestamp}</tag> + <tag>${project.docker.latest.minmax.tag.version}</tag> + </tags> + <assembly> + <descriptor>${project.basedir}/src/main/assembly/assembly.xml</descriptor> + <user>policy:policy:policy</user> + </assembly> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>clean-images</id> + <phase>pre-clean</phase> + <goals> + <goal>remove</goal> + </goals> + <configuration> + <removeAll>true</removeAll> + </configuration> + </execution> + <execution> + <id>generate-images</id> + <phase>generate-sources</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>apps-controlloop</artifactId> + <version>${project.version}</version> + <type>zip</type> + </dependency> + </dependencies> +</project> diff --git a/controlloop/packages/pom.xml b/controlloop/packages/pom.xml index 120672ed6..9cc119007 100644 --- a/controlloop/packages/pom.xml +++ b/controlloop/packages/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.policy.drools-applications.controlloop</groupId> <artifactId>controlloop</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> <artifactId>drools-applications-packages</artifactId> diff --git a/controlloop/pom.xml b/controlloop/pom.xml index d0dda236e..3c6bce192 100644 --- a/controlloop/pom.xml +++ b/controlloop/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>drools-applications</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <groupId>org.onap.policy.drools-applications.controlloop</groupId> @@ -26,13 +26,13 @@ <parent> <groupId>org.onap.policy.parent</groupId> <artifactId>integration</artifactId> - <version>4.1.2-SNAPSHOT</version> + <version>5.0.0-SNAPSHOT</version> <relativePath /> </parent> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>drools-applications</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> <name>policy-drools-applications</name> <packaging>pom</packaging> @@ -47,9 +47,9 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- Project common dependency versions --> - <version.policy.common>2.1.2-SNAPSHOT</version.policy.common> - <policy.models.version>3.1.2-SNAPSHOT</policy.models.version> - <version.policy.drools-pdp>2.1.2-SNAPSHOT</version.policy.drools-pdp> + <version.policy.common>3.0.0-SNAPSHOT</version.policy.common> + <policy.models.version>4.0.0-SNAPSHOT</policy.models.version> + <version.policy.drools-pdp>3.0.0-SNAPSHOT</version.policy.drools-pdp> <surefireArgLine> --add-opens java.base/java.lang=ALL-UNNAMED </surefireArgLine> @@ -69,7 +69,7 @@ <artifactId>maven-compiler-plugin</artifactId> <configuration> <encoding>${project.build.sourceEncoding}</encoding> - <release>${java.version}</release> + <release>11</release> </configuration> </plugin> <plugin> diff --git a/releases/2.1.2-container.yaml b/releases/2.1.2-container.yaml new file mode 100644 index 000000000..b68208ae0 --- /dev/null +++ b/releases/2.1.2-container.yaml @@ -0,0 +1,8 @@ +distribution_type: 'container' +container_release_tag: '2.1.2' +project: 'policy-drools-applications' +log_dir: 'policy-drools-applications-maven-docker-stage-master/1473' +ref: d9b54420641628b8f41ec8f40a808ff917743608 +containers: + - name: 'policy-pdpd-cl' + version: '2.1.2-20240426T0939' diff --git a/releases/2.1.2.yaml b/releases/2.1.2.yaml new file mode 100644 index 000000000..5972bfddd --- /dev/null +++ b/releases/2.1.2.yaml @@ -0,0 +1,5 @@ +distribution_type: 'maven' +version: '2.1.2' +project: 'policy-drools-applications' +tag_release: false +log_dir: 'policy-drools-applications-maven-stage-master/1466/' diff --git a/releases/2.1.3-container.yaml b/releases/2.1.3-container.yaml new file mode 100644 index 000000000..7b21dc3a8 --- /dev/null +++ b/releases/2.1.3-container.yaml @@ -0,0 +1,8 @@ +distribution_type: 'container' +container_release_tag: '2.1.3' +project: 'policy-drools-applications' +log_dir: 'policy-drools-applications-maven-docker-stage-master/1475' +ref: bf7c9477be7fb2775cbb6b887c41bb152744cc8f +containers: + - name: 'policy-pdpd-cl' + version: '2.1.3-20240517T1101' diff --git a/releases/2.1.3.yaml b/releases/2.1.3.yaml new file mode 100644 index 000000000..28a781799 --- /dev/null +++ b/releases/2.1.3.yaml @@ -0,0 +1,5 @@ +distribution_type: 'maven' +version: '2.1.3' +project: 'policy-drools-applications' +tag_release: false +log_dir: 'policy-drools-applications-maven-stage-master/1468/' diff --git a/testsuites/performance/pom.xml b/testsuites/performance/pom.xml index 163cac549..97b6cc361 100644 --- a/testsuites/performance/pom.xml +++ b/testsuites/performance/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>drools-applications-testsuites</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>drools-applications-performance</artifactId> <build> diff --git a/testsuites/pom.xml b/testsuites/pom.xml index 66203b9f8..3c653731d 100644 --- a/testsuites/pom.xml +++ b/testsuites/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>drools-applications</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>drools-applications-testsuites</artifactId> <packaging>pom</packaging> diff --git a/testsuites/stability/pom.xml b/testsuites/stability/pom.xml index f87d8feb1..b0dec10b8 100644 --- a/testsuites/stability/pom.xml +++ b/testsuites/stability/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.onap.policy.drools-applications</groupId> <artifactId>drools-applications-testsuites</artifactId> - <version>2.1.2-SNAPSHOT</version> + <version>3.0.0-SNAPSHOT</version> </parent> <artifactId>drools-applications-stability</artifactId> <build> diff --git a/version.properties b/version.properties index 50539a035..17424ded6 100644 --- a/version.properties +++ b/version.properties @@ -2,9 +2,9 @@ # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) # because they are used in Jenkins, whose plug-in doesn't support -major=2 -minor=1 -patch=2 +major=3 +minor=0 +patch=0 base_version=${major}.${minor}.${patch} |