From: Christophe Betoule Date: Wed, 31 Mar 2021 13:06:58 +0000 (+0200) Subject: fix issue in Lighty for PortMapping X-Git-Tag: 3.1.0~41 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=669891a8f533aed2f848934ce56ad261912bf894 fix issue in Lighty for PortMapping Signed-off-by: Christophe Betoule Change-Id: Ia9dd5a87218fb57c6befd7356ac4a8f053a3d1f7 (cherry picked from commit 3ce821fa313d35ca73caf877be327ade10493bf7) --- 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 63e6442b8..9bfdaaed4 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 @@ -119,17 +119,6 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP RequestProcessor requestProcessor = new RequestProcessor(lightyServices.getBindingDataBroker()); networkTransaction = new NetworkTransactionImpl(requestProcessor); - LOG.info("Creating PCE beans ..."); - // TODO: pass those parameters through command line - GnpyConsumer gnpyConsumer = new GnpyConsumerImpl("http://127.0.0.1:8008", - "gnpy", "gnpy", lightyServices.getAdapterContext().currentSerializer()); - PathComputationService pathComputationService = new PathComputationServiceImpl( - networkTransaction, - lightyServices.getBindingNotificationPublishService(), - gnpyConsumer - ); - pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService); - LOG.info("Creating network-model beans ..."); R2RLinkDiscovery linkDiscoveryImpl = new R2RLinkDiscovery(lightyServices.getBindingDataBroker(), deviceTransactionManager, networkTransaction); @@ -148,6 +137,18 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP lightyServices.getRpcProviderService(), networkutilsServiceImpl, netConfTopologyListener, lightyServices.getNotificationService(), networkModelWavelengthService); + LOG.info("Creating PCE beans ..."); + // TODO: pass those parameters through command line + GnpyConsumer gnpyConsumer = new GnpyConsumerImpl("http://127.0.0.1:8008", + "gnpy", "gnpy", lightyServices.getAdapterContext().currentSerializer()); + PathComputationService pathComputationService = new PathComputationServiceImpl( + networkTransaction, + lightyServices.getBindingNotificationPublishService(), + gnpyConsumer, + portMapping + ); + pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService); + LOG.info("Creating OLM beans ..."); CrossConnect crossConnect = initCrossConnect(mappingUtils); PowerMgmt powerMgmt = new PowerMgmtImpl(lightyServices.getBindingDataBroker(), openRoadmInterfaces,