Lighty support in Magnesium 35/90335/3
authormanuedelf <emmanuelle.delfour@gmail.com>
Mon, 8 Jun 2020 15:15:46 +0000 (17:15 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 9 Jun 2020 09:09:56 +0000 (09:09 +0000)
- use release version of lighty-app-parent
- set groupId to io.lighty.controller
- set artifactId to tpce
- fix final jar name to tpce
- update shell scripts
- remove unused dependencies from pom
- add missing ietf.restconf.rev131019 yang model to fix serialization problem

JIRA: TRNSPRTPCE-237
Change-Id: I45f243091ad1ec723475350d04b373cf8580cb84

lighty/build.sh
lighty/pom.xml
lighty/src/main/assembly/resources/clean-start-controller.sh
lighty/src/main/assembly/resources/start-controller.sh
lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java
tests/transportpce_tests/1.2.1/test_utils.py
tests/transportpce_tests/2.2.1/test_utils.py

index 43a4fb7769e5961865bf7d826af6e3a66072d35b..8326b93329585cffa13921ebceb1c99bfbe6ada8 100755 (executable)
@@ -1,15 +1,6 @@
 #!/bin/sh
 
 cd $(dirname "$0")
-cd ..
 #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 12.1.x
-mvn clean install -DskipTests -Dmaven.javadoc.skip=true
-cd ../lighty
 mvn clean install -Dmaven.javadoc.skip=true
-cd  target
-unzip lighty-transportpce-12.1.0-SNAPSHOT-bin.zip
-cd ..
-rm -rf ../lighty-core
+unzip target/tpce-bin.zip -d target
index 45f2655a8b0fec109d875ee84b9f0df1a94f94ed..518ef8b638efe7878f3764f9ba242f424fde514f 100644 (file)
@@ -1,24 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright (c) 2018 Pantheon Technologies s.r.o. All Rights Reserved.
-
-  This program and the accompanying materials are made available under the
-  terms of the Eclipse Public License v1.0 which accompanies this distribution,
-  and is available at https://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<!-- Copyright (c) 2018 Pantheon Technologies s.r.o. All Rights Reserved.
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v1.0 which accompanies this distribution,
+    and is available at https://www.eclipse.org/legal/epl-v10.html -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.lighty.core</groupId>
         <artifactId>lighty-app-parent</artifactId>
-        <version>12.1.0-SNAPSHOT</version>
-        <relativePath/>
+        <version>12.1.0</version>
+        <relativePath />
     </parent>
 
-    <groupId>io.lighty.examples.controllers</groupId>
-    <artifactId>lighty-transportpce</artifactId>
-    <version>12.1.0-SNAPSHOT</version>
+    <groupId>io.lighty.controllers</groupId>
+    <artifactId>tpce</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <properties>
@@ -61,7 +60,7 @@
             <artifactId>transportpce-networkmodel</artifactId>
             <version>${transportpce.version}</version>
         </dependency>
-        <!-- TPCE Models -   END -->
+        <!-- TPCE Models - END -->
 
         <!-- TPCE bundles - BEGIN -->
         <dependency>
@@ -79,7 +78,7 @@
             <artifactId>transportpce-servicehandler</artifactId>
             <version>${transportpce.version}</version>
         </dependency>
-        <!-- TPCE bundles -   END -->
+        <!-- TPCE bundles - END -->
 
         <dependency>
             <groupId>io.lighty.modules</groupId>
         <dependency>
             <groupId>io.lighty.modules</groupId>
             <artifactId>lighty-restconf-nb-community</artifactId>
-            <exclusions>
-                <!-- FIXME: why is this exclusion needed? can we move it somewhere else? -->
-                <exclusion>
-                    <groupId>javax.ws.rs</groupId>
-                    <artifactId>javax.ws.rs-api</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
-        <dependency>
-            <groupId>io.lighty.resources</groupId>
-            <artifactId>singlenode-configuration</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.lighty.resources</groupId>
-            <artifactId>log4j-properties</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-webapp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-servlets</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.core</groupId>
-            <artifactId>jersey-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.containers</groupId>
-            <artifactId>jersey-container-jetty-http</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.inject</groupId>
-            <artifactId>jersey-hk2</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>javax.ws.rs-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-client</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
+    <build>
+        <finalName>tpce</finalName>
+    </build>
 </project>
index 5a967bce15bdce74b558630877c90af100250b22..e0866d9935661adbba155a198a8e6a9e3c8af1a0 100755 (executable)
@@ -8,4 +8,4 @@ rm -rf cache
 rm -rf target
 
 #start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.1.0-SNAPSHOT.jar
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar tpce.jar
index d0d8d2a72123f67efe92a46bb74a9cbdde0eddc3..d20baf4679f297aa5ff2d55260633d2abe1d1b35 100755 (executable)
@@ -5,4 +5,4 @@ BASEDIR=$(dirname "$0")
 cd ${BASEDIR}
 
 #start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.1.0-SNAPSHOT.jar
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar tpce.jar
index ce6950f284c7a1c3bf3a50f768e1da60e2880d0d..a9444a4dca50640cd6fe34877092d8d7a28084f7 100644 (file)
@@ -166,7 +166,8 @@ public final class TPCEUtils {
             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.$YangModuleInfoImpl.getInstance(),
             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.extension.rev131210.$YangModuleInfoImpl.getInstance(),
             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.$YangModuleInfoImpl.getInstance(),
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.$YangModuleInfoImpl.getInstance()
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.$YangModuleInfoImpl.getInstance(),
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.$YangModuleInfoImpl.getInstance()
     );
 
     public static final Set<YangModuleInfo> yangModels = Stream.concat(
index 2b565a53f0d9375afe1d31fb27c55e55a428e3b9..d6310951699607f9ed0ec694bd3964cb5de7db15 100644 (file)
@@ -70,7 +70,7 @@ def start_tpce():
         print("starting LIGHTY.IO TransportPCE build...")
         executable = os.path.join(
             os.path.dirname(os.path.realpath(__file__)),
-            "..", "..", "..", "lighty", "target", "lighty-transportpce-12.1.0-SNAPSHOT",
+            "..", "..", "..", "lighty", "target", "tpce",
             "clean-start-controller.sh")
         with open('odl.log', 'w') as outfile:
             return subprocess.Popen(
index 7afbdc1819c8777afbdc560976571471415c70b3..4d5fe3efb61369e77ded8e328713f5394c3f39fb 100644 (file)
@@ -62,7 +62,7 @@ def start_tpce():
         print("starting LIGHTY.IO TransportPCE build...")
         executable = os.path.join(
             os.path.dirname(os.path.realpath(__file__)),
-            "..", "..", "..", "lighty", "target", "lighty-transportpce-12.1.0-SNAPSHOT",
+            "..", "..", "..", "lighty", "target", "tpce",
             "clean-start-controller.sh")
         with open('odl.log', 'w') as outfile:
             return subprocess.Popen(