- migrate to new lighty-core API
- migrate to new TPCE API
- fix java max heap sizes in start scripts
JIRA: TRNSPRTPCE-294
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Id8906afd05ba7bee6468992d2d255b5db4b621e3
<artifactId>lighty-app-parent</artifactId>
<version>13.0.0</version>
<!--
<artifactId>lighty-app-parent</artifactId>
<version>13.0.0</version>
<!--
- 13.0.0 correspond to the master branch version on the official repo
- that is advised for Aluminium.
- At that date 08/2020, it seems not yet published on Nexus
+ lighty-core is usually released a few days before the official Opendaylight release.
+ 13.0.0 = Aluminium release of 2020/09/18
-->
<relativePath />
</parent>
-->
<relativePath />
</parent>
<scope>test</scope>
</dependency>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>net.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-annotations</artifactId>
+ <version>3.1.3</version>
+ <optional>true</optional>
+ </dependency>
+
</dependencies>
<build>
<finalName>tpce</finalName>
</dependencies>
<build>
<finalName>tpce</finalName>
rm -rf target
#start controller
rm -rf target
#start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar tpce.jar
+java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar
cd ${BASEDIR}
#start controller
cd ${BASEDIR}
#start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar tpce.jar
+java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar
lightyController.start().get();
// 2. start RestConf server
lightyController.start().get();
// 2. start RestConf server
- CommunityRestConfBuilder communityRestConfBuilder = new CommunityRestConfBuilder();
LightyServerBuilder jettyServerBuilder = new LightyServerBuilder(
new InetSocketAddress(restConfConfiguration.getInetAddress(), restConfConfiguration.getHttpPort()));
LightyServerBuilder jettyServerBuilder = new LightyServerBuilder(
new InetSocketAddress(restConfConfiguration.getInetAddress(), restConfConfiguration.getHttpPort()));
- CommunityRestConf communityRestConf = communityRestConfBuilder.from(
- RestConfConfigUtils.getRestConfConfiguration(restConfConfiguration, lightyController.getServices()))
- .withLightyServer(jettyServerBuilder).build();
+ CommunityRestConfBuilder communityRestConfBuilder = CommunityRestConfBuilder.from(
+ RestConfConfigUtils.getRestConfConfiguration(restConfConfiguration, lightyController.getServices()));
+ CommunityRestConf communityRestConf = communityRestConfBuilder.withLightyServer(jettyServerBuilder).build();
communityRestConf.start().get();
communityRestConf.startServer();
communityRestConf.start().get();
communityRestConf.startServer();
NetconfSBPlugin netconfSouthboundPlugin;
netconfSBPConfiguration = NetconfConfigUtils.injectServicesToTopologyConfig(netconfSBPConfiguration,
lightyController.getServices());
NetconfSBPlugin netconfSouthboundPlugin;
netconfSBPConfiguration = NetconfConfigUtils.injectServicesToTopologyConfig(netconfSBPConfiguration,
lightyController.getServices());
- NetconfTopologyPluginBuilder netconfSBPBuilder = new NetconfTopologyPluginBuilder();
+ NetconfTopologyPluginBuilder netconfSBPBuilder = new NetconfTopologyPluginBuilder(
+ lightyController.getServices(), netconfSBPConfiguration);
netconfSouthboundPlugin = netconfSBPBuilder.from(netconfSBPConfiguration, lightyController.getServices())
.build();
netconfSouthboundPlugin.start().get();
netconfSouthboundPlugin = netconfSBPBuilder.from(netconfSBPConfiguration, lightyController.getServices())
.build();
netconfSouthboundPlugin.start().get();
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl221;
import org.opendaylight.transportpce.common.device.DeviceTransactionManagerImpl;
import org.opendaylight.transportpce.common.fixedflex.FixedFlexImpl;
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl221;
import org.opendaylight.transportpce.common.device.DeviceTransactionManagerImpl;
import org.opendaylight.transportpce.common.fixedflex.FixedFlexImpl;
+import org.opendaylight.transportpce.common.fixedflex.FlexGridImpl;
import org.opendaylight.transportpce.common.mapping.MappingUtils;
import org.opendaylight.transportpce.common.mapping.MappingUtilsImpl;
import org.opendaylight.transportpce.common.mapping.PortMapping;
import org.opendaylight.transportpce.common.mapping.MappingUtils;
import org.opendaylight.transportpce.common.mapping.MappingUtilsImpl;
import org.opendaylight.transportpce.common.mapping.PortMapping;
networkTransaction = new NetworkTransactionImpl(requestProcessor);
LOG.info("Creating PCE beans ...");
networkTransaction = new NetworkTransactionImpl(requestProcessor);
LOG.info("Creating PCE beans ...");
- PathComputationService pathComputationService = new PathComputationServiceImpl(networkTransaction,
- lightyServices.getBindingNotificationPublishService());
+ PathComputationService pathComputationService = new PathComputationServiceImpl(
+ networkTransaction,
+ lightyServices.getBindingNotificationPublishService(),
+ lightyServices.getAdapterContext().currentSerializer()
+ );
pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService);
LOG.info("Creating network-model beans ...");
pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService);
LOG.info("Creating network-model beans ...");
LOG.info("Creating service-handler beans ...");
RendererServiceOperations rendererServiceOperations = new RendererServiceOperationsImpl(deviceRendererService,
LOG.info("Creating service-handler beans ...");
RendererServiceOperations rendererServiceOperations = new RendererServiceOperationsImpl(deviceRendererService,
- olmPowerServiceRpc, lightyServices.getBindingDataBroker(), networkModelWavelengthService,
- lightyServices.getBindingNotificationPublishService());
+ otnDeviceRendererService, olmPowerServiceRpc, lightyServices.getBindingDataBroker(),
+ networkModelWavelengthService, lightyServices.getBindingNotificationPublishService());
servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), lightyServices.getNotificationService(), pathComputationService,
rendererServiceOperations, networkModelWavelengthService,
servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), lightyServices.getNotificationService(), pathComputationService,
rendererServiceOperations, networkModelWavelengthService,
DeviceRendererRPCImpl deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService,
otnDeviceRendererService);
RendererServiceOperationsImpl rendererServiceOperations = new RendererServiceOperationsImpl(
DeviceRendererRPCImpl deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService,
otnDeviceRendererService);
RendererServiceOperationsImpl rendererServiceOperations = new RendererServiceOperationsImpl(
- deviceRendererService, olmPowerServiceRpc, lightyServices.getBindingDataBroker(),
- networkModelWavelengthService, lightyServices.getBindingNotificationPublishService());
+ deviceRendererService, otnDeviceRendererService, olmPowerServiceRpc,
+ lightyServices.getBindingDataBroker(), networkModelWavelengthService,
+ lightyServices.getBindingNotificationPublishService());
return new RendererProvider(lightyServices.getRpcProviderService(), deviceRendererRPC,
rendererServiceOperations);
}
return new RendererProvider(lightyServices.getRpcProviderService(), deviceRendererRPC,
rendererServiceOperations);
}
OpenRoadmInterfaces openRoadmInterfaces, PortMapping portMapping) {
OpenRoadmInterface121 openRoadmInterface121 = new OpenRoadmInterface121(portMapping, openRoadmInterfaces);
OpenRoadmInterface221 openRoadmInterface221 = new OpenRoadmInterface221(portMapping, openRoadmInterfaces,
OpenRoadmInterfaces openRoadmInterfaces, PortMapping portMapping) {
OpenRoadmInterface121 openRoadmInterface121 = new OpenRoadmInterface121(portMapping, openRoadmInterfaces);
OpenRoadmInterface221 openRoadmInterface221 = new OpenRoadmInterface221(portMapping, openRoadmInterfaces,
+ new FixedFlexImpl(), new FlexGridImpl());
OpenRoadmOtnInterface221 openRoadmOtnInterface221 = new OpenRoadmOtnInterface221(portMapping,
openRoadmInterfaces);
return new OpenRoadmInterfaceFactory(mappingUtils, openRoadmInterface121, openRoadmInterface221,
OpenRoadmOtnInterface221 openRoadmOtnInterface221 = new OpenRoadmOtnInterface221(portMapping,
openRoadmInterfaces);
return new OpenRoadmInterfaceFactory(mappingUtils, openRoadmInterface121, openRoadmInterface221,
CrossConnectImpl221 crossConnectImpl221 = new CrossConnectImpl221(deviceTransactionManager);
return new CrossConnectImpl(deviceTransactionManager, mappingUtils, crossConnectImpl121, crossConnectImpl221);
}
CrossConnectImpl221 crossConnectImpl221 = new CrossConnectImpl221(deviceTransactionManager);
return new CrossConnectImpl(deviceTransactionManager, mappingUtils, crossConnectImpl121, crossConnectImpl221);
}
-}
\ No newline at end of file
org.opendaylight.yang.gen.v1.gnpy.gnpy.api.rev190103.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.gnpy.gnpy.eqpt.config.rev181119.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.gnpy.gnpy.network.topology.rev181214.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.gnpy.gnpy.api.rev190103.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.gnpy.gnpy.eqpt.config.rev181119.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.gnpy.gnpy.network.topology.rev181214.$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.gnpy.path.rev200202.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.gnpy.path.rev200909.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200827
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200827
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629
import static org.junit.Assert.fail;
import java.io.File;
import static org.junit.Assert.fail;
import java.io.File;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.junit.After;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.junit.After;
ContentResponse response = client.GET("http://localhost:8888/restconfCustom/config/ietf-network:networks/network/openroadm-topology");
assertEquals("Response code should be 200", 200, response.getStatus());
}
ContentResponse response = client.GET("http://localhost:8888/restconfCustom/config/ietf-network:networks/network/openroadm-topology");
assertEquals("Response code should be 200", 200, response.getStatus());
}
-}
\ No newline at end of file