This project starts [TransportPCE](https://git.opendaylight.org/gerrit/#/admin/projects/transportpce) without karaf framework.
## Build & Run
-* Make sure you have JDK8 or later installed
-* Make sure you have [maven 3.5.0](https://maven.apache.org/download.cgi) or later installed.
+* Make sure you have JDK11 or later installed.
+* Make sure you have [maven 3.5.2](https://maven.apache.org/download.cgi) or later installed.
* Make sure you have proper [settings.xml](https://github.com/opendaylight/odlparent/blob/master/settings.xml) in your ``~/.m2`` directory.
#### Before compiling Lighty-TransportPCE
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)
cd transportpce
```
-Before compilation, make sure that deviations are not present in models:
+mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true -Dodlparent.spotbugs.skip -Dodlparent.checkstyle.skip
```
-transportpce/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-transportpce/ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-transportpce/ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-```
-After deviations are removed from models, compile the project.
-```
-mvn clean install -DskipTests
-```
-2. compile __lighty-core/10.0.x__
+2. compile __lighty-core/12.1.x__
```
git clone https://github.com/PantheonTechnologies/lighty-core.git
cd lighty-core
-git checkout 10.0.x
-mvn clean install -DskipTests
+git checkout 12.1.x
+mvn clean install -DskipTests -Dmaven.javadoc.skip=true
```
#### Compile Lighty-TransportPCE
* Project is build using maven command:
```
cd ../lighty
-mvn clean install
+mvn clean install -Dmaven.javadoc.skip=true
```
* After project build is done, use binary package to run the TransportPCE controller.
```
cd target
-unzip lighty-transportpce-10.0.1-SNAPSHOT-bin.zip
-cd lighty-transportpce-10.0.1-SNAPSHOT
+unzip lighty-transportpce-12.1.0-SNAPSHOT-bin.zip
+cd lighty-transportpce-12.1.0-SNAPSHOT
./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.
## TransportPCE lighty.io - karaf comparison
-### Application Boot test
-This test compares TransportPCE application on lighty.io and karaf.
-After TransportPCE is started, performance is measured using [visualvm](https://visualvm.github.io/) tool.
-
-| Property Name | ODL/Karaf * | lighty.io ** |
-|-----------------------------------|----------------|--------------|
-| Build size | 225M | 64M |
-| Startup Time | ~15s | ~6s |
-| Shutdown Time | ~5s | ~100ms |
-| Process memory allocated (RSS)*** | 1236 MB | 353 MB |
-| HEAP memory (used/allocated) | 135 / 1008 MB | 58 / 128 MB |
-| Metaspace (used/allocated) | 115 / 132 MB | 62 / 65 MB |
-| Threads (live/daemon) | 111 / 48 | 70 / 11 |
-| Classes loaded | 22027 | 12019 |
-| No. of jars | 680 | 244 |
-
-### test_end2end_lighty.py
-This test compares TransportPCE application on lighty.io and karaf while running __test_end2end_lighty.py__ (4 connected netconf devices).
-
-| Property Name | ODL/Karaf * | lighty.io ** |
-|-----------------------------------|----------------|--------------|
-| Build size | 225M | 64M |
-| Startup Time | ~15s | ~6s |
-| Shutdown Time | ~5s | ~100ms |
-| Process memory allocated (RSS)*** | 1185 MB | 440 MB |
-| HEAP memory (used/allocated) | 158 / 960 MB | 85 / 128 MB |
-| Metaspace (used/allocated) | 128 / 146 MB | 83 / 87 MB |
-| Threads (live/daemon) | 148 / 60 | 129 / 26 |
-| Classes loaded | 24326 | 16155 |
-| No. of jars | 680 | 244 |
-
-`* JVM parameters: -Xms128M -Xmx2048m ...`
-`** JVM parameters: -Xms128m -Xmx128m -XX:MaxMetaspaceSize=128m`
-`*** sudo ps -o pid,rss,user,command ax | grep java | grep transportpce`
-
-### Integration Test results
-| Test Name | Failed | All | Comment |
-|---------------------------------------|--------|-----|----------------------------|
-| test_portmapping.py | 0 | 18 | |
-| test_topoPortMapping.py | 1 | 6 | (same results with karaf) |
-| test_topology.py | 0 | 33 | |
-| test_renderer_service_path_nominal.py | 0 | 24 | |
-| test_pce.py | 0 | 22 | |
-| test_olm.py | 1 | 40 | (same results with karaf) |
-| test_end2end_lighty.py | 18 | 52 | (same as karaf, need check)|
-
-`karaf: executable = "../karaf/target/assembly/bin/karaf"`
-`lighty.io executable = "../lighty/target/lighty-transportpce-10.0.1-SNAPSHOT/start-controller.sh": `
-
-* __Total Success: 175__
-* __Total Failed: 20__
-
-### Postman collection
-Check this [postman collection](docs/TransportPCE.postman_collection.json) for RESTCONF examples.
+see the previous version of this file in README.neon.md
--- /dev/null
+# Lighty-TransportPCE Controller
+
+This project starts [TransportPCE](https://git.opendaylight.org/gerrit/#/admin/projects/transportpce) without karaf framework.
+
+## Build & Run
+* Make sure you have JDK8 or later installed
+* Make sure you have [maven 3.5.0](https://maven.apache.org/download.cgi) or later installed.
+* 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__
+```
+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)
+cd transportpce
+```
+Before compilation, make sure that deviations are not present in models:
+```
+transportpce/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
+transportpce/ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
+transportpce/ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
+```
+After deviations are removed from models, compile the project.
+```
+mvn clean install -DskipTests
+```
+2. compile __lighty-core/10.0.x__
+```
+git clone https://github.com/PantheonTechnologies/lighty-core.git
+cd lighty-core
+git checkout 10.0.x
+mvn clean install -DskipTests
+```
+#### Compile Lighty-TransportPCE
+* Project is build using maven command:
+```
+cd ../lighty
+mvn clean install
+```
+* After project build is done, use binary package to run the TransportPCE controller.
+```
+cd target
+unzip lighty-transportpce-10.0.1-SNAPSHOT-bin.zip
+cd lighty-transportpce-10.0.1-SNAPSHOT
+./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.
+
+## TransportPCE lighty.io - karaf comparison
+
+### Application Boot test
+This test compares TransportPCE application on lighty.io and karaf.
+After TransportPCE is started, performance is measured using [visualvm](https://visualvm.github.io/) tool.
+
+| Property Name | ODL/Karaf * | lighty.io ** |
+|-----------------------------------|----------------|--------------|
+| Build size | 225M | 64M |
+| Startup Time | ~15s | ~6s |
+| Shutdown Time | ~5s | ~100ms |
+| Process memory allocated (RSS)*** | 1236 MB | 353 MB |
+| HEAP memory (used/allocated) | 135 / 1008 MB | 58 / 128 MB |
+| Metaspace (used/allocated) | 115 / 132 MB | 62 / 65 MB |
+| Threads (live/daemon) | 111 / 48 | 70 / 11 |
+| Classes loaded | 22027 | 12019 |
+| No. of jars | 680 | 244 |
+
+### test_end2end_lighty.py
+This test compares TransportPCE application on lighty.io and karaf while running __test_end2end_lighty.py__ (4 connected netconf devices).
+
+| Property Name | ODL/Karaf * | lighty.io ** |
+|-----------------------------------|----------------|--------------|
+| Build size | 225M | 64M |
+| Startup Time | ~15s | ~6s |
+| Shutdown Time | ~5s | ~100ms |
+| Process memory allocated (RSS)*** | 1185 MB | 440 MB |
+| HEAP memory (used/allocated) | 158 / 960 MB | 85 / 128 MB |
+| Metaspace (used/allocated) | 128 / 146 MB | 83 / 87 MB |
+| Threads (live/daemon) | 148 / 60 | 129 / 26 |
+| Classes loaded | 24326 | 16155 |
+| No. of jars | 680 | 244 |
+
+`* JVM parameters: -Xms128M -Xmx2048m ...`
+`** JVM parameters: -Xms128m -Xmx128m -XX:MaxMetaspaceSize=128m`
+`*** sudo ps -o pid,rss,user,command ax | grep java | grep transportpce`
+
+### Integration Test results
+| Test Name | Failed | All | Comment |
+|---------------------------------------|--------|-----|----------------------------|
+| test_portmapping.py | 0 | 18 | |
+| test_topoPortMapping.py | 1 | 6 | (same results with karaf) |
+| test_topology.py | 0 | 33 | |
+| test_renderer_service_path_nominal.py | 0 | 24 | |
+| test_pce.py | 0 | 22 | |
+| test_olm.py | 1 | 40 | (same results with karaf) |
+| test_end2end_lighty.py | 18 | 52 | (same as karaf, need check)|
+
+`karaf: executable = "../karaf/target/assembly/bin/karaf"`
+`lighty.io executable = "../lighty/target/lighty-transportpce-10.0.1-SNAPSHOT/start-controller.sh": `
+
+* __Total Success: 175__
+* __Total Failed: 20__
+
+### Postman collection
+Check this [postman collection](docs/TransportPCE.postman_collection.json) for RESTCONF examples.
-#!/bin/bash
+#!/bin/sh
+cd $(dirname "$0")
cd ..
-#mvn clean install -DskipTests
+#mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true -Dodlparent.spotbugs.skip -Dodlparent.checkstyle.skip
git clone https://github.com/PantheonTechnologies/lighty-core.git
cd lighty-core
-git checkout master
-mvn clean install -DskipTests
+git checkout 12.1.x
+mvn clean install -DskipTests -Dmaven.javadoc.skip=true
cd ../lighty
-mvn clean install
+mvn clean install -Dmaven.javadoc.skip=true
cd target
-unzip lighty-transportpce-12.0.0-SNAPSHOT-bin.zip
+unzip lighty-transportpce-12.1.0-SNAPSHOT-bin.zip
cd ..
rm -rf ../lighty-core
<parent>
<groupId>io.lighty.core</groupId>
<artifactId>lighty-app-parent</artifactId>
- <version>12.0.0-SNAPSHOT</version>
+ <version>12.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.lighty.examples.controllers</groupId>
<artifactId>lighty-transportpce</artifactId>
- <version>12.0.0-SNAPSHOT</version>
+ <version>12.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<artifactId>transportpce-ordmodels-service</artifactId>
<version>${transportpce.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.transportpce</groupId>
+ <artifactId>transportpce-networkmodel</artifactId>
+ <version>${transportpce.version}</version>
+ </dependency>
<!-- TPCE Models - END -->
<!-- TPCE bundles - BEGIN -->
-#!/bin/bash
+#!/bin/sh
BASEDIR=$(dirname "$0")
#echo "${BASEDIR}"
rm -rf target
#start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.0.0-SNAPSHOT.jar
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.1.0-SNAPSHOT.jar
-#!/bin/bash
+#!/bin/sh
BASEDIR=$(dirname "$0")
#echo "${BASEDIR}"
cd ${BASEDIR}
#start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.0.0-SNAPSHOT.jar
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.1.0-SNAPSHOT.jar
import org.opendaylight.transportpce.networkmodel.NetworkUtilsImpl;
import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
import org.opendaylight.transportpce.networkmodel.service.NetworkModelServiceImpl;
-import org.opendaylight.transportpce.networkmodel.util.OpenRoadmFactory;
-import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology22;
+// OpenRoadmFctory and OpenRoadmTopology22 has been deleted
+import org.opendaylight.transportpce.networkmodel.util.OpenRoadmTopology;
+
import org.opendaylight.transportpce.olm.OlmPowerServiceRpcImpl;
import org.opendaylight.transportpce.olm.OlmProvider;
import org.opendaylight.transportpce.olm.power.PowerMgmt;
import org.opendaylight.transportpce.renderer.RendererProvider;
import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterface121;
import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterface221;
+// Adding OTN interface
+import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmOtnInterface221;
+
import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterfaceFactory;
import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererServiceImpl;
+// Add OTN
+import org.opendaylight.transportpce.renderer.provisiondevice.OtnDeviceRendererServiceImpl;
+
import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperationsImpl;
import org.opendaylight.transportpce.renderer.rpcs.DeviceRendererRPCImpl;
+
import org.opendaylight.transportpce.servicehandler.impl.ServicehandlerProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final PceProvider pceProvider;
// network model beans
- private final OpenRoadmTopology22 openRoadmTopology22;
- private final OpenRoadmFactory openRoadmFactory;
+ // private final OpenRoadmTopology22 openRoadmTopology22;
+ // private final OpenRoadmFactory openRoadmFactory;
+ // private final OpenRoadmTopology openRoadmTopology;
+
private final R2RLinkDiscovery linkDiscoveryImpl;
private final NetworkUtilsImpl networkutilsServiceImpl;
private final NetworkModelServiceImpl networkModelService;
// renderer beans
private final OpenRoadmInterface121 openRoadmInterface121;
- private final OpenRoadmInterface221 openRoadmInterface22;
+ private final OpenRoadmInterface221 openRoadmInterface221;
+ private final OpenRoadmOtnInterface221 openRoadmOtnInterface221;
+
private final OpenRoadmInterfaceFactory openRoadmInterfaceFactory;
private final DeviceRendererServiceImpl deviceRendererService;
+ private final OtnDeviceRendererServiceImpl otnDeviceRendererService;
private final DeviceRendererRPCImpl deviceRendererRPC;
private final NetworkModelWavelengthServiceImpl networkModelWavelengthService;
private final RendererServiceOperationsImpl rendererServiceOperations;
pceProvider = new PceProvider(lightyServices.getRpcProviderService(), pathComputationService);
LOG.info("Creating network-model beans ...");
- openRoadmTopology22 = new OpenRoadmTopology22(networkTransaction, deviceTransactionManager);
- openRoadmFactory = new OpenRoadmFactory(mappingUtils, openRoadmTopology22);
- linkDiscoveryImpl = new R2RLinkDiscovery(lightyServices.getBindingDataBroker(), deviceTransactionManager, openRoadmFactory, networkTransaction);
- networkutilsServiceImpl = new NetworkUtilsImpl(lightyServices.getBindingDataBroker(), openRoadmFactory);
- networkModelService = new NetworkModelServiceImpl(networkTransaction, linkDiscoveryImpl, deviceTransactionManager, openRoadmFactory, portMapping);
+ // TODO: Need to look into it
+
+
+
+ // TODO: Add OTN network model
+ //
+ linkDiscoveryImpl = new R2RLinkDiscovery(lightyServices.getBindingDataBroker(), deviceTransactionManager, networkTransaction);
+ networkutilsServiceImpl = new NetworkUtilsImpl(lightyServices.getBindingDataBroker());
+ networkModelService = new NetworkModelServiceImpl(networkTransaction, linkDiscoveryImpl, portMapping);
netConfTopologyListener = new NetConfTopologyListener(networkModelService, lightyServices.getBindingDataBroker(), deviceTransactionManager);
- networkModelProvider = new NetworkModelProvider(networkTransaction, lightyServices.getBindingDataBroker(), lightyServices.getRpcProviderService(), networkutilsServiceImpl, netConfTopologyListener, openRoadmFactory);
+ networkModelProvider = new NetworkModelProvider(networkTransaction, lightyServices.getBindingDataBroker(),
+ lightyServices.getRpcProviderService(), networkutilsServiceImpl, netConfTopologyListener);
LOG.info("Creating OLM beans ...");
powerMgmt = new PowerMgmtImpl(lightyServices.getBindingDataBroker(), openRoadmInterfaces, crossConnect, deviceTransactionManager);
LOG.info("Creating renderer beans ...");
openRoadmInterface121 = new OpenRoadmInterface121(portMapping, openRoadmInterfaces);
- openRoadmInterface22 = new OpenRoadmInterface221(portMapping, openRoadmInterfaces, fixedFlex);
- openRoadmInterfaceFactory = new OpenRoadmInterfaceFactory(mappingUtils, openRoadmInterface121, openRoadmInterface22);
- deviceRendererService = new DeviceRendererServiceImpl(lightyServices.getBindingDataBroker(), deviceTransactionManager, openRoadmInterfaceFactory, openRoadmInterfaces, crossConnect, portMapping);
- deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService);
+ openRoadmInterface221 = new OpenRoadmInterface221(portMapping, openRoadmInterfaces, fixedFlex);
+ openRoadmOtnInterface221 = new OpenRoadmOtnInterface221(portMapping, openRoadmInterfaces);
+ openRoadmInterfaceFactory = new OpenRoadmInterfaceFactory(mappingUtils, openRoadmInterface121,
+ openRoadmInterface221, openRoadmOtnInterface221);
+ deviceRendererService = new DeviceRendererServiceImpl(lightyServices.getBindingDataBroker(), deviceTransactionManager,
+ openRoadmInterfaceFactory, openRoadmInterfaces, crossConnect, portMapping, networkModelService);
+ otnDeviceRendererService = new OtnDeviceRendererServiceImpl(openRoadmInterfaceFactory, crossConnect, openRoadmInterfaces,
+ deviceTransactionManager, networkModelService);
+ deviceRendererRPC = new DeviceRendererRPCImpl(deviceRendererService, otnDeviceRendererService);
networkModelWavelengthService = new NetworkModelWavelengthServiceImpl(lightyServices.getBindingDataBroker());
rendererServiceOperations = new RendererServiceOperationsImpl(deviceRendererService, olmPowerServiceRpc, lightyServices.getBindingDataBroker(), networkModelWavelengthService, lightyServices.getBindingNotificationPublishService());
rendererProvider = new RendererProvider(lightyServices.getRpcProviderService(), deviceRendererRPC, rendererServiceOperations);
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev170418.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev170228.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200128.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev171017.$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.rev190502.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.gnpy.path.rev200202.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200128.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.http.transportpce.topology.rev190625.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.transportpce.topology.rev200129.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana.afn.safi.rev130704.$YangModuleInfoImpl.getInstance(),
print("starting LIGHTY.IO TransportPCE build...")
executable = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
- "..", "..", "..", "lighty", "target", "lighty-transportpce-12.0.0-SNAPSHOT",
+ "..", "..", "..", "lighty", "target", "lighty-transportpce-12.1.0-SNAPSHOT",
"clean-start-controller.sh")
with open('odl.log', 'w') as outfile:
return subprocess.Popen(
print("starting LIGHTY.IO TransportPCE build...")
executable = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
- "..", "..", "..", "lighty", "target", "lighty-transportpce-12.0.0-SNAPSHOT",
+ "..", "..", "..", "lighty", "target", "lighty-transportpce-12.1.0-SNAPSHOT",
"clean-start-controller.sh")
with open('odl.log', 'w') as outfile:
return subprocess.Popen(