- bump lighty pom to 14.0.0
- fix a few migration issues since Si SR0
- adapt tox.ini accordingly
- fix README.md
- force lighty use in tox
JIRA: TRNSPRTPCE-442
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: If7124a7b93e4606037ffa25d4faff79deac023d9
(cherry picked from commit
450c421e16108c03a1278cfd9c112c09e2a04e1f)
* Make sure you have proper [settings.xml](https://github.com/opendaylight/odlparent/blob/master/settings.xml) in your ``~/.m2`` directory.
#### Before compiling Lighty-TransportPCE
* Make sure you have proper [settings.xml](https://github.com/opendaylight/odlparent/blob/master/settings.xml) in your ``~/.m2`` directory.
#### Before compiling Lighty-TransportPCE
-Make sure upstream projects are compiled locally and stored in local ``~/.m2/repository``:
-1. compile __transportpce/master__
+1. Make sure upstream projects are compiled locally and stored in local ``~/.m2/repository``:
+2. compile __transportpce/silicon__
-git clone https://git.opendaylight.org/gerrit/transportpce && (cd transportpce && curl -kLo `git rev-parse --git-dir`/hooks/commit-msg https://git.opendaylight.org/gerrit/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg)
+git clone -b stable/silicon https://git.opendaylight.org/gerrit/transportpce && (cd transportpce && curl -kLo `git rev-parse --git-dir`/hooks/commit-msg https://git.opendaylight.org/gerrit/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg)
cd transportpce
```
mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true -Dodlparent.spotbugs.skip -Dodlparent.checkstyle.skip
```
cd transportpce
```
mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true -Dodlparent.spotbugs.skip -Dodlparent.checkstyle.skip
```
-2. compile __lighty-core/12.1.x__
-```
-git clone https://github.com/PantheonTechnologies/lighty-core.git
-cd lighty-core
-git checkout 12.1.x
-mvn clean install -DskipTests -Dmaven.javadoc.skip=true
-```
#### Compile Lighty-TransportPCE
* Project is build using maven command:
```
#### Compile Lighty-TransportPCE
* Project is build using maven command:
```
* After project build is done, use binary package to run the TransportPCE controller.
```
cd target
* After project build is done, use binary package to run the TransportPCE controller.
```
cd target
-unzip lighty-transportpce-12.1.0-SNAPSHOT-bin.zip
-cd lighty-transportpce-12.1.0-SNAPSHOT
+unzip tpce-bin.zip
+cd tpce
./start-controller.sh
```
* The whole build process described here and in the previous section can be performed automatically by launching the script build.sh from lighty folder.
./start-controller.sh
```
* The whole build process described here and in the previous section can be performed automatically by launching the script build.sh from lighty folder.
<parent>
<groupId>io.lighty.core</groupId>
<artifactId>lighty-app-parent</artifactId>
<parent>
<groupId>io.lighty.core</groupId>
<artifactId>lighty-app-parent</artifactId>
- <version>13.0.0</version>
+ <version>14.0.0</version>
<!--
lighty-core is usually released a few days before the official Opendaylight release.
13.0.0 = Aluminium release of 2020/09/18
<!--
lighty-core is usually released a few days before the official Opendaylight release.
13.0.0 = Aluminium release of 2020/09/18
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.ExecutionException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.ExecutionException;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
restConfConfig.setJsonRestconfServiceType(JsonRestConfServiceType.DRAFT_02);
// 3. NETCONF SBP configuration
NetconfConfiguration netconfSBPConfig = NetconfConfigUtils.createDefaultNetconfConfiguration();
restConfConfig.setJsonRestconfServiceType(JsonRestConfServiceType.DRAFT_02);
// 3. NETCONF SBP configuration
NetconfConfiguration netconfSBPConfig = NetconfConfigUtils.createDefaultNetconfConfiguration();
- startLighty(singleNodeConfiguration, restConfConfig, netconfSBPConfig, registerShutdownHook, activateNbiNotification);
+ startLighty(singleNodeConfiguration, restConfConfig, netconfSBPConfig, registerShutdownHook,
+ activateNbiNotification);
float duration = (System.nanoTime() - startTime) / 1_000_000f;
LOG.info("lighty.io and RESTCONF-NETCONF started in {}ms", duration);
} catch (ConfigurationException | ExecutionException | IOException e) {
float duration = (System.nanoTime() - startTime) / 1_000_000f;
LOG.info("lighty.io and RESTCONF-NETCONF started in {}ms", duration);
} catch (ConfigurationException | ExecutionException | IOException e) {
- * Build options for command line arguments
+ * Build options for command line arguments.
* @return
*/
private static Options buildOptions() {
* @return
*/
private static Options buildOptions() {
formatter.printHelp(
"java -ms<size> -mx<size> -XX:MaxMetaspaceSize=<size> -jar tpce.jar "
+ "[-restconf <restconfConfigurationFile>] [-nbinotification]"
formatter.printHelp(
"java -ms<size> -mx<size> -XX:MaxMetaspaceSize=<size> -jar tpce.jar "
+ "[-restconf <restconfConfigurationFile>] [-nbinotification]"
- +" e.g. java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar"
+ + " e.g. java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar"
+ "-restconf ../src/test/resources/config.json -nbinotification",
options);
System.exit(1);
+ "-restconf ../src/test/resources/config.json -nbinotification",
options);
System.exit(1);
import io.lighty.core.controller.api.AbstractLightyModule;
import io.lighty.core.controller.api.LightyServices;
import io.lighty.core.controller.api.AbstractLightyModule;
import io.lighty.core.controller.api.LightyServices;
import java.util.Arrays;
import java.util.List;
import java.util.Arrays;
import java.util.List;
import org.opendaylight.transportpce.common.crossconnect.CrossConnect;
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl;
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl121;
import org.opendaylight.transportpce.common.crossconnect.CrossConnect;
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl;
import org.opendaylight.transportpce.common.crossconnect.CrossConnectImpl121;
import org.opendaylight.transportpce.networkmodel.NetworkModelProvider;
import org.opendaylight.transportpce.networkmodel.NetworkUtilsImpl;
import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
import org.opendaylight.transportpce.networkmodel.NetworkModelProvider;
import org.opendaylight.transportpce.networkmodel.NetworkUtilsImpl;
import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
+import org.opendaylight.transportpce.networkmodel.listeners.PortMappingListener;
import org.opendaylight.transportpce.networkmodel.service.FrequenciesService;
import org.opendaylight.transportpce.networkmodel.service.FrequenciesServiceImpl;
import org.opendaylight.transportpce.networkmodel.service.NetworkModelService;
import org.opendaylight.transportpce.networkmodel.service.FrequenciesService;
import org.opendaylight.transportpce.networkmodel.service.FrequenciesServiceImpl;
import org.opendaylight.transportpce.networkmodel.service.NetworkModelService;
FrequenciesService networkModelWavelengthService =
new FrequenciesServiceImpl(lightyServices.getBindingDataBroker());
NetConfTopologyListener netConfTopologyListener = new NetConfTopologyListener(networkModelService,
FrequenciesService networkModelWavelengthService =
new FrequenciesServiceImpl(lightyServices.getBindingDataBroker());
NetConfTopologyListener netConfTopologyListener = new NetConfTopologyListener(networkModelService,
- lightyServices.getBindingDataBroker(), deviceTransactionManager);
+ lightyServices.getBindingDataBroker(), deviceTransactionManager, portMapping);
+ PortMappingListener portMappingListener = new PortMappingListener(networkModelService);
networkModelProvider = new NetworkModelProvider(networkTransaction, lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), networkutilsServiceImpl, netConfTopologyListener,
networkModelProvider = new NetworkModelProvider(networkTransaction, lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), networkutilsServiceImpl, netConfTopologyListener,
- lightyServices.getNotificationService(), networkModelWavelengthService);
+ lightyServices.getNotificationService(), networkModelWavelengthService, portMappingListener);
LOG.info("Creating PCE beans ...");
// TODO: pass those parameters through command line
LOG.info("Creating PCE beans ...");
// TODO: pass those parameters through command line
lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
ServicehandlerImpl servicehandler = new ServicehandlerImpl(lightyServices.getBindingDataBroker(),
pathComputationService, rendererServiceOperations, lightyServices.getBindingNotificationPublishService(),
lightyServices.getBindingNotificationPublishService(), serviceDataStoreOperations);
ServicehandlerImpl servicehandler = new ServicehandlerImpl(lightyServices.getBindingDataBroker(),
pathComputationService, rendererServiceOperations, lightyServices.getBindingNotificationPublishService(),
- pceListenerImpl, rendererListenerImpl, networkModelListenerImpl, serviceDataStoreOperations);
+ pceListenerImpl, rendererListenerImpl, networkModelListenerImpl, serviceDataStoreOperations, "N/A");
servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), lightyServices.getNotificationService(),
serviceDataStoreOperations, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl,
servicehandler);
tapiProvider = initTapi(lightyServices, servicehandler);
servicehandlerProvider = new ServicehandlerProvider(lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(), lightyServices.getNotificationService(),
serviceDataStoreOperations, pceListenerImpl, rendererListenerImpl, networkModelListenerImpl,
servicehandler);
tapiProvider = initTapi(lightyServices, servicehandler);
- if(activateNbiNotification) {
+ if (activateNbiNotification) {
LOG.info("Creating nbi-notifications beans ...");
nbiNotificationsProvider = new NbiNotificationsProvider(
publisherTopicList, null, null, lightyServices.getRpcProviderService(),
LOG.info("Creating nbi-notifications beans ...");
nbiNotificationsProvider = new NbiNotificationsProvider(
publisherTopicList, null, null, lightyServices.getRpcProviderService(),
servicehandlerProvider.init();
LOG.info("Initializing tapi provider ...");
tapiProvider.init();
servicehandlerProvider.init();
LOG.info("Initializing tapi provider ...");
tapiProvider.init();
- LOG.info("Initializing nbi-notifications provider ...");
- nbiNotificationsProvider.init();
+ if(nbiNotificationsProvider != null) {
+ LOG.info("Initializing nbi-notifications provider ...");
+ nbiNotificationsProvider.init();
+ }
LOG.info("Init done.");
return true;
}
LOG.info("Init done.");
return true;
}
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.$YangModuleInfoImpl
.getInstance(),
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.$YangModuleInfoImpl
.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.transportpce.d._interface.ord.topology.types.rev201116
- .$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.$YangModuleInfoImpl
org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.$YangModuleInfoImpl
[testenv]
passenv = USE_LIGHTY http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv]
passenv = USE_LIGHTY http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
+setenv =
+ USE_LIGHTY = True
usedevelop = True
basepython = python3
deps =
usedevelop = True
basepython = python3
deps =