From d35966cf866962facdc69a75d6de93672efb57fc Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Thu, 9 May 2024 10:24:49 +0200 Subject: [PATCH 1/3] Use newer revision of netconf-node-topology and odl-device https://github.com/opendaylight/netconf/commit/6507d88e5ba01ceb04f90e345bd21df486fbd135 JIRA: LIGHTY-297 Signed-off-by: tobias.pobocik --- .../example-config/configuration.json | 2 +- .../helm/lighty-rnc-app-helm/templates/configmaps.yaml | 2 +- .../lighty-rnc-module/src/test/resources/config.json | 2 +- .../lighty-rnc-module/src/test/resources/http2Config.json | 2 +- .../lighty-rnc-module/src/test/resources/httpsConfig.json | 2 +- .../src/test/resources/swagger_config.json | 2 +- .../main/assembly/resources/sampleConfigSingleNode.json | 2 +- .../main/assembly/resources/sampleConfigSingleNode.json | 2 +- .../springboot/rest/NetconfDeviceRestService.java | 4 ++-- .../springboot/rest/dto/NetconfDeviceResponse.java | 4 ++-- .../southbound/netconf/tests/TopologyPluginsTest.java | 8 ++++---- .../southbound/netconf/impl/util/NetconfConfigUtils.java | 2 +- .../southbound/netconf/impl/util/NetconfUtils.java | 2 +- .../src/main/resources/sampleConfigCluster.json | 2 +- .../src/main/resources/sampleConfigSingleNode.json | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/example-config/configuration.json b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/example-config/configuration.json index 6c91402e33..3bf7e24d7b 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/example-config/configuration.json +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-docker/example-config/configuration.json @@ -41,7 +41,7 @@ { "usedBy": "RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy": "RESTCONF/NETCONF", "name": "ietf-yang-library", "revision": "2019-01-04", "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-yang-library"}, { "usedBy": "NETCONF", "name": "netconf-keystore", "revision": "2017-10-17", "nameSpace": "urn:opendaylight:netconf:keystore"}, - { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2022-12-25", "nameSpace": "urn:opendaylight:netconf-node-topology"}, + { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2024-02-23", "nameSpace": "urn:opendaylight:netconf-node-topology"}, { "usedBy": "NETCONF", "name":"ietf-netconf", "revision":"2011-06-01", "nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy": "AAA", "name": "aaa-cert-mdsal", "revision":"2016-03-21", "nameSpace":"urn:opendaylight:yang:aaa:cert:mdsal"}, { "usedBy": "AAA", "name": "aaa", "revision": "2016-12-14", "nameSpace": "urn:opendaylight:params:xml:ns:yang:aaa"}, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-helm/helm/lighty-rnc-app-helm/templates/configmaps.yaml b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-helm/helm/lighty-rnc-app-helm/templates/configmaps.yaml index afb059a118..9cb1917373 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-helm/helm/lighty-rnc-app-helm/templates/configmaps.yaml +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-app-helm/helm/lighty-rnc-app-helm/templates/configmaps.yaml @@ -48,7 +48,7 @@ data: { "usedBy": "RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy": "RESTCONF/NETCONF", "name": "ietf-yang-library", "revision": "2019-01-04", "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-yang-library"}, { "usedBy": "NETCONF", "name": "netconf-keystore", "revision": "2017-10-17", "nameSpace": "urn:opendaylight:netconf:keystore"}, - { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2022-12-25", "nameSpace": "urn:opendaylight:netconf-node-topology"}, + { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2024-02-23", "nameSpace": "urn:opendaylight:netconf-node-topology"}, { "usedBy": "NETCONF", "name":"ietf-netconf", "revision":"2011-06-01", "nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy": "AAA", "name": "aaa-cert-mdsal", "revision":"2016-03-21", "nameSpace":"urn:opendaylight:yang:aaa:cert:mdsal"}, { "usedBy": "AAA", "name": "aaa", "revision": "2016-12-14", "nameSpace": "urn:opendaylight:params:xml:ns:yang:aaa"}, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/config.json b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/config.json index d60cda2580..00c70b0662 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/config.json +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/config.json @@ -37,7 +37,7 @@ { "usedBy": "RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy": "RESTCONF/NETCONF", "name": "ietf-yang-library", "revision": "2019-01-04", "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-yang-library"}, { "usedBy": "NETCONF", "name": "netconf-keystore", "revision": "2017-10-17", "nameSpace": "urn:opendaylight:netconf:keystore"}, - { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2022-12-25", "nameSpace": "urn:opendaylight:netconf-node-topology"}, + { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2024-02-23", "nameSpace": "urn:opendaylight:netconf-node-topology"}, { "usedBy": "NETCONF", "name":"ietf-netconf", "revision":"2011-06-01", "nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy": "AAA", "name": "aaa", "revision": "2016-12-14", "nameSpace": "urn:opendaylight:params:xml:ns:yang:aaa"}, { "usedBy": "AAA", "name": "aaa-cert-mdsal", "revision":"2016-03-21", "nameSpace":"urn:opendaylight:yang:aaa:cert:mdsal"}, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/http2Config.json b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/http2Config.json index a5345ccd7c..cc72e76081 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/http2Config.json +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/http2Config.json @@ -34,7 +34,7 @@ { "usedBy": "RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy": "RESTCONF/NETCONF", "name": "ietf-yang-library", "revision": "2019-01-04", "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-yang-library"}, { "usedBy": "NETCONF", "name": "netconf-keystore", "revision": "2017-10-17", "nameSpace": "urn:opendaylight:netconf:keystore"}, - { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2022-12-25", "nameSpace": "urn:opendaylight:netconf-node-topology"}, + { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2024-02-23", "nameSpace": "urn:opendaylight:netconf-node-topology"}, { "usedBy": "NETCONF", "name":"ietf-netconf", "revision":"2011-06-01", "nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy": "AAA", "name": "aaa-cert-mdsal", "revision":"2016-03-21", "nameSpace":"urn:opendaylight:yang:aaa:cert:mdsal"}, { "usedBy": "AAA", "name": "aaa", "revision": "2016-12-14", "nameSpace": "urn:opendaylight:params:xml:ns:yang:aaa"}, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/httpsConfig.json b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/httpsConfig.json index d4605173e8..816c1d3ab9 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/httpsConfig.json +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/httpsConfig.json @@ -34,7 +34,7 @@ { "usedBy": "RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy": "RESTCONF/NETCONF", "name": "ietf-yang-library", "revision": "2019-01-04", "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-yang-library"}, { "usedBy": "NETCONF", "name": "netconf-keystore", "revision": "2017-10-17", "nameSpace": "urn:opendaylight:netconf:keystore"}, - { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2022-12-25", "nameSpace": "urn:opendaylight:netconf-node-topology"}, + { "usedBy": "NETCONF", "name": "netconf-node-topology", "revision": "2024-02-23", "nameSpace": "urn:opendaylight:netconf-node-topology"}, { "usedBy": "NETCONF", "name":"ietf-netconf", "revision":"2011-06-01", "nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy": "AAA", "name": "aaa-cert-mdsal", "revision":"2016-03-21", "nameSpace":"urn:opendaylight:yang:aaa:cert:mdsal"}, { "usedBy": "AAA", "name": "aaa", "revision": "2016-12-14", "nameSpace": "urn:opendaylight:params:xml:ns:yang:aaa"}, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/swagger_config.json b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/swagger_config.json index e2f2fdba01..f68a4bcf0e 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/swagger_config.json +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/test/resources/swagger_config.json @@ -54,7 +54,7 @@ { "nameSpace": "urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider", "name": "opendaylight-inmemory-datastore-provider", "revision": "2014-06-17" }, { "nameSpace": "urn:ietf:params:xml:ns:yang:iana-afn-safi", "name": "iana-afn-safi", "revision": "2013-07-04" }, { "nameSpace": "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl", "name": "opendaylight-sal-binding-broker-impl", "revision": "2013-10-28" }, - { "nameSpace": "urn:opendaylight:netconf-node-topology", "name": "netconf-node-topology", "revision": "2022-12-25" }, + { "nameSpace": "urn:opendaylight:netconf-node-topology", "name": "netconf-node-topology", "revision": "2024-02-23" }, { "nameSpace": "urn:ietf:params:xml:ns:yang:ietf-restconf", "name": "ietf-restconf", "revision": "2017-01-26" }, { "nameSpace": "urn:ietf:params:xml:ns:netmod:notification", "name": "nc-notifications", "revision": "2008-07-14" }, { "nameSpace": "urn:opendaylight:l2:types", "name": "opendaylight-l2-types", "revision": "2013-08-27" }, diff --git a/lighty-examples/lighty-community-restconf-actions-app/src/main/assembly/resources/sampleConfigSingleNode.json b/lighty-examples/lighty-community-restconf-actions-app/src/main/assembly/resources/sampleConfigSingleNode.json index f2b6ebf87d..7fedf81a6a 100644 --- a/lighty-examples/lighty-community-restconf-actions-app/src/main/assembly/resources/sampleConfigSingleNode.json +++ b/lighty-examples/lighty-community-restconf-actions-app/src/main/assembly/resources/sampleConfigSingleNode.json @@ -41,7 +41,7 @@ { "usedBy":"RESTCONF","name":"subscribe-to-notification","revision":"2016-10-28","nameSpace":"subscribe:to:notification"}, { "usedBy":"RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy":"NETCONF","name":"netconf-keystore","revision":"2017-10-17","nameSpace":"urn:opendaylight:netconf:keystore"}, - { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-topology"}, + { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2024-02-23","nameSpace":"urn:opendaylight:netconf-node-topology"}, { "usedBy":"NETCONF","name":"netconf-node-optional","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-optional"}, { "usedBy":"NETCONF","name":"ietf-netconf","revision":"2011-06-01","nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy":"NETCONF_ACTION","name":"example-data-center","revision":"2018-08-07","nameSpace":"urn:example:data-center"} diff --git a/lighty-examples/lighty-community-restconf-netconf-app/src/main/assembly/resources/sampleConfigSingleNode.json b/lighty-examples/lighty-community-restconf-netconf-app/src/main/assembly/resources/sampleConfigSingleNode.json index 718b05808d..343663c5af 100644 --- a/lighty-examples/lighty-community-restconf-netconf-app/src/main/assembly/resources/sampleConfigSingleNode.json +++ b/lighty-examples/lighty-community-restconf-netconf-app/src/main/assembly/resources/sampleConfigSingleNode.json @@ -41,7 +41,7 @@ { "usedBy":"RESTCONF","name":"subscribe-to-notification","revision":"2016-10-28","nameSpace":"subscribe:to:notification"}, { "usedBy":"RESTCONF", "name": "instance-identifier-patch-module", "revision": "2015-11-21", "nameSpace": "instance:identifier:patch:module"}, { "usedBy":"NETCONF","name":"netconf-keystore","revision":"2017-10-17","nameSpace":"urn:opendaylight:netconf:keystore"}, - { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-topology"}, + { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2024-02-23","nameSpace":"urn:opendaylight:netconf-node-topology"}, { "usedBy":"NETCONF","name":"netconf-node-optional","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-optional"}, { "usedBy":"NETCONF","name":"ietf-netconf","revision":"2011-06-01","nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.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 7518598489..b6deb33cb6 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 @@ -30,8 +30,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.rev221225.credentials.credentials.LoginPasswordBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNodeBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240223.credentials.credentials.LoginPasswordBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223.NetconfNodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId; 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 d4fa48eee9..25413ce2e1 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,8 +10,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev221225.ConnectionOper.ConnectionStatus; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNode; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240223.ConnectionOper.ConnectionStatus; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223.NetconfNode; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; public class NetconfDeviceResponse { 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 57a709938d..196ebe4657 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 @@ -37,10 +37,10 @@ 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.rev221225.credentials.Credentials; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev221225.credentials.credentials.LoginPasswordBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNode; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.NetconfNodeBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240223.credentials.Credentials; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.device.rev240223.credentials.credentials.LoginPasswordBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223.NetconfNode; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223.NetconfNodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId; diff --git a/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfConfigUtils.java b/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfConfigUtils.java index b5a3312537..138a5110f9 100644 --- a/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfConfigUtils.java +++ b/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfConfigUtils.java @@ -47,7 +47,7 @@ public final class NetconfConfigUtils { public static final Set NETCONF_TOPOLOGY_MODELS = Set.of( org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.keystore.rev171017 .$YangModuleInfoImpl.getInstance(), - org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225 + org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223 .$YangModuleInfoImpl.getInstance(), org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev221225 .$YangModuleInfoImpl.getInstance(), diff --git a/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfUtils.java b/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfUtils.java index 2414f9a8ab..188ce5d9a2 100644 --- a/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfUtils.java +++ b/lighty-modules/lighty-netconf-sb/src/main/java/io/lighty/modules/southbound/netconf/impl/util/NetconfUtils.java @@ -32,7 +32,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.copy.config.input.target.ConfigTarget; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.edit.config.input.EditContent; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.get.config.input.source.ConfigSource; -import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev221225.network.topology.topology.topology.types.TopologyNetconf; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev240223.network.topology.topology.topology.types.TopologyNetconf; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId; diff --git a/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigCluster.json b/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigCluster.json index 125ca53f02..7a696420ed 100644 --- a/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigCluster.json +++ b/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigCluster.json @@ -29,7 +29,7 @@ { "usedBy":"CONTROLLER","name":"distributed-datastore-provider","revision":"2014-06-12","nameSpace":"urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider"}, { "usedBy":"CONTROLLER","name":"odl-entity-owners","nameSpace":"urn:opendaylight:params:xml:ns:yang:controller:entity-owners"}, { "usedBy":"NETCONF","name":"netconf-keystore","revision":"2017-10-17","nameSpace":"urn:opendaylight:netconf:keystore"}, - { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-topology"}, + { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2024-02-23","nameSpace":"urn:opendaylight:netconf-node-topology"}, { "usedBy":"NETCONF","name":"netconf-node-optional","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-optional"}, { "usedBy":"NETCONF","name":"ietf-netconf","revision":"2011-06-01","nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"}, { "usedBy":"CLUSTER","name": "netconf-clustered-topology-config","revision":"2017-04-19","nameSpace":"urn:opendaylight:netconf:topology:singleton:config" } diff --git a/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigSingleNode.json b/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigSingleNode.json index 96579f7e11..c0b6139c9c 100644 --- a/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigSingleNode.json +++ b/lighty-modules/lighty-netconf-sb/src/main/resources/sampleConfigSingleNode.json @@ -29,7 +29,7 @@ { "usedBy":"CONTROLLER","name":"distributed-datastore-provider","revision": "2014-06-12","nameSpace":"urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider"}, { "usedBy":"CONTROLLER","name":"odl-entity-owners","nameSpace":"urn:opendaylight:params:xml:ns:yang:controller:entity-owners"}, { "usedBy":"NETCONF","name":"netconf-keystore","revision":"2017-10-17","nameSpace":"urn:opendaylight:netconf:keystore"}, - { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-topology"}, + { "usedBy":"NETCONF","name":"netconf-node-topology","revision":"2024-02-23","nameSpace":"urn:opendaylight:netconf-node-topology"}, { "usedBy":"NETCONF","name":"netconf-node-optional","revision":"2022-12-25","nameSpace":"urn:opendaylight:netconf-node-optional"}, { "usedBy":"NETCONF","name":"ietf-netconf","revision":"2011-06-01","nameSpace":"urn:ietf:params:xml:ns:netconf:base:1.0"} ] From 3ebaaca466d803ecec8132be5d895aa704156a84 Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Thu, 9 May 2024 10:31:45 +0200 Subject: [PATCH 2/3] Provide OpenApiLightyConfiguration Provide OpenApiLightyConfiguration implementation to set OpenApi basePath according to lighty.io JSON based configuration. JIRA: LIGHTY-297 Signed-off-by: tobias.pobocik --- .../java/io/lighty/swagger/SwaggerLighty.java | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/lighty-modules/lighty-swagger/src/main/java/io/lighty/swagger/SwaggerLighty.java b/lighty-modules/lighty-swagger/src/main/java/io/lighty/swagger/SwaggerLighty.java index eab6fbaeb2..3f317af252 100644 --- a/lighty-modules/lighty-swagger/src/main/java/io/lighty/swagger/SwaggerLighty.java +++ b/lighty-modules/lighty-swagger/src/main/java/io/lighty/swagger/SwaggerLighty.java @@ -12,6 +12,7 @@ import io.lighty.core.controller.api.LightyServices; import io.lighty.modules.northbound.restconf.community.impl.config.RestConfConfiguration; import io.lighty.server.LightyServerBuilder; +import java.lang.annotation.Annotation; import org.eclipse.jetty.server.handler.ContextHandlerCollection; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -21,6 +22,7 @@ import org.opendaylight.netconf.sal.rest.doc.api.ApiDocService; import org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl; import org.opendaylight.netconf.sal.rest.doc.jaxrs.ApiDocApplication; +import org.opendaylight.restconf.nb.rfc8040.JaxRsNorthbound; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +58,7 @@ protected boolean initProcedure() { LOG.info("basePath: {}", basePathString); this.apiDocService = new ApiDocServiceImpl(lightyServices.getDOMSchemaService(), - lightyServices.getDOMMountPointService(), basePathString); + lightyServices.getDOMMountPointService(), new SwaggerConfiguration(basePathString)); ApiDocApplication apiDocApplication = new ApiDocApplication(apiDocService); @@ -97,4 +99,52 @@ private void addStaticResources(ServletContextHandler mainHandler, String path, ApiDocService getApiDocService() { return apiDocService; } + + private static final class SwaggerConfiguration implements JaxRsNorthbound.Configuration { + private final String basePath; + + private SwaggerConfiguration(final String basePath) { + this.basePath = basePath; + } + + @Override + public int maximum$_$fragment$_$length() { + return 0; + } + + @Override + public int heartbeat$_$interval() { + return 10000; + } + + @Override + public int idle$_$timeout() { + return 30000; + } + + @Override + public String ping$_$executor$_$name$_$prefix() { + return "ping-executor"; + } + + @Override + public int max$_$thread$_$count() { + return 1; + } + + @Override + public boolean use$_$sse() { + return true; + } + + @Override + public String restconf() { + return basePath; + } + + @Override + public Class annotationType() { + return null; + } + } } From c47ed8c3afe8b55bc52b0dffb1a5da5fba6e1a4e Mon Sep 17 00:00:00 2001 From: Ivan Hrasko Date: Wed, 10 Apr 2024 13:04:50 +0200 Subject: [PATCH 3/3] Configure streams' basePath Use lighty.io's restconfServletContextPath as basePath for NETCONF streams configuration. JIRA: LIGHTY-290 Signed-off-by: Ivan Hrasko (cherry picked from commit dcfd979b9e74a1ccb35c44c75cd642db1acbd351) --- .../restconf/community/impl/CommunityRestConf.java | 3 ++- .../restconf/community/impl/util/RestConfConfigUtils.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java index 5caa6c40b7..76fe147885 100644 --- a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java +++ b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java @@ -95,7 +95,8 @@ public CommunityRestConf(final DOMDataBroker domDataBroker, @Override protected boolean initProcedure() { final Stopwatch stopwatch = Stopwatch.createStarted(); - final StreamsConfiguration streamsConfiguration = RestConfConfigUtils.getStreamsConfiguration(); + final StreamsConfiguration streamsConfiguration = RestConfConfigUtils + .getStreamsConfiguration(restconfServletContextPath); LOG.info("Starting RestconfApplication with configuration {}", streamsConfiguration); diff --git a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java index b6021d0607..f7870a73e6 100644 --- a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java +++ b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java @@ -169,7 +169,9 @@ public static RestConfConfiguration getDefaultRestConfConfiguration() { return new RestConfConfiguration(); } - public static StreamsConfiguration getStreamsConfiguration() { - return new StreamsConfiguration(MAXIMUM_FRAGMENT_LENGTH, IDLE_TIMEOUT, HEARTBEAT_INTERVAL, USE_SSE); + public static StreamsConfiguration getStreamsConfiguration(final String restconfServletContextPath) { + // we use, for example "/rests" as restconfServletContextPath but NETCONF expects just "rests" as basePath + final var basePath = restconfServletContextPath.substring(1); + return new StreamsConfiguration(MAXIMUM_FRAGMENT_LENGTH, IDLE_TIMEOUT, HEARTBEAT_INTERVAL, USE_SSE, basePath); } }