From 669891a8f533aed2f848934ce56ad261912bf894 Mon Sep 17 00:00:00 2001 From: Christophe Betoule Date: Wed, 31 Mar 2021 15:06:58 +0200 Subject: [PATCH] fix issue in Lighty for PortMapping Signed-off-by: Christophe Betoule Change-Id: Ia9dd5a87218fb57c6befd7356ac4a8f053a3d1f7 (cherry picked from commit 3ce821fa313d35ca73caf877be327ade10493bf7) --- .../tpce/module/TransportPCEImpl.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) 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, -- 2.36.6