diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3cc8a97d8..bafda365c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: run: mvn install -DskipTests=true -B -V -Psource-quality - name: Maven test + SonarCloud if: ${{ env.SONAR_TOKEN != 0 }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + run: mvn -T1 -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.java.source=21 -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} -Dsonar.organization=${{ env.SONAR_ORGANIZATION }} @@ -55,7 +55,7 @@ jobs: -Dsonar.coverage.exclusions=**/lighty-codecs/**/* - name: Maven test no SonarCloud if: ${{ env.SONAR_TOKEN == 0 }} - run: mvn -B verify + run: mvn -T1 -B verify - name: Upload surefire test results uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh b/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh index 27c379dba5..4e65f88b28 100755 --- a/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh +++ b/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh @@ -44,7 +44,7 @@ ls -1 yangs #Run simulator for testing purpose printLine echo -e "-- Starting gNMI simulator device --\n" -java -jar ${GITHUB_WORKSPACE}/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/target/lighty-gnmi-device-simulator-21.0.0.jar -c ./simulator/example_config.json > /dev/null 2>&1 & +java -jar ${GITHUB_WORKSPACE}/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/target/lighty-gnmi-device-simulator-21.1.0-SNAPSHOT.jar -c ./simulator/example_config.json > /dev/null 2>&1 & #Add yangs into controller through REST rpc ./add_yangs_via_rpc.sh diff --git a/.github/workflows/lighty-rnc-app/simulator/Dockerfile b/.github/workflows/lighty-rnc-app/simulator/Dockerfile index 4f8ff08c0e..f1a92f4682 100644 --- a/.github/workflows/lighty-rnc-app/simulator/Dockerfile +++ b/.github/workflows/lighty-rnc-app/simulator/Dockerfile @@ -1,4 +1,4 @@ -ARG SIMULATOR_VERSION="20.1.0" +ARG SIMULATOR_VERSION="21.0.0" FROM alpine:3.20.3 as clone @@ -7,13 +7,13 @@ RUN apk add git WORKDIR /netconf-simulator RUN git clone https://github.com/PANTHEONtech/lighty-netconf-simulator.git -b $SIMULATOR_VERSION -FROM maven:3.9-eclipse-temurin-17-alpine as build +FROM maven:3.9-eclipse-temurin-21-alpine as build ARG SIMULATOR_VERSION WORKDIR /lighty-netconf-simulator COPY --from=clone /netconf-simulator/lighty-netconf-simulator /lighty-netconf-simulator RUN mvn -B install -DskipTests -FROM eclipse-temurin:17-jre-alpine +FROM eclipse-temurin:21-jre-alpine ARG SIMULATOR_VERSION WORKDIR /lighty-netconf-simulator COPY --from=build /lighty-netconf-simulator/examples/devices/lighty-network-topology-device/target/ /lighty-netconf-simulator/target diff --git a/SECURITY.md b/SECURITY.md index cf6ac99d1f..a0e4a33473 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,17 +5,17 @@ Lighty.io version contains 3 numbers representing MAJOR.MINOR.PATCH (X.Y.Z) levels. MAJOR number is mapped to major OpenDaylight release -| Lighty.io | OpenDaylight | -|-----------|-----------------| -| 20.Y.Z | Calcium (20) | -| 19.Y.Z | Potassium (19) | -| ... | | +| Lighty.io | OpenDaylight | +|-----------|--------------------| +| 21.Y.Z | Scandium (2024.09) | +| 20.Y.Z | Calcium (2024.03) | +| ... | | MINOR number is mapped to OpenDaylight service release (SR1, SR2, SR3, ..) | Lighty.io | OpenDaylight | |-----------|-----------------| -| 20.1.Z | Calcium SR1 | -| 20.2.Z | Calcium SR2 | +| 21.1.Z | Scandium SR1 | +| 21.2.Z | Scandium SR2 | | ... | | PATCH number represents Lighty.io release, usually security & bug fixes. diff --git a/lighty-applications/lighty-app-modules-config/pom.xml b/lighty-applications/lighty-app-modules-config/pom.xml index e597e153aa..15419dc15f 100644 --- a/lighty-applications/lighty-app-modules-config/pom.xml +++ b/lighty-applications/lighty-app-modules-config/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent/pom.xml diff --git a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-docker/pom.xml b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-docker/pom.xml index 74d890c900..14dbad2e97 100644 --- a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-docker/pom.xml +++ b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-docker/pom.xml @@ -14,7 +14,7 @@ io.lighty.applications.rcgnmi lighty-rcgnmi-app-docker - 21.0.0 + 21.1.0-SNAPSHOT lighty-rcgnmi @@ -94,7 +94,7 @@ io.fabric8 docker-maven-plugin - 0.42.0 + 0.45.1 diff --git a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/pom.xml b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/pom.xml index bdca75522b..3f5fdcdbc5 100644 --- a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/pom.xml +++ b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.applications.rcgnmi lighty-rcgnmi-app-module - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/pom.xml b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/pom.xml index 7001dda984..9eb1bc60eb 100644 --- a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/pom.xml +++ b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-app-parent/pom.xml io.lighty.applications.rcgnmi lighty-rcgnmi-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications.rcgnmi.app.RCgNMIApp diff --git a/lighty-applications/lighty-rcgnmi-app-aggregator/pom.xml b/lighty-applications/lighty-rcgnmi-app-aggregator/pom.xml index 648681d198..1379cab6de 100644 --- a/lighty-applications/lighty-rcgnmi-app-aggregator/pom.xml +++ b/lighty-applications/lighty-rcgnmi-app-aggregator/pom.xml @@ -12,7 +12,7 @@ io.lighty.applications.rcgnmi lighty-rcgnmi-app-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/pom.xml b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/pom.xml index ec0c20869a..6fcedf8787 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/pom.xml +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/pom.xml @@ -11,7 +11,7 @@ io.lighty.applications.rnc lighty-rnc-app-docker - 21.0.0 + 21.1.0-SNAPSHOT lighty-rnc @@ -91,7 +91,7 @@ io.fabric8 docker-maven-plugin - 0.42.0 + 0.45.1 diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app/pom.xml b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app/pom.xml index e553abcc80..bcab1f0ae0 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app/pom.xml +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app/pom.xml @@ -12,13 +12,13 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-app-parent/pom.xml io.lighty.applications.rnc lighty-rnc-app - 21.0.0 + 21.1.0-SNAPSHOT jar diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/pom.xml b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/pom.xml index ba8404a70d..68ffa6ebe9 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/pom.xml +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/pom.xml @@ -12,13 +12,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.applications.rnc lighty-rnc-module - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-applications/lighty-rnc-app-aggregator/pom.xml b/lighty-applications/lighty-rnc-app-aggregator/pom.xml index e1a26c6cb2..13cfda6513 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/pom.xml +++ b/lighty-applications/lighty-rnc-app-aggregator/pom.xml @@ -11,7 +11,7 @@ io.lighty.applications.rnc lighty-rnc-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-applications/pom.xml b/lighty-applications/pom.xml index 61d4a6625c..e0c151dd9b 100644 --- a/lighty-applications/pom.xml +++ b/lighty-applications/pom.xml @@ -11,7 +11,7 @@ io.lighty.applications lighty-applications-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-core/dependency-versions/pom.xml b/lighty-core/dependency-versions/pom.xml index a92450b38f..963b4e714b 100644 --- a/lighty-core/dependency-versions/pom.xml +++ b/lighty-core/dependency-versions/pom.xml @@ -10,7 +10,7 @@ 4.0.0 io.lighty.core dependency-versions - 21.0.0 + 21.1.0-SNAPSHOT pom ${project.groupId}:${project.artifactId} @@ -25,7 +25,7 @@ org.opendaylight.odlparent odlparent - 14.0.3 + 14.0.4 pom import @@ -34,49 +34,49 @@ org.opendaylight.aaa aaa-artifacts - 0.20.1 + 0.20.3 pom import org.opendaylight.controller controller-artifacts - 10.0.2 + 10.0.4 pom import org.opendaylight.infrautils infrautils-artifacts - 7.0.3 + 7.0.4 pom import org.opendaylight.mdsal mdsal-artifacts - 14.0.2 + 14.0.4 pom import org.opendaylight.netconf netconf-artifacts - 8.0.2 + 8.0.3 pom import org.opendaylight.yangtools yangtools-artifacts - 14.0.4 + 14.0.5 pom import org.opendaylight.bgpcep bgpcep-artifacts - 0.22.4 + 0.22.6 pom import @@ -129,7 +129,7 @@ org.junit junit-bom - 5.11.0 + 5.11.2 pom import @@ -273,7 +273,7 @@ scm:git:https://github.com/PANTHEONtech/lighty.git scm:git:https://github.com/PANTHEONtech/lighty.git https://github.com/PANTHEONtech/lighty - 21.0.0 + HEAD diff --git a/lighty-core/lighty-app-parent/pom.xml b/lighty-core/lighty-app-parent/pom.xml index 93f2f06787..d806d68c0e 100644 --- a/lighty-core/lighty-app-parent/pom.xml +++ b/lighty-core/lighty-app-parent/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-binding-parent/pom.xml b/lighty-core/lighty-binding-parent/pom.xml index 9568810e2b..b5d9b203e1 100644 --- a/lighty-core/lighty-binding-parent/pom.xml +++ b/lighty-core/lighty-binding-parent/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent @@ -49,12 +49,12 @@ org.opendaylight.yangtools yang-maven-plugin - 14.0.4 + 14.0.5 org.opendaylight.yangtools binding-codegen - 14.0.4 + 14.0.5 diff --git a/lighty-core/lighty-bom/pom.xml b/lighty-core/lighty-bom/pom.xml index 87b78cbd59..59b9d28921 100644 --- a/lighty-core/lighty-bom/pom.xml +++ b/lighty-core/lighty-bom/pom.xml @@ -10,7 +10,7 @@ 4.0.0 io.lighty.core lighty-bom - 21.0.0 + 21.1.0-SNAPSHOT pom ${project.groupId}:${project.artifactId} @@ -26,231 +26,231 @@ io.lighty.core lighty-codecs-util - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-common - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-controller - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-clustering - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-controller-guice-di - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-controller-spring-di - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models openconfig-models - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.tests integration-tests - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.tests integration-tests-aaa - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-aaa - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-jetty-server - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-netconf-sb - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-restconf-nb-community - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-openapi - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-aaa-encryption-service - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules lighty-bgp - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi lighty-gnmi-connector - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi lighty-gnmi-commons - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi lighty-gnmi-proto - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi lighty-gnmi-device-simulator - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi.southbound lighty-gnmi-sb - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models.gnmi lighty-gnmi-topology-model - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models.gnmi lighty-gnmi-yang-storage-model - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models.gnmi lighty-gnmi-certificates-storage-model - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models.gnmi lighty-gnmi-force-capabilities - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications.rcgnmi lighty-rcgnmi-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications.rcgnmi lighty-rcgnmi-app-module - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications.rnc lighty-rnc-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications.rnc lighty-rnc-module - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.applications lighty-app-modules-config - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.kit.examples.controllers lighty-community-aaa-restconf-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.kit.examples.controllers lighty-community-restconf-netconf-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.kit.examples.controllers lighty-bgp-community-restconf-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.core lighty-controller-springboot - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.kit.examples.controllers lighty-guice-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.kit.examples.controllers lighty-community-restconf-actions-app - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.resources controller-application-assembly - 21.0.0 + 21.1.0-SNAPSHOT provided io.lighty.resources singlenode-configuration - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.resources start-script - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.models.test lighty-test-models - 21.0.0 + 21.1.0-SNAPSHOT test io.lighty.models.test lighty-toaster - 21.0.0 + 21.1.0-SNAPSHOT test io.lighty.resources log4j2-config - 21.0.0 + 21.1.0-SNAPSHOT test @@ -291,7 +291,7 @@ scm:git:https://github.com/PANTHEONtech/lighty.git scm:git:https://github.com/PANTHEONtech/lighty.git https://github.com/PANTHEONtech/lighty - 21.0.0 + HEAD diff --git a/lighty-core/lighty-clustering/pom.xml b/lighty-core/lighty-clustering/pom.xml index 9570513eaa..5c3940ff00 100644 --- a/lighty-core/lighty-clustering/pom.xml +++ b/lighty-core/lighty-clustering/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-codecs-util/pom.xml b/lighty-core/lighty-codecs-util/pom.xml index 01fd04293a..26f0dffeac 100644 --- a/lighty-core/lighty-codecs-util/pom.xml +++ b/lighty-core/lighty-codecs-util/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-common/pom.xml b/lighty-core/lighty-common/pom.xml index 384eb76fe7..105400ef95 100644 --- a/lighty-core/lighty-common/pom.xml +++ b/lighty-core/lighty-common/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-controller-guice-di/pom.xml b/lighty-core/lighty-controller-guice-di/pom.xml index ab861912ce..4fb11ec3cb 100644 --- a/lighty-core/lighty-controller-guice-di/pom.xml +++ b/lighty-core/lighty-controller-guice-di/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java index a15282740f..dda8c931d5 100644 --- a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java +++ b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java @@ -18,6 +18,7 @@ import io.lighty.core.controller.impl.config.ControllerConfiguration; import io.lighty.core.controller.impl.util.ControllerConfigUtils; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; @@ -50,7 +51,7 @@ public void init() throws ExecutionException, InterruptedException, Configuratio public void shutdown() { try { if (lightyController != null) { - lightyController.shutdown(); + lightyController.shutdown(60, TimeUnit.SECONDS); } } catch (Exception e) { LOG.error("Shutdown of LightyController failed", e); diff --git a/lighty-core/lighty-controller-spring-di/pom.xml b/lighty-core/lighty-controller-spring-di/pom.xml index 2f0fdab5d9..165ee83ec9 100644 --- a/lighty-core/lighty-controller-spring-di/pom.xml +++ b/lighty-core/lighty-controller-spring-di/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent @@ -27,7 +27,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.3.5 pom import diff --git a/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java b/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java index 14982089c5..c06332f26f 100644 --- a/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java +++ b/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java @@ -18,6 +18,7 @@ import io.lighty.core.controller.impl.util.ControllerConfigUtils; import java.util.Collections; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Test; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; @@ -198,7 +199,7 @@ public LightyController initLightyController() throws LightyLaunchException, Int public void shutdownLightyController(LightyController lightyController) throws LightyLaunchException { try { LOG.info("Shutting down LightyController ..."); - lightyController.shutdown(); + lightyController.shutdown(60, TimeUnit.SECONDS); } catch (Exception e) { throw new LightyLaunchException("Could not shutdown LightyController", e); } diff --git a/lighty-core/lighty-controller/README.md b/lighty-core/lighty-controller/README.md index c6072af139..e7283bd00f 100644 --- a/lighty-core/lighty-controller/README.md +++ b/lighty-core/lighty-controller/README.md @@ -17,7 +17,7 @@ To use Lighty controller in your project: io.lighty.core lighty-controller - 21.0.0 + 21.1.0-SNAPSHOT ``` diff --git a/lighty-core/lighty-controller/pom.xml b/lighty-core/lighty-controller/pom.xml index c725395c8d..da15f53cc4 100644 --- a/lighty-core/lighty-controller/pom.xml +++ b/lighty-core/lighty-controller/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-parent diff --git a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/AbstractLightyModule.java b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/AbstractLightyModule.java index 4d7bc92f01..7162691e1e 100644 --- a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/AbstractLightyModule.java +++ b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/AbstractLightyModule.java @@ -140,7 +140,9 @@ public void startBlocking() throws InterruptedException { * Start and block until shutdown is requested. * @param initFinishCallback callback that will be called after start is completed. * @throws InterruptedException thrown in case module initialization fails. + * @deprecated Use @{@code start.get()} instead in case you want blocking start. */ + @Deprecated(forRemoval = true) public void startBlocking(final Consumer initFinishCallback) throws InterruptedException { Futures.addCallback(start(), new FutureCallback() { @Override @@ -167,7 +169,6 @@ public synchronized ListenableFuture shutdown() { synchronized (AbstractLightyModule.this) { LOG.debug("Starting shutdown procedure of LightyModule {}.", this.getClass().getSimpleName()); final boolean stopResult = stopProcedure(); - this.shutdownLatch.countDown(); this.running = false; LOG.info("LightyModule {} shutdown complete.", this.getClass().getSimpleName()); return stopResult; @@ -207,4 +208,21 @@ public final boolean shutdown(final long duration, final TimeUnit unit) { } return false; } + + /** + * Invoke blocking shutdown after blocking start. + * + *

+ * Release CountDownLatch locking this thread and shutdown. + * @param duration duration to wait for shutdown to complete + * @param unit {@link TimeUnit} of {@code duration} + * @return {@code boolean} indicating shutdown sucess + * @deprecated Use {@code shutdown()} or {@code shutdown(duration, unit)} instead in case you want + * blocking shutdown. + */ + @Deprecated(forRemoval = true) + public final boolean shutdownBlocking(final long duration, final TimeUnit unit) { + shutdownLatch.countDown(); + return shutdown(duration, unit); + } } diff --git a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyModule.java b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyModule.java index c88b5458e8..add4da7bbf 100644 --- a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyModule.java +++ b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyModule.java @@ -30,7 +30,9 @@ public interface LightyModule { * Start and block until shutdown is requested. * * @throws InterruptedException thrown in case module initialization fails. + * @deprecated Use @{@code start.get()} instead in case you want blocking start. */ + @Deprecated(forRemoval = true) void startBlocking() throws InterruptedException; /** diff --git a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/api/LightyModuleTest.java b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/api/LightyModuleTest.java index dd9c7e85ee..c457489b03 100644 --- a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/api/LightyModuleTest.java +++ b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/api/LightyModuleTest.java @@ -7,13 +7,9 @@ */ package io.lighty.core.controller.api; -import com.google.common.util.concurrent.SettableFuture; import io.lighty.core.controller.impl.LightyControllerBuilder; import io.lighty.core.controller.impl.util.ControllerConfigUtils; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -24,9 +20,9 @@ import org.testng.annotations.Test; public class LightyModuleTest { - private static long MAX_INIT_TIMEOUT = 15000L; - private static long MAX_SHUTDOWN_TIMEOUT = 15000L; - private static long SLEEP_AFTER_SHUTDOWN_TIMEOUT = 800L; + private static final long MAX_INIT_TIMEOUT = 15000L; + private static final long MAX_SHUTDOWN_TIMEOUT = 15000L; + private ExecutorService executorService; private LightyModule moduleUnderTest; @@ -55,7 +51,7 @@ public void shutdownExecutor() { @Test public void testStartShutdown() throws Exception { this.moduleUnderTest = getModuleUnderTest(getExecutorService()); - startLightyModuleAndFailIfTimedOut(); + this.moduleUnderTest.start().get(MAX_INIT_TIMEOUT, TimeUnit.MILLISECONDS); Mockito.verify(executorService, Mockito.times(1)).execute(Mockito.any()); this.moduleUnderTest.shutdown(MAX_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); Mockito.verify(executorService, Mockito.times(2)).execute(Mockito.any()); @@ -71,10 +67,9 @@ public void testStartStop_whenAlreadyStartedStopped() throws Exception { Assert.fail("Init timed out.", e); } Mockito.verify(executorService, Mockito.times(1)).execute(Mockito.any()); - this.moduleUnderTest.shutdown(); + this.moduleUnderTest.shutdown(MAX_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); Mockito.verify(executorService, Mockito.times(2)).execute(Mockito.any()); - Thread.sleep(SLEEP_AFTER_SHUTDOWN_TIMEOUT); - this.moduleUnderTest.shutdown(); + this.moduleUnderTest.shutdown(MAX_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); Mockito.verify(executorService, Mockito.times(2)).execute(Mockito.any()); } @@ -82,73 +77,6 @@ public void testStartStop_whenAlreadyStartedStopped() throws Exception { public void testShutdown_before_start() throws Exception { this.moduleUnderTest = getModuleUnderTest(getExecutorService()); this.moduleUnderTest.shutdown(MAX_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); - Mockito.verify(executorService, Mockito.times(0)).execute(Mockito.any()); } - - @Test - public void testStartBlocking_and_shutdown() throws Exception { - this.moduleUnderTest = getModuleUnderTest(getExecutorService()); - startStopBlocking(this.moduleUnderTest instanceof AbstractLightyModule); - } - - @Test - public void testStartStopBlocking() throws Exception { - this.moduleUnderTest = getModuleUnderTest(getExecutorService()); - startStopBlocking(false); - } - - private void startStopBlocking(final boolean isAbstract) throws Exception { - Future startBlockingFuture; - if (isAbstract) { - startBlockingFuture = startBlockingOnLightyModuleAbstractClass(); - } else { - startBlockingFuture = startBlockingOnLightyModuleInterface(); - } - //test if thread which invokes startBlocking method is still running (it should be) - Assert.assertFalse(startBlockingFuture.isDone()); - - this.moduleUnderTest.shutdown(MAX_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); - try { - //test if thread which invokes startBlocking method is done after shutdown was called - //(after small timeout due to synchronization); - startBlockingFuture.get(SLEEP_AFTER_SHUTDOWN_TIMEOUT, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - Assert.fail("Waiting for finish of startBlocking method thread timed out. you may consider to adjust" - + "timeout by overriding SLEEP_AFTER_SHUTDOWN_TIMEOUT", e); - } - - Mockito.verify(executorService, Mockito.times(2)).execute(Mockito.any()); - } - - private Future startBlockingOnLightyModuleAbstractClass() throws ExecutionException, InterruptedException { - SettableFuture initDoneFuture = SettableFuture.create(); - Future startFuture = Executors.newSingleThreadExecutor().submit(() -> { - ((AbstractLightyModule)this.moduleUnderTest).startBlocking(initDoneFuture::set); - return true; - }); - try { - initDoneFuture.get(MAX_INIT_TIMEOUT, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - Assert.fail("Init timed out.", e); - } - return startFuture; - } - - private Future startBlockingOnLightyModuleInterface() throws InterruptedException { - Future startFuture = Executors.newSingleThreadExecutor().submit(() -> { - this.moduleUnderTest.startBlocking(); - return true; - }); - Thread.sleep(MAX_INIT_TIMEOUT); - return startFuture; - } - - private void startLightyModuleAndFailIfTimedOut() throws ExecutionException, InterruptedException { - try { - this.moduleUnderTest.start().get(MAX_INIT_TIMEOUT, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - Assert.fail("Init timed out.", e); - } - } } diff --git a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/datainit/DataInitTest.java b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/datainit/DataInitTest.java index c85c3a5031..1b19ebe952 100644 --- a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/datainit/DataInitTest.java +++ b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/datainit/DataInitTest.java @@ -25,8 +25,6 @@ import org.testng.annotations.Test; public class DataInitTest { - // value from .xml/.json file - private static int EXPECTED_DARKNESS_FACTOR = 200; private static final String PATH_TO_JSON_INIT_CONFIG = "/DataInitJsonConfig.json"; private static final String PATH_TO_XML_INIT_CONFIG = "/DataInitXmlConfig.json"; private static final String PATH_TO_INVALID_PATH_TO_INIT_CONFIG = "/DataInitInvalidInitPathConfig.json"; @@ -86,7 +84,6 @@ public void testInvalidInitFilePath() throws Exception { .build(); boolean result = lightyController.start().get(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); Assert.assertEquals(result,false); - } @Test @@ -114,10 +111,11 @@ public void shutdownLighty() { lightyController.shutdown(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); } - private ToasterListener registerToasterListener(DataBroker dataBroker, - InstanceIdentifier instanceIdentifier, - CountDownLatch listenerLatch) { - ToasterListener listener = new ToasterListener(listenerLatch, EXPECTED_DARKNESS_FACTOR); + private ToasterListener registerToasterListener(final DataBroker dataBroker, + final InstanceIdentifier instanceIdentifier, final CountDownLatch listenerLatch) { + // value from .xml/.json file + final int expectedDarknessFactor = 200; + ToasterListener listener = new ToasterListener(listenerLatch, expectedDarknessFactor); dataBroker.registerDataTreeChangeListener( DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, instanceIdentifier), listener); diff --git a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTetst.java b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTest.java similarity index 97% rename from lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTetst.java rename to lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTest.java index 7ae4d57a74..f238d05fb8 100644 --- a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTetst.java +++ b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerMountPointTest.java @@ -17,7 +17,7 @@ import org.testng.Assert; import org.testng.annotations.Test; -public class LightyControllerMountPointTetst extends LightyControllerTestBase { +public class LightyControllerMountPointTest extends LightyControllerTestBase { @Test public void domMountPointServiceTest() throws Exception { diff --git a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/util/FileToDatastoreUtilsTest.java b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/util/FileToDatastoreUtilsTest.java index 806c88a6ff..8611d5b56d 100644 --- a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/util/FileToDatastoreUtilsTest.java +++ b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/util/FileToDatastoreUtilsTest.java @@ -40,7 +40,6 @@ import org.testng.annotations.Test; public class FileToDatastoreUtilsTest { - private static final String INITIAL_CONTAINER_PATH = "/data/container-value-1.json"; private static final String CASE_CONTAINER_PATH = "/data/case-container-value.json"; private static final String OVERRIDE_CONTAINER_PATH = "/data/container-value-2.xml"; @@ -69,7 +68,7 @@ public class FileToDatastoreUtilsTest { NodeIdentifier.create(SampleContainer.QNAME), NodeIdentifier.create(YangModuleInfoImpl.qnameOf("value"))); - private static final long TIMEOUT_MILLIS = 20_000; + private static final long TIMEOUT_MILLIS = 60_000; private LightyController lightyController; private DataBroker dataBroker; diff --git a/lighty-core/lighty-minimal-parent/pom.xml b/lighty-core/lighty-minimal-parent/pom.xml index b4275ced55..ba4085ff16 100644 --- a/lighty-core/lighty-minimal-parent/pom.xml +++ b/lighty-core/lighty-minimal-parent/pom.xml @@ -10,7 +10,7 @@ 4.0.0 io.lighty.core lighty-minimal-parent - 21.0.0 + 21.1.0-SNAPSHOT pom ${project.groupId}:${project.artifactId} @@ -29,14 +29,14 @@ io.lighty.core dependency-versions - 21.0.0 + 21.1.0-SNAPSHOT pom import io.lighty.core lighty-bom - 21.0.0 + 21.1.0-SNAPSHOT pom import @@ -103,7 +103,7 @@ scm:git:https://github.com/PANTHEONtech/lighty.git scm:git:https://github.com/PANTHEONtech/lighty.git https://github.com/PANTHEONtech/lighty - 21.0.0 + HEAD diff --git a/lighty-core/lighty-parent/pom.xml b/lighty-core/lighty-parent/pom.xml index 0fcba67445..6c60deead0 100644 --- a/lighty-core/lighty-parent/pom.xml +++ b/lighty-core/lighty-parent/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-minimal-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-minimal-parent @@ -116,12 +116,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.0 + 3.5.1 org.apache.maven.plugins maven-surefire-plugin - 3.5.0 + 3.5.1 1 true @@ -171,7 +171,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.10.0 + 3.10.1 true @@ -203,14 +203,14 @@ org.opendaylight.odlparent checkstyle - 14.0.3 + 14.0.4 com.github.spotbugs spotbugs-maven-plugin - 4.8.6.1 + 4.8.6.4 com.github.spotbugs @@ -220,7 +220,7 @@ org.opendaylight.odlparent spotbugs - 14.0.3 + 14.0.4 diff --git a/lighty-core/pom.xml b/lighty-core/pom.xml index 44dbb2e144..a0a957462a 100644 --- a/lighty-core/pom.xml +++ b/lighty-core/pom.xml @@ -11,7 +11,7 @@ io.lighty.core lighty-core-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-examples/README.md b/lighty-examples/README.md index 12b31c5973..0a0203f8c9 100644 --- a/lighty-examples/README.md +++ b/lighty-examples/README.md @@ -15,7 +15,7 @@ ODL core services represent MD-SAL layer, controller, DataStore, global schema c io.lighty.core.parents lighty-dependency-artifacts - 21.0.0 + 21.1.0-SNAPSHOT pom import diff --git a/lighty-examples/lighty-bgp-community-restconf-app/pom.xml b/lighty-examples/lighty-bgp-community-restconf-app/pom.xml index 5eefa37cda..0dae77d1d4 100644 --- a/lighty-examples/lighty-bgp-community-restconf-app/pom.xml +++ b/lighty-examples/lighty-bgp-community-restconf-app/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-app-parent/pom.xml io.lighty.kit.examples.controllers lighty-bgp-community-restconf-app - 21.0.0 + 21.1.0-SNAPSHOT jar diff --git a/lighty-examples/lighty-community-aaa-restconf-app/pom.xml b/lighty-examples/lighty-community-aaa-restconf-app/pom.xml index d08f03c9ba..68b77b647e 100644 --- a/lighty-examples/lighty-community-aaa-restconf-app/pom.xml +++ b/lighty-examples/lighty-community-aaa-restconf-app/pom.xml @@ -12,13 +12,13 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-app-parent io.lighty.kit.examples.controllers lighty-community-aaa-restconf-app - 21.0.0 + 21.1.0-SNAPSHOT jar diff --git a/lighty-examples/lighty-community-restconf-actions-app/pom.xml b/lighty-examples/lighty-community-restconf-actions-app/pom.xml index 025fa53574..35ba1c989a 100644 --- a/lighty-examples/lighty-community-restconf-actions-app/pom.xml +++ b/lighty-examples/lighty-community-restconf-actions-app/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-app-parent @@ -50,7 +50,7 @@ io.lighty.models.test example-data-center - 21.0.0 + 21.1.0-SNAPSHOT compile diff --git a/lighty-examples/lighty-community-restconf-netconf-app/README.md b/lighty-examples/lighty-community-restconf-netconf-app/README.md index 2fda6491e2..ba8bf03d79 100644 --- a/lighty-examples/lighty-community-restconf-netconf-app/README.md +++ b/lighty-examples/lighty-community-restconf-netconf-app/README.md @@ -21,12 +21,12 @@ build the project: ```mvn clean install``` ### Start this demo example * build the project using ```mvn clean install``` * go to target directory ```cd lighty-examples/lighty-community-restconf-netconf-app/target``` -* unzip example application bundle ```unzip lighty-community-restconf-netconf-app-21.0.0-bin.zip``` -* go to unzipped application directory ```cd lighty-community-restconf-netconf-app-21.0.0``` -* start controller example controller application ```java -jar lighty-community-restconf-netconf-app-21.0.0.jar``` +* unzip example application bundle ```unzip lighty-community-restconf-netconf-app-21.1.0-SNAPSHOT-bin.zip``` +* go to unzipped application directory ```cd lighty-community-restconf-netconf-app-21.1.0-SNAPSHOT``` +* start controller example controller application ```java -jar lighty-community-restconf-netconf-app-21.1.0-SNAPSHOT.jar``` ### Test example application -Once example application has been started using command ```java -jar lighty-community-restconf-netconf-app-21.0.0.jar``` +Once example application has been started using command ```java -jar lighty-community-restconf-netconf-app-21.1.0-SNAPSHOT.jar``` RESTCONF web interface is available at URL ```http://localhost:8888/restconf/*``` ##### URLs to start with @@ -42,7 +42,7 @@ URLs for OpenApi: https://datatracker.ietf.org/doc/html/rfc8040 ### Use custom config files There are two separated config files: for NETCONF SBP single node and for cluster. -`java -jar lighty-community-restconf-netconf-app-21.0.0.jar /path/to/singleNodeConfig.json` +`java -jar lighty-community-restconf-netconf-app-21.1.0-SNAPSHOT.jar /path/to/singleNodeConfig.json` Example configuration for single node is [here](src/main/assembly/resources/sampleConfigSingleNode.json) diff --git a/lighty-examples/lighty-community-restconf-netconf-app/pom.xml b/lighty-examples/lighty-community-restconf-netconf-app/pom.xml index af669a9dcc..3babf33a58 100644 --- a/lighty-examples/lighty-community-restconf-netconf-app/pom.xml +++ b/lighty-examples/lighty-community-restconf-netconf-app/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-app-parent diff --git a/lighty-examples/lighty-controller-springboot-netconf/README.md b/lighty-examples/lighty-controller-springboot-netconf/README.md index d0dbd8eba4..4e19ad8dc3 100644 --- a/lighty-examples/lighty-controller-springboot-netconf/README.md +++ b/lighty-examples/lighty-controller-springboot-netconf/README.md @@ -46,7 +46,7 @@ mvn spring-boot:run or ``` -java -jar target/lighty-controller-springboot-21.0.0.jar +java -jar target/lighty-controller-springboot-21.1.0-SNAPSHOT.jar ``` or in any IDE, run main in diff --git a/lighty-examples/lighty-controller-springboot-netconf/pom.xml b/lighty-examples/lighty-controller-springboot-netconf/pom.xml index 99fd5099a6..fdefcb97a6 100644 --- a/lighty-examples/lighty-controller-springboot-netconf/pom.xml +++ b/lighty-examples/lighty-controller-springboot-netconf/pom.xml @@ -11,13 +11,13 @@ org.springframework.boot spring-boot-starter-parent - 3.3.4 + 3.3.5 io.lighty.core lighty-controller-springboot - 21.0.0 + 21.1.0-SNAPSHOT jar Demo lighty.io project for SpringBoot @@ -25,7 +25,7 @@ UTF-8 UTF-8 true - 17 + 21 @@ -33,14 +33,14 @@ io.lighty.core lighty-bom - 21.0.0 + 21.1.0-SNAPSHOT pom import io.lighty.core dependency-versions - 21.0.0 + 21.1.0-SNAPSHOT pom import @@ -78,7 +78,7 @@ org.casbin jcasbin - 1.55.0 + 1.71.0 @@ -124,7 +124,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.0 + 3.5.1 1 true @@ -137,8 +137,4 @@ - - - 21.0.0 - diff --git a/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/NetconfDeviceRestService.java b/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/NetconfDeviceRestService.java index 8ff93141d8..1e910f20f8 100644 --- a/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/NetconfDeviceRestService.java +++ b/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/NetconfDeviceRestService.java @@ -29,8 +29,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.credentials.credentials.LoginPwUnencryptedBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencryptedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.credentials.credentials.LoginPwUnencryptedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencryptedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.NetconfNodeAugmentBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.netconf.node.augment.NetconfNodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; diff --git a/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/dto/NetconfDeviceResponse.java b/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/dto/NetconfDeviceResponse.java index bf25fd4635..32f4b0a16c 100644 --- a/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/dto/NetconfDeviceResponse.java +++ b/lighty-examples/lighty-controller-springboot-netconf/src/main/java/io/lighty/core/controller/springboot/rest/dto/NetconfDeviceResponse.java @@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.ConnectionOper.ConnectionStatus; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.ConnectionOper.ConnectionStatus; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.NetconfNodeAugment; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; diff --git a/lighty-examples/lighty-gnmi-community-restconf-app/README.md b/lighty-examples/lighty-gnmi-community-restconf-app/README.md index 7a5a26635c..86ae208945 100644 --- a/lighty-examples/lighty-gnmi-community-restconf-app/README.md +++ b/lighty-examples/lighty-gnmi-community-restconf-app/README.md @@ -43,22 +43,22 @@ cd lighty-examples/lighty-gnmi-community-restconf-app ### Start RCgNMI controller app Unzip lighty-rcgnmi-app to current location ``` -unzip ../../lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/target/lighty-rcgnmi-app-21.0.0-bin.zip +unzip ../../lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app/target/lighty-rcgnmi-app-21.1.0-SNAPSHOT-bin.zip ``` Start application with pre-prepared configuration [example_config.json](example_config.json). ``` -java -jar lighty-rcgnmi-app-21.0.0/lighty-rcgnmi-app-21.0.0.jar -c example_config.json +java -jar lighty-rcgnmi-app-21.1.0-SNAPSHOT/lighty-rcgnmi-app-21.1.0-SNAPSHOT.jar -c example_config.json ``` ### Start lighty.io gNMI device simulator Unzip gNMI simulator app to current folder. ``` -unzip ../../lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/target/lighty-gnmi-device-simulator-21.0.0-bin.zip +unzip ../../lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/target/lighty-gnmi-device-simulator-21.1.0-SNAPSHOT-bin.zip ``` Start the application with pre-prepared configuration [simulator_config.json](simulator/simulator_config.json) ``` -java -jar lighty-gnmi-device-simulator-21.0.0/lighty-gnmi-device-simulator-21.0.0.jar -c simulator/simulator_config.json +java -jar lighty-gnmi-device-simulator-21.1.0-SNAPSHOT/lighty-gnmi-device-simulator-21.1.0-SNAPSHOT.jar -c simulator/simulator_config.json ``` ### Add client certificates to lighty.io gNMI keystore diff --git a/lighty-examples/lighty-guice-app/pom.xml b/lighty-examples/lighty-guice-app/pom.xml index 72775c3d13..40de835873 100644 --- a/lighty-examples/lighty-guice-app/pom.xml +++ b/lighty-examples/lighty-guice-app/pom.xml @@ -11,7 +11,7 @@ lighty-app-parent io.lighty.core - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-app-parent/pom.xml diff --git a/lighty-examples/pom.xml b/lighty-examples/pom.xml index 8f71e77a7c..380350bc3c 100644 --- a/lighty-examples/pom.xml +++ b/lighty-examples/pom.xml @@ -11,7 +11,7 @@ io.lighty.kit.examples example-applications-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-models/README.md b/lighty-models/README.md index c463604f57..2ce5a3903c 100644 --- a/lighty-models/README.md +++ b/lighty-models/README.md @@ -56,7 +56,7 @@ my-model/pom.xml io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/lighty-gnmi-certificates-storage-model/pom.xml b/lighty-models/lighty-gnmi-models/lighty-gnmi-certificates-storage-model/pom.xml index cdf43aa825..499ef15d28 100644 --- a/lighty-models/lighty-gnmi-models/lighty-gnmi-certificates-storage-model/pom.xml +++ b/lighty-models/lighty-gnmi-models/lighty-gnmi-certificates-storage-model/pom.xml @@ -13,12 +13,12 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/pom.xml io.lighty.models.gnmi lighty-gnmi-certificates-storage-model - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/lighty-gnmi-force-capabilities/pom.xml b/lighty-models/lighty-gnmi-models/lighty-gnmi-force-capabilities/pom.xml index d06efdc85c..6c4ee8aeca 100644 --- a/lighty-models/lighty-gnmi-models/lighty-gnmi-force-capabilities/pom.xml +++ b/lighty-models/lighty-gnmi-models/lighty-gnmi-force-capabilities/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/pom.xml io.lighty.models.gnmi lighty-gnmi-force-capabilities - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/lighty-gnmi-topology-model/pom.xml b/lighty-models/lighty-gnmi-models/lighty-gnmi-topology-model/pom.xml index f79d316c7f..72711e8cc2 100644 --- a/lighty-models/lighty-gnmi-models/lighty-gnmi-topology-model/pom.xml +++ b/lighty-models/lighty-gnmi-models/lighty-gnmi-topology-model/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/pom.xml io.lighty.models.gnmi lighty-gnmi-topology-model - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/lighty-gnmi-yang-storage-model/pom.xml b/lighty-models/lighty-gnmi-models/lighty-gnmi-yang-storage-model/pom.xml index 559da587ad..ede9e6a106 100644 --- a/lighty-models/lighty-gnmi-models/lighty-gnmi-yang-storage-model/pom.xml +++ b/lighty-models/lighty-gnmi-models/lighty-gnmi-yang-storage-model/pom.xml @@ -13,12 +13,12 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/pom.xml io.lighty.models.gnmi lighty-gnmi-yang-storage-model - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/lighty-gnoi-sonic-yang-model/pom.xml b/lighty-models/lighty-gnmi-models/lighty-gnoi-sonic-yang-model/pom.xml index 0c6965157b..d924edcfd6 100644 --- a/lighty-models/lighty-gnmi-models/lighty-gnoi-sonic-yang-model/pom.xml +++ b/lighty-models/lighty-gnmi-models/lighty-gnoi-sonic-yang-model/pom.xml @@ -11,12 +11,12 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/pom.xml io.lighty.models.gnmi lighty-gnoi-sonic-yang-model - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-models/lighty-gnmi-models/pom.xml b/lighty-models/lighty-gnmi-models/pom.xml index 2c945596eb..f3f1cee28c 100644 --- a/lighty-models/lighty-gnmi-models/pom.xml +++ b/lighty-models/lighty-gnmi-models/pom.xml @@ -12,7 +12,7 @@ io.lighty.models.gnmi lighty-gnmi-models - 21.0.0 + 21.1.0-SNAPSHOT pom ${project.groupId}:${project.artifactId} diff --git a/lighty-models/openconfig-models/pom.xml b/lighty-models/openconfig-models/pom.xml index ec0594cfc6..172dda1d09 100644 --- a/lighty-models/openconfig-models/pom.xml +++ b/lighty-models/openconfig-models/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-binding-parent diff --git a/lighty-models/pom.xml b/lighty-models/pom.xml index 0e9f29c194..650fb3da1d 100644 --- a/lighty-models/pom.xml +++ b/lighty-models/pom.xml @@ -11,7 +11,7 @@ io.lighty.models lighty-models-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-models/test/lighty-example-data-center/pom.xml b/lighty-models/test/lighty-example-data-center/pom.xml index 388f3e4cec..eec0d2acc8 100644 --- a/lighty-models/test/lighty-example-data-center/pom.xml +++ b/lighty-models/test/lighty-example-data-center/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/ diff --git a/lighty-models/test/lighty-test-models/pom.xml b/lighty-models/test/lighty-test-models/pom.xml index 4970cadf33..ed1fc65164 100644 --- a/lighty-models/test/lighty-test-models/pom.xml +++ b/lighty-models/test/lighty-test-models/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/ diff --git a/lighty-models/test/lighty-toaster/pom.xml b/lighty-models/test/lighty-toaster/pom.xml index e2ba09a426..c7fa1f5284 100644 --- a/lighty-models/test/lighty-toaster/pom.xml +++ b/lighty-models/test/lighty-toaster/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-binding-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-binding-parent/ diff --git a/lighty-models/test/pom.xml b/lighty-models/test/pom.xml index aa3cf5bb7c..977d2c777b 100644 --- a/lighty-models/test/pom.xml +++ b/lighty-models/test/pom.xml @@ -11,7 +11,7 @@ io.lighty.models.test lighty-models-test-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-modules/integration-tests-aaa/pom.xml b/lighty-modules/integration-tests-aaa/pom.xml index 52f7e373e1..9bf399d5ea 100644 --- a/lighty-modules/integration-tests-aaa/pom.xml +++ b/lighty-modules/integration-tests-aaa/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/integration-tests/pom.xml b/lighty-modules/integration-tests/pom.xml index 69d25efbc0..ece16deefd 100644 --- a/lighty-modules/integration-tests/pom.xml +++ b/lighty-modules/integration-tests/pom.xml @@ -11,7 +11,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/CallhomePluginTest.java b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/CallhomePluginTest.java index e16860e71e..c9a86b7d61 100644 --- a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/CallhomePluginTest.java +++ b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/CallhomePluginTest.java @@ -20,16 +20,12 @@ import java.net.Socket; import java.net.SocketAddress; import java.util.concurrent.TimeUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @Test public class CallhomePluginTest { - - private static final Logger LOG = LoggerFactory.getLogger(CallhomePluginTest.class); public static final long SHUTDOWN_TIMEOUT_MILLIS = 60_000; private LightyController lightyController; @@ -47,7 +43,6 @@ public void beforeClass() throws ConfigurationException { NetconfConfigUtils.injectServicesToTopologyConfig(configuration, lightyController.getServices()); netconfPlugin = NetconfCallhomePluginBuilder.from(configuration, lightyController.getServices(), restConfConfig.getInetAddress().getHostAddress(), restConfConfig.getHttpPort()).build(); - } @AfterClass @@ -73,5 +68,4 @@ public void testStart() throws Exception { socket.connect(endpoint); } } - } diff --git a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/TopologyPluginsTest.java b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/TopologyPluginsTest.java index 8d6955f8d4..f0f7056490 100644 --- a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/TopologyPluginsTest.java +++ b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/TopologyPluginsTest.java @@ -33,9 +33,9 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.credentials.Credentials; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.credentials.credentials.LoginPwUnencryptedBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240611.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencryptedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.credentials.Credentials; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.credentials.credentials.LoginPwUnencryptedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev241009.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencryptedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.NetconfNodeAugment; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.NetconfNodeAugmentBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240911.netconf.node.augment.NetconfNode; diff --git a/lighty-modules/lighty-aaa-aggregator/lighty-aaa-encryption-service/pom.xml b/lighty-modules/lighty-aaa-aggregator/lighty-aaa-encryption-service/pom.xml index 924c6eb8c2..b8fe518b70 100644 --- a/lighty-modules/lighty-aaa-aggregator/lighty-aaa-encryption-service/pom.xml +++ b/lighty-modules/lighty-aaa-aggregator/lighty-aaa-encryption-service/pom.xml @@ -11,7 +11,7 @@ lighty-parent io.lighty.core - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml diff --git a/lighty-modules/lighty-aaa-aggregator/lighty-aaa/pom.xml b/lighty-modules/lighty-aaa-aggregator/lighty-aaa/pom.xml index 12dcbbdda5..759f193904 100644 --- a/lighty-modules/lighty-aaa-aggregator/lighty-aaa/pom.xml +++ b/lighty-modules/lighty-aaa-aggregator/lighty-aaa/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml diff --git a/lighty-modules/lighty-aaa-aggregator/lighty-aaa/src/test/java/io/lighty/aaa/ShiroInitializationTest.java b/lighty-modules/lighty-aaa-aggregator/lighty-aaa/src/test/java/io/lighty/aaa/ShiroInitializationTest.java index b9380fdcbe..641b6e0d4a 100644 --- a/lighty-modules/lighty-aaa-aggregator/lighty-aaa/src/test/java/io/lighty/aaa/ShiroInitializationTest.java +++ b/lighty-modules/lighty-aaa-aggregator/lighty-aaa/src/test/java/io/lighty/aaa/ShiroInitializationTest.java @@ -18,7 +18,7 @@ import io.lighty.server.LightyServerBuilder; import java.net.InetSocketAddress; import java.util.Optional; -import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opendaylight.aaa.api.CredentialAuth; @@ -81,11 +81,11 @@ public void init() { } @AfterMethod - public void tearDown() throws ExecutionException, InterruptedException { + public void tearDown() { if (aaaLighty != null) { // Stop the object and ensure that stopping was successful assertTrue(aaaLighty.stopProcedure()); - assertTrue(aaaLighty.shutdown().get()); + assertTrue(aaaLighty.shutdown(60, TimeUnit.SECONDS)); } } diff --git a/lighty-modules/lighty-aaa-aggregator/pom.xml b/lighty-modules/lighty-aaa-aggregator/pom.xml index 9d78798913..c9b3a8cd6a 100644 --- a/lighty-modules/lighty-aaa-aggregator/pom.xml +++ b/lighty-modules/lighty-aaa-aggregator/pom.xml @@ -11,7 +11,7 @@ io.lighty.modules lighty-aaa-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-modules/lighty-bgp/README.md b/lighty-modules/lighty-bgp/README.md index 404827af50..85920674e9 100644 --- a/lighty-modules/lighty-bgp/README.md +++ b/lighty-modules/lighty-bgp/README.md @@ -11,7 +11,7 @@ To use lighty BGP plugin in your project: io.lighty.modules lighty-bgp - 21.0.0 + 21.1.0-SNAPSHOT ``` * Initialize and start BgpModule instance: diff --git a/lighty-modules/lighty-bgp/pom.xml b/lighty-modules/lighty-bgp/pom.xml index aa0edc11ac..fca0747c8b 100644 --- a/lighty-modules/lighty-bgp/pom.xml +++ b/lighty-modules/lighty-bgp/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent/pom.xml io.lighty.modules lighty-bgp - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-commons/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-commons/pom.xml index f12cdbba1d..fbc9632926 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-commons/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-commons/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.modules.gnmi lighty-gnmi-commons - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-connector/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-connector/pom.xml index 52eca158b5..0771dba92b 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-connector/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-connector/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/README.md b/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/README.md index b967fd0128..4934f1d788 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/README.md +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/README.md @@ -8,7 +8,7 @@ This simulator provides gNMI device driven by gNMI proto files, with datastore d io.lighty.modules.gnmi lighty-gnmi-device-simulator - 21.0.0 + 21.1.0-SNAPSHOT ``` diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml index 1979b07fd9..357d948243 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-app-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-app-parent/pom.xml io.lighty.modules.gnmi lighty-gnmi-device-simulator - 21.0.0 + 21.1.0-SNAPSHOT io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-proto/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-proto/pom.xml index 7c7760306d..f58a199fb0 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-proto/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-proto/pom.xml @@ -13,17 +13,17 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.modules.gnmi lighty-gnmi-proto - 21.0.0 + 21.1.0-SNAPSHOT 3.25.5 - 1.66.0 + 1.67.1 diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/pom.xml index d3f280c290..58f95daf79 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.modules.gnmi.southbound lighty-gnmi-sb - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/lightymodule/GnmiSouthBoundModuleTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/lightymodule/GnmiSouthBoundModuleTest.java index 180a4c06ec..60328db03c 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/lightymodule/GnmiSouthBoundModuleTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-sb/src/test/java/io/lighty/gnmi/southbound/lightymodule/GnmiSouthBoundModuleTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at https://www.eclipse.org/legal/epl-v10.html */ - package io.lighty.gnmi.southbound.lightymodule; import static org.mockito.Mockito.when; diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/pom.xml b/lighty-modules/lighty-gnmi/lighty-gnmi-test/pom.xml index bb094fc3f4..be9a110153 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/pom.xml +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/pom.xml @@ -13,13 +13,13 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../../lighty-core/lighty-parent/pom.xml io.lighty.modules.gnmi lighty-gnmi-test - 21.0.0 + 21.1.0-SNAPSHOT true diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/GnmiWithoutRestconfTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/GnmiWithoutRestconfTest.java index 85a43dad77..ab4897d54a 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/GnmiWithoutRestconfTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/GnmiWithoutRestconfTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at https://www.eclipse.org/legal/epl-v10.html */ - package io.lighty.modules.gnmi.test.gnmi; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -30,8 +29,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; @@ -44,7 +41,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.GCMParameterSpec; @@ -152,17 +148,14 @@ public class GnmiWithoutRestconfTest { private static final QName YANG_VERSION_QN = QName.create(GNMI_YANG_MODEL_QN, "version"); private static final QName YANG_BODY_QN = QName.create(GNMI_YANG_MODEL_QN, "body"); - private static LightyController lightyController; private static GnmiSouthboundModule gnmiSouthboundModule; private static SimulatedGnmiDevice gnmiDevice; - @BeforeAll public static void startUp() throws ConfigurationException, ExecutionException, InterruptedException, IOException, - InvalidAlgorithmParameterException, NoSuchPaddingException, NoSuchAlgorithmException, - InvalidKeySpecException, InvalidKeyException, TimeoutException, EffectiveModelContextBuilderException { - + NoSuchAlgorithmException, InvalidKeySpecException, TimeoutException, + EffectiveModelContextBuilderException { lightyController = new LightyControllerBuilder() .from(ControllerConfigUtils.getConfiguration(Files.newInputStream(CONFIGURATION_PATH))) .build(); diff --git a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java index 626e50964c..84bf6edf9f 100644 --- a/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java +++ b/lighty-modules/lighty-gnmi/lighty-gnmi-test/src/test/java/io/lighty/modules/gnmi/test/gnmi/SimulatorCrudTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at https://www.eclipse.org/legal/epl-v10.html */ - package io.lighty.modules.gnmi.test.gnmi; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -38,13 +37,11 @@ import org.slf4j.LoggerFactory; public class SimulatorCrudTest { - private static final Logger LOG = LoggerFactory.getLogger(SimulatorCrudTest.class); private static final int TARGET_PORT = 10161; private static final String TARGET_HOST = "127.0.0.1"; private static final String INITIAL_DATA_PATH = "src/test/resources/json/initData"; - private static final String TEST_SCHEMA_PATH = "src/test/resources/additional/models"; private static final String SIMULATOR_CONFIG = "/json/simulator_config.json"; private static final String SERVER_KEY = "src/test/resources/certs/server-pkcs8.key"; private static final String SERVER_CERT = "src/test/resources/certs/server.crt"; @@ -61,7 +58,6 @@ public class SimulatorCrudTest { @BeforeEach public void setUp() throws Exception { - GnmiSimulatorConfiguration simulatorConfiguration = GnmiSimulatorConfUtils .loadGnmiSimulatorConfiguration(this.getClass().getResourceAsStream(SIMULATOR_CONFIG)); simulatorConfiguration.setTargetAddress(TARGET_HOST); diff --git a/lighty-modules/lighty-gnmi/pom.xml b/lighty-modules/lighty-gnmi/pom.xml index 11ed19ac47..f658004329 100644 --- a/lighty-modules/lighty-gnmi/pom.xml +++ b/lighty-modules/lighty-gnmi/pom.xml @@ -12,7 +12,7 @@ io.lighty.modules.gnmi lighty-gnmi - 21.0.0 + 21.1.0-SNAPSHOT pom diff --git a/lighty-modules/lighty-jetty-server/pom.xml b/lighty-modules/lighty-jetty-server/pom.xml index 7a1fa9835a..834b164eaa 100644 --- a/lighty-modules/lighty-jetty-server/pom.xml +++ b/lighty-modules/lighty-jetty-server/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/lighty-netconf-sb/README.md b/lighty-modules/lighty-netconf-sb/README.md index 6d798ab187..4423b3e10f 100644 --- a/lighty-modules/lighty-netconf-sb/README.md +++ b/lighty-modules/lighty-netconf-sb/README.md @@ -42,7 +42,7 @@ To use NETCONF in your project: io.lighty.modules lighty-netconf-sb - 21.0.0 + 21.1.0-SNAPSHOT ``` 2. Initialize and start an instance of NETCONF SBP in your code: diff --git a/lighty-modules/lighty-netconf-sb/pom.xml b/lighty-modules/lighty-netconf-sb/pom.xml index f99ec156ca..c96945617c 100644 --- a/lighty-modules/lighty-netconf-sb/pom.xml +++ b/lighty-modules/lighty-netconf-sb/pom.xml @@ -11,7 +11,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/lighty-openapi/pom.xml b/lighty-modules/lighty-openapi/pom.xml index e7c87a1f58..f51434dcd3 100644 --- a/lighty-modules/lighty-openapi/pom.xml +++ b/lighty-modules/lighty-openapi/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/lighty-openapi/src/main/java/io/lighty/openapi/OpenApiLighty.java b/lighty-modules/lighty-openapi/src/main/java/io/lighty/openapi/OpenApiLighty.java index 0b1d2caac0..b1505821e9 100644 --- a/lighty-modules/lighty-openapi/src/main/java/io/lighty/openapi/OpenApiLighty.java +++ b/lighty-modules/lighty-openapi/src/main/java/io/lighty/openapi/OpenApiLighty.java @@ -7,7 +7,7 @@ */ package io.lighty.openapi; -import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; +import com.fasterxml.jackson.core.JsonFactoryBuilder; import com.google.common.annotations.VisibleForTesting; import io.lighty.core.controller.api.AbstractLightyModule; import io.lighty.core.controller.api.LightyServices; @@ -21,8 +21,9 @@ import org.eclipse.jetty.servlet.ServletHolder; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletContainer; -import org.opendaylight.restconf.openapi.api.OpenApiService; import org.opendaylight.restconf.openapi.impl.OpenApiServiceImpl; +import org.opendaylight.restconf.openapi.jaxrs.JaxRsOpenApi; +import org.opendaylight.restconf.openapi.jaxrs.OpenApiBodyWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +41,7 @@ public class OpenApiLighty extends AbstractLightyModule { private final LightyServerBuilder jettyServerBuilder; private final LightyServices lightyServices; - private OpenApiService apiDocService; + private JaxRsOpenApi jaxRsOpenApi; public OpenApiLighty(RestConfConfiguration restConfConfiguration, LightyServerBuilder jettyServerBuilder, LightyServices lightyServices) { @@ -57,14 +58,17 @@ protected boolean initProcedure() { String basePathString = restConfConfiguration.getRestconfServletContextPath().replaceAll("^/+", ""); LOG.info("basePath: {}", basePathString); - this.apiDocService = new OpenApiServiceImpl(lightyServices.getDOMSchemaService(), - lightyServices.getDOMMountPointService(), lightyServices.getJaxRsEndpoint()); + final var openApiService = new OpenApiServiceImpl(lightyServices.getDOMSchemaService(), + lightyServices.getDOMMountPointService(), lightyServices.getJaxRsEndpoint()); + + this.jaxRsOpenApi = new JaxRsOpenApi(openApiService); final ServletContainer restServletContainer = new ServletContainer(ResourceConfig .forApplication((new Application() { @Override public Set getSingletons() { - return Set.of(apiDocService, new JacksonJaxbJsonProvider()); + return Set.of(new JaxRsOpenApi(openApiService), + new OpenApiBodyWriter(new JsonFactoryBuilder().build())); } }))); @@ -100,7 +104,7 @@ private void addStaticResources(ServletContextHandler mainHandler, String path, } @VisibleForTesting - OpenApiService getApiDocService() { - return apiDocService; + JaxRsOpenApi getJaxRsOpenApi() { + return jaxRsOpenApi; } } diff --git a/lighty-modules/lighty-openapi/src/test/java/io/lighty/openapi/OpenApiLightyTest.java b/lighty-modules/lighty-openapi/src/test/java/io/lighty/openapi/OpenApiLightyTest.java index 098275a727..6e020cbbb5 100644 --- a/lighty-modules/lighty-openapi/src/test/java/io/lighty/openapi/OpenApiLightyTest.java +++ b/lighty-modules/lighty-openapi/src/test/java/io/lighty/openapi/OpenApiLightyTest.java @@ -28,20 +28,20 @@ public void simpleOpenApiModuleTest() { } public void testGetListOfMounts(UriInfo uriInfo) { - assertSuccessResponse(getOpenApiModule().getApiDocService().getListOfMounts(uriInfo)); + assertSuccessResponse(getOpenApiModule().getJaxRsOpenApi().getListOfMounts(uriInfo)); } public void testGetAllModulesDoc(UriInfo uriInfo) throws IOException { - assertSuccessResponse(getOpenApiModule().getApiDocService().getAllModulesDoc(uriInfo, 0, 0, 0, 0)); + assertSuccessResponse(getOpenApiModule().getJaxRsOpenApi().getAllModulesDoc(uriInfo, 0, 0, 0, 0)); } public void testGetDocByModule(UriInfo uriInfo, String modelName, String revisionDate) throws IOException { assertSuccessResponse( - getOpenApiModule().getApiDocService().getDocByModule(modelName, revisionDate, uriInfo, 0, 0)); + getOpenApiModule().getJaxRsOpenApi().getDocByModule(modelName, revisionDate, uriInfo, 0, 0)); } public void testGetApiExplorer(UriInfo uriInfo) { - final Response response = getOpenApiModule().getApiDocService().getApiExplorer(uriInfo); + final Response response = getOpenApiModule().getJaxRsOpenApi().getApiExplorer(uriInfo); final int redirectCode = 303; Assert.assertEquals(response.getStatus(), redirectCode); @@ -58,7 +58,7 @@ protected UriInfo mockUriInfo(String path) { Mockito.when(uriInfo.getAbsolutePath()).thenReturn(absolutePathUri); Mockito.when(uriInfo.getBaseUri()).thenReturn(URI.create(path)); Mockito.when(uriInfo.getBaseUriBuilder()).thenReturn(UriBuilder.fromPath(path)); - Mockito.when(uriInfo.getRequestUriBuilder()).thenReturn(UriBuilder.fromUri(absolutePathUri)); + Mockito.when(uriInfo.getRequestUri()).thenReturn(absolutePathUri); return uriInfo; } diff --git a/lighty-modules/lighty-restconf-nb-community/README.md b/lighty-modules/lighty-restconf-nb-community/README.md index 76e0258a9d..b84c0cf9d8 100644 --- a/lighty-modules/lighty-restconf-nb-community/README.md +++ b/lighty-modules/lighty-restconf-nb-community/README.md @@ -12,7 +12,7 @@ To use RESTCONF in your project: io.lighty.modules lighty-restconf-nb-community - 21.0.0 + 21.1.0-SNAPSHOT ``` diff --git a/lighty-modules/lighty-restconf-nb-community/pom.xml b/lighty-modules/lighty-restconf-nb-community/pom.xml index bb6c7e1cbe..59fbbdf946 100644 --- a/lighty-modules/lighty-restconf-nb-community/pom.xml +++ b/lighty-modules/lighty-restconf-nb-community/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-modules/lighty-restconf-nb-community/src/test/java/io/lighty/modules/northbound/restconf/community/impl/tests/CommunityRestConfTestBase.java b/lighty-modules/lighty-restconf-nb-community/src/test/java/io/lighty/modules/northbound/restconf/community/impl/tests/CommunityRestConfTestBase.java index 81d80b454a..9cb7ab7aa2 100644 --- a/lighty-modules/lighty-restconf-nb-community/src/test/java/io/lighty/modules/northbound/restconf/community/impl/tests/CommunityRestConfTestBase.java +++ b/lighty-modules/lighty-restconf-nb-community/src/test/java/io/lighty/modules/northbound/restconf/community/impl/tests/CommunityRestConfTestBase.java @@ -60,7 +60,7 @@ public void startControllerAndRestConf() throws Exception { communityRestConf = builder.build(); LOG.info("Starting CommunityRestConf (waiting 10s after start)"); - communityRestConf.start(); + communityRestConf.start().get(10_000, TimeUnit.MILLISECONDS); LOG.info("CommunityRestConf started"); } diff --git a/lighty-modules/pom.xml b/lighty-modules/pom.xml index e0b9b15671..3098148a8b 100644 --- a/lighty-modules/pom.xml +++ b/lighty-modules/pom.xml @@ -11,7 +11,7 @@ io.lighty.modules lighty-modules-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom ${project.groupId}:${project.artifactId} diff --git a/lighty-resources/controller-application-assembly/pom.xml b/lighty-resources/controller-application-assembly/pom.xml index 45f22dc71c..87d217abc3 100644 --- a/lighty-resources/controller-application-assembly/pom.xml +++ b/lighty-resources/controller-application-assembly/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-resources/log4j2-config/pom.xml b/lighty-resources/log4j2-config/pom.xml index 09a35c4ef7..b97097d7d5 100644 --- a/lighty-resources/log4j2-config/pom.xml +++ b/lighty-resources/log4j2-config/pom.xml @@ -11,7 +11,7 @@ io.lighty.resources log4j2-config - 21.0.0 + 21.1.0-SNAPSHOT jar ${project.groupId}:${project.artifactId} @@ -21,7 +21,7 @@ - 17 + 21 @@ -59,7 +59,7 @@ scm:git:https://github.com/PANTHEONtech/lighty.git scm:git:https://github.com/PANTHEONtech/lighty.git https://github.com/PANTHEONtech/lighty - 21.0.0 + HEAD diff --git a/lighty-resources/pom.xml b/lighty-resources/pom.xml index 961a8f519e..975fede599 100644 --- a/lighty-resources/pom.xml +++ b/lighty-resources/pom.xml @@ -12,7 +12,7 @@ io.lighty.resources lighty-resources-aggregator pom - 21.0.0 + 21.1.0-SNAPSHOT true diff --git a/lighty-resources/singlenode-configuration/pom.xml b/lighty-resources/singlenode-configuration/pom.xml index f953e680f4..5813861d6f 100644 --- a/lighty-resources/singlenode-configuration/pom.xml +++ b/lighty-resources/singlenode-configuration/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-resources/start-script/pom.xml b/lighty-resources/start-script/pom.xml index 084bdecffc..225987d821 100644 --- a/lighty-resources/start-script/pom.xml +++ b/lighty-resources/start-script/pom.xml @@ -12,7 +12,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../../lighty-core/lighty-parent diff --git a/lighty-resources/start-script/src/main/resources/start-controller.sh b/lighty-resources/start-script/src/main/resources/start-controller.sh index 0b717ca270..d43c1eac37 100755 --- a/lighty-resources/start-script/src/main/resources/start-controller.sh +++ b/lighty-resources/start-script/src/main/resources/start-controller.sh @@ -9,10 +9,10 @@ if [ -z ${JAVA_HOME} ]; then JAVA_HOME=`java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | sed -e 's/^.*java.home = \(.*\)$/\1/'` fi; -# Make sure we are using Java 17+ +# Make sure we are using Java 21+ JAVA_VERSION=`${JAVA_HOME}/bin/java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1` -if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 17 ]; then - echo "Java 17+ is required to run this application!" +if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 21 ]; then + echo "Java 21+ is required to run this application!" exit -1 fi; diff --git a/lighty-tests-report/pom.xml b/lighty-tests-report/pom.xml index c68110f906..39e7f15c1d 100644 --- a/lighty-tests-report/pom.xml +++ b/lighty-tests-report/pom.xml @@ -11,7 +11,7 @@ io.lighty.core lighty-parent - 21.0.0 + 21.1.0-SNAPSHOT ../lighty-core/lighty-parent @@ -160,7 +160,7 @@ io.lighty.modules.gnmi lighty-gnmi-test - 21.0.0 + 21.1.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index fa99a39ac0..61e83498df 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ io.lighty lighty-aggregator - 21.0.0 + 21.1.0-SNAPSHOT pom lighty @@ -91,7 +91,7 @@ scm:git:https://github.com/PANTHEONtech/lighty.git scm:git:https://github.com/PANTHEONtech/lighty.git https://github.com/PANTHEONtech/lighty - 21.0.0 + HEAD