fix issue in Lighty for PortMapping 81/95481/1
authorChristophe Betoule <christophe.betoule@orange.com>
Wed, 31 Mar 2021 13:06:58 +0000 (15:06 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Thu, 1 Apr 2021 07:58:53 +0000 (07:58 +0000)
Signed-off-by: Christophe Betoule <christophe.betoule@orange.com>
Change-Id: Ia9dd5a87218fb57c6befd7356ac4a8f053a3d1f7
(cherry picked from commit 3ce821fa313d35ca73caf877be327ade10493bf7)

lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java

index 63e6442b8a6462536f74313caa6c7f00df960104..9bfdaaed4fb40fbadf7579224d1ca0543f8a0b61 100644 (file)
@@ -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,