diff options
Diffstat (limited to 'controlloop/common')
16 files changed, 59 insertions, 47 deletions
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/feature-controlloop-management/pom.xml b/controlloop/common/feature-controlloop-management/pom.xml index 9152c4dc5..04751d97f 100644 --- a/controlloop/common/feature-controlloop-management/pom.xml +++ b/controlloop/common/feature-controlloop-management/pom.xml @@ -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-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 |