From a30d881bb6dcff8233151e66fbf14ccf7d3ae4ea Mon Sep 17 00:00:00 2001 From: Gilles Thouenon Date: Wed, 7 Dec 2022 18:49:35 +0100 Subject: [PATCH] Fix feature issues Activating SingleFeatureTest for odl-transportpce-tapi feature reveals an issue to install the feature. - declare in tpce features the upstream feature dependencies - use transportpce-models-artifacts - activate features tests - fix issue in transportpce-olm blueprint.xml - fix olm issue in lighty - move config files from features to bundles to have them installed before testing the feature Signed-off-by: Gilles Thouenon Change-Id: I9a5e6d862ea29acc5e2b78a38c0c307b4d207770 --- dmaap-client/pom.xml | 26 +++++ .../org.opendaylight.transportpce.dmaap.cfg | 0 .../odl-transportpce-dmaap-client/pom.xml | 30 +----- .../src/main/feature/feature.xml | 2 +- features/odl-transportpce-inventory/pom.xml | 102 +++++++++--------- .../src/main/feature/feature.xml | 4 +- .../odl-transportpce-nbinotifications/pom.xml | 30 +----- .../src/main/feature/feature.xml | 2 +- features/odl-transportpce-swagger/pom.xml | 14 +-- features/odl-transportpce-tapi/pom.xml | 72 ++++++++++--- features/odl-transportpce/pom.xml | 44 ++------ .../src/main/feature/feature.xml | 2 +- inventory/pom.xml | 52 +++++++++ .../org.opendaylight.transportpce.job.cfg | 0 .../org.ops4j.datasource-transporpce.cfg | 0 .../tpce/module/TransportPCEImpl.java | 2 +- nbinotifications/pom.xml | 26 +++++ ...daylight.transportpce.nbinotifications.cfg | 0 olm/pom.xml | 26 +++++ .../transportpce/olm/OlmProvider.java | 13 ++- .../OSGI-INF/blueprint/olm-blueprint.xml | 33 +++--- .../org.opendaylight.transportpce.cfg | 0 .../OSGI-INF/blueprint/renderer-blueprint.xml | 6 +- .../blueprint/servicehandler-blueprint.xml | 4 +- 24 files changed, 278 insertions(+), 212 deletions(-) rename {features/odl-transportpce-dmaap-client => dmaap-client}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg (100%) rename {features/odl-transportpce-inventory => inventory}/src/main/resources/org.opendaylight.transportpce.job.cfg (100%) rename {features/odl-transportpce-inventory => inventory}/src/main/resources/org.ops4j.datasource-transporpce.cfg (100%) rename {features/odl-transportpce-nbinotifications => nbinotifications}/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg (100%) rename {features/odl-transportpce => olm}/src/main/resources/org.opendaylight.transportpce.cfg (100%) diff --git a/dmaap-client/pom.xml b/dmaap-client/pom.xml index c060234fb..2b582a566 100644 --- a/dmaap-client/pom.xml +++ b/dmaap-client/pom.xml @@ -127,4 +127,30 @@ test + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-dmaap-artifact + + attach-artifact + + + + + ${basedir}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg + cfg + config + + + + + + + + diff --git a/features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg b/dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg similarity index 100% rename from features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg rename to dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg diff --git a/features/odl-transportpce-dmaap-client/pom.xml b/features/odl-transportpce-dmaap-client/pom.xml index f88a83429..f80fba3b9 100644 --- a/features/odl-transportpce-dmaap-client/pom.xml +++ b/features/odl-transportpce-dmaap-client/pom.xml @@ -22,8 +22,7 @@ OpenDaylight :: transportpce :: dmaap-client - - true + false @@ -52,31 +51,4 @@ - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-dmaap-artifact - test - - attach-artifact - - - - - ${basedir}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg - cfg - config - - - - - - - - diff --git a/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml b/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml index 0031ef8c3..7fd90d6fa 100644 --- a/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml +++ b/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml @@ -6,7 +6,7 @@ - mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config + mvn:${project.groupId}/transportpce-dmaap-client/${project.version}/cfg/config \ No newline at end of file diff --git a/features/odl-transportpce-inventory/pom.xml b/features/odl-transportpce-inventory/pom.xml index 9d9a52a19..ec69e46a8 100644 --- a/features/odl-transportpce-inventory/pom.xml +++ b/features/odl-transportpce-inventory/pom.xml @@ -20,6 +20,9 @@ OpenDaylight :: transportpce :: Inventory + 10.0.5 + 4.0.4 + 17.1.0-SNAPSHOT localhost:3306 transportpce root @@ -28,9 +31,35 @@ 600 - true + false + + + + org.opendaylight.transportpce.models + transportpce-models-artifacts + ${transportpce.models.version} + pom + import + + + org.opendaylight.mdsal + mdsal-artifacts + ${mdsal.version} + import + pom + + + org.opendaylight.netconf + netconf-artifacts + ${netconf.version} + pom + import + + + + org.opendaylight.transportpce @@ -39,63 +68,28 @@ features xml + + org.opendaylight.mdsal + odl-mdsal-binding-base + features + xml + + + org.opendaylight.netconf + odl-netconf-util + features + xml + + + org.opendaylight.netconf + odl-netconf-mapping-api + features + xml + org.opendaylight.transportpce transportpce-inventory ${project.version} - - - - - maven-resources-plugin - - - copy-resources - validate - - copy-resources - - - ${basedir}/target/resources - - - src/main/resources - true - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-db-artifact - package - - attach-artifact - - - - - target/resources/org.ops4j.datasource-transporpce.cfg - cfg - datasource - - - target/resources/org.opendaylight.transportpce.job.cfg - cfg - config - - - - - - - - diff --git a/features/odl-transportpce-inventory/src/main/feature/feature.xml b/features/odl-transportpce-inventory/src/main/feature/feature.xml index 0c9de2a06..fe40883a2 100644 --- a/features/odl-transportpce-inventory/src/main/feature/feature.xml +++ b/features/odl-transportpce-inventory/src/main/feature/feature.xml @@ -5,10 +5,10 @@ pax-jdbc-mariadb pax-jdbc-pool-dbcp2 - mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/datasource + mvn:${project.groupId}/transportpce-inventory/${project.version}/cfg/datasource - mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config + mvn:${project.groupId}/transportpce-inventory/${project.version}/cfg/config \ No newline at end of file diff --git a/features/odl-transportpce-nbinotifications/pom.xml b/features/odl-transportpce-nbinotifications/pom.xml index 5d96b2bd2..f0d99a159 100644 --- a/features/odl-transportpce-nbinotifications/pom.xml +++ b/features/odl-transportpce-nbinotifications/pom.xml @@ -22,8 +22,7 @@ OpenDaylight :: transportpce :: nbinotifications - - true + false @@ -40,31 +39,4 @@ ${project.version} - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-dmaap-artifact - package - - attach-artifact - - - - - ${basedir}/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg - cfg - config - - - - - - - - diff --git a/features/odl-transportpce-nbinotifications/src/main/feature/feature.xml b/features/odl-transportpce-nbinotifications/src/main/feature/feature.xml index 5e99a5241..e2cca34aa 100644 --- a/features/odl-transportpce-nbinotifications/src/main/feature/feature.xml +++ b/features/odl-transportpce-nbinotifications/src/main/feature/feature.xml @@ -6,7 +6,7 @@ - mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config + mvn:${project.groupId}/transportpce-nbinotifications/${project.version}/cfg/config \ No newline at end of file diff --git a/features/odl-transportpce-swagger/pom.xml b/features/odl-transportpce-swagger/pom.xml index 43d0ce2d0..afc0393eb 100644 --- a/features/odl-transportpce-swagger/pom.xml +++ b/features/odl-transportpce-swagger/pom.xml @@ -25,6 +25,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 4.0.4 etc/opendaylight/karaf + false @@ -47,17 +48,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL xml - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - diff --git a/features/odl-transportpce-tapi/pom.xml b/features/odl-transportpce-tapi/pom.xml index 9e8310031..e972c48e0 100644 --- a/features/odl-transportpce-tapi/pom.xml +++ b/features/odl-transportpce-tapi/pom.xml @@ -23,14 +23,69 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL OpenDaylight :: transportpce :: tapi + 10.0.5 + 4.0.4 17.1.0-SNAPSHOT + false + + + + org.opendaylight.transportpce.models + transportpce-models-artifacts + ${transportpce.models.version} + pom + import + + + org.opendaylight.mdsal + mdsal-artifacts + 10.0.5 + import + pom + + + org.opendaylight.netconf + netconf-artifacts + ${netconf.version} + pom + import + + + + org.opendaylight.transportpce.models - tapi-2.1.1 - ${transportpce.models.version} + odl-tapi-models + features + xml + + + org.opendaylight.mdsal.model + odl-mdsal-model-rfc8345 + features + xml + + + org.opendaylight.netconf + odl-netconf-connector + features + xml + + + org.opendaylight.netconf + odl-netconf-all + features + xml + + + ${project.groupId} + odl-transportpce + ${project.version} + features + xml ${project.groupId} @@ -38,17 +93,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL ${project.version} - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - diff --git a/features/odl-transportpce/pom.xml b/features/odl-transportpce/pom.xml index b7a87d7e1..0279d98a2 100644 --- a/features/odl-transportpce/pom.xml +++ b/features/odl-transportpce/pom.xml @@ -26,10 +26,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 4.0.4 17.1.0-SNAPSHOT etc/opendaylight/karaf + false + + org.opendaylight.transportpce.models + transportpce-models-artifacts + ${transportpce.models.version} + pom + import + org.opendaylight.netconf netconf-artifacts @@ -44,7 +52,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.transportpce.models odl-openroadm-models - ${transportpce.models.version} features xml @@ -102,39 +109,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL xml - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifact - test - - attach-artifact - - - - - ${basedir}/src/main/resources/org.opendaylight.transportpce.cfg - cfg - config - - - - - - - - diff --git a/features/odl-transportpce/src/main/feature/feature.xml b/features/odl-transportpce/src/main/feature/feature.xml index 13c35983c..e0df389c7 100644 --- a/features/odl-transportpce/src/main/feature/feature.xml +++ b/features/odl-transportpce/src/main/feature/feature.xml @@ -6,7 +6,7 @@ - mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config + mvn:${project.groupId}/transportpce-olm/${project.version}/cfg/config \ No newline at end of file diff --git a/inventory/pom.xml b/inventory/pom.xml index 781ab9ca0..24e7c933d 100644 --- a/inventory/pom.xml +++ b/inventory/pom.xml @@ -96,4 +96,56 @@ sal-netconf-connector + + + + + maven-resources-plugin + + + copy-resources + validate + + copy-resources + + + ${basedir}/target/resources + + + src/main/resources + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-db-artifact + + attach-artifact + + + + + target/resources/org.ops4j.datasource-transporpce.cfg + cfg + datasource + + + target/resources/org.opendaylight.transportpce.job.cfg + cfg + config + + + + + + + + diff --git a/features/odl-transportpce-inventory/src/main/resources/org.opendaylight.transportpce.job.cfg b/inventory/src/main/resources/org.opendaylight.transportpce.job.cfg similarity index 100% rename from features/odl-transportpce-inventory/src/main/resources/org.opendaylight.transportpce.job.cfg rename to inventory/src/main/resources/org.opendaylight.transportpce.job.cfg diff --git a/features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg b/inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg similarity index 100% rename from features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg rename to inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg diff --git a/lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java b/lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java index a10b7f04b..970874bf3 100644 --- a/lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java +++ b/lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java @@ -174,8 +174,8 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP crossConnect, deviceTransactionManager, olmtimer1, olmtimer2); OlmPowerService olmPowerService = new OlmPowerServiceImpl(lightyServices.getBindingDataBroker(), powerMgmt, deviceTransactionManager, portMapping, mappingUtils, openRoadmInterfaces); - olmProvider = new OlmProvider(lightyServices.getRpcProviderService(), olmPowerService); TransportpceOlmService olmPowerServiceRpc = new OlmPowerServiceRpcImpl(olmPowerService); + olmProvider = new OlmProvider(lightyServices.getRpcProviderService(), olmPowerServiceRpc); LOG.info("Creating renderer beans ..."); OpenRoadmInterfaceFactory openRoadmInterfaceFactory = initOpenRoadmFactory(mappingUtils, openRoadmInterfaces, diff --git a/nbinotifications/pom.xml b/nbinotifications/pom.xml index f7071d930..55d850b4f 100644 --- a/nbinotifications/pom.xml +++ b/nbinotifications/pom.xml @@ -112,4 +112,30 @@ test + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-dmaap-artifact + + attach-artifact + + + + + ${basedir}/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg + cfg + config + + + + + + + + diff --git a/features/odl-transportpce-nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg b/nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg similarity index 100% rename from features/odl-transportpce-nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg rename to nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg diff --git a/olm/pom.xml b/olm/pom.xml index a3d6c1840..bd3325eaa 100644 --- a/olm/pom.xml +++ b/olm/pom.xml @@ -139,4 +139,30 @@ and is available at http://www.eclipse.org/legal/epl-v10.html test + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifact + + attach-artifact + + + + + ${basedir}/src/main/resources/org.opendaylight.transportpce.cfg + cfg + config + + + + + + + + diff --git a/olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java b/olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java index db2865167..7ab54ce15 100644 --- a/olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java +++ b/olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java @@ -9,7 +9,6 @@ package org.opendaylight.transportpce.olm; import org.opendaylight.mdsal.binding.api.RpcProviderService; -import org.opendaylight.transportpce.olm.service.OlmPowerService; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService; import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.slf4j.Logger; @@ -21,19 +20,19 @@ import org.slf4j.LoggerFactory; public class OlmProvider { private static final Logger LOG = LoggerFactory.getLogger(OlmProvider.class); private final RpcProviderService rpcProviderService; - private final OlmPowerService olmPowerService; + private final TransportpceOlmService olmPowerServiceRpc; private ObjectRegistration olmRPCRegistration; /** * Instantiates a new olm provider. - * @param olmPowerService - * implementation of OlmService + * @param olmPowerServiceRpc + * implementation of TransportpceOlmService * @param rpcProviderService * the rpc provider service */ - public OlmProvider(final RpcProviderService rpcProviderService, final OlmPowerService olmPowerService) { + public OlmProvider(final RpcProviderService rpcProviderService, final TransportpceOlmService olmPowerServiceRpc) { this.rpcProviderService = rpcProviderService; - this.olmPowerService = olmPowerService; + this.olmPowerServiceRpc = olmPowerServiceRpc; } /** @@ -43,7 +42,7 @@ public class OlmProvider { LOG.info("OlmProvider Session Initiated"); // Initializing Notification module olmRPCRegistration = rpcProviderService.registerRpcImplementation(TransportpceOlmService.class, - new OlmPowerServiceRpcImpl(this.olmPowerService)); + this.olmPowerServiceRpc); } /** diff --git a/olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml b/olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml index dee2972ff..2e00ba6c8 100644 --- a/olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml +++ b/olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml @@ -37,9 +37,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html interface="org.opendaylight.transportpce.common.mapping.PortMapping" /> - + + + + + + + + + + @@ -48,22 +55,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - - - - - - - + + - - + - - + + diff --git a/features/odl-transportpce/src/main/resources/org.opendaylight.transportpce.cfg b/olm/src/main/resources/org.opendaylight.transportpce.cfg similarity index 100% rename from features/odl-transportpce/src/main/resources/org.opendaylight.transportpce.cfg rename to olm/src/main/resources/org.opendaylight.transportpce.cfg diff --git a/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml b/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml index 72333afe9..38c7147dc 100644 --- a/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml +++ b/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true"> - + @@ -21,9 +21,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - - + diff --git a/servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml b/servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml index affeddf0d..730c10227 100644 --- a/servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml +++ b/servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml @@ -87,8 +87,6 @@ Author: Martial Coulibaly on behalf of Orange - - + interface="org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations"/> -- 2.36.6