Relocate ted-name 52/104052/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Jan 2023 00:24:34 +0000 (01:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Jan 2023 10:13:20 +0000 (11:13 +0100)
The name should be part of topology itself, as it is not related to
pcep-api in any way, shape or form.

Change-Id: I384d94a4d87d9522f02543f4a1c9735b2bdd3c98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
pcep/api/src/main/yang/pcep-config.yang
pcep/config-example/src/main/resources/initial/network-topology-pcep-config.xml
pcep/topology/topology-api/src/main/yang/network-topology-pcep.yang
pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/PCEPTopologyConfiguration.java
pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/PCEPTopologyTracker.java
pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/ServerSessionManager.java

index 6ffcf67c458983899db2f03bb075fa1b7f739fe8..351f489923563aa2cc41fc01d999c5ed17ac53a9 100644 (file)
@@ -149,12 +149,6 @@ module pcep-config {
                 default 4189;
             }
 
-            // FIXME: this should live in topology-api
-            leaf ted-name {
-                type string;
-                default "example-linkstate-topology";
-            }
-
             uses pcep-session-error-policy;
             uses pcep-session-timers;
 
index c520aabada1e48ca9fb2632d8a939331266b60a6..744990479d86f7014fe9e2fa0314b8fbf6a8a419 100644 (file)
@@ -17,8 +17,8 @@
                     <listen-port>4189</listen-port>
                     <dead-timer-value>120</dead-timer-value>
                     <keep-alive-timer-value>30</keep-alive-timer-value>
-                    <ted-name>example-linkstate-topology</ted-name>
                 </session-config>
+                <ted-name>example-linkstate-topology</ted-name>
             </topology-pcep>
         </topology-types>
         <node>
index 1018a40a6b37507127541f90820927edc4308c21..5c1f59266b983f1bc811c2b9cd95e7d7ebb9cb93 100644 (file)
@@ -83,18 +83,20 @@ module network-topology-pcep {
         }
     }
 
-    grouping topology-pcep-type {
+    augment "/nt:network-topology/nt:topology/nt:topology-types" {
         container topology-pcep {
             presence "indicates a PCEP-aware topology";
 
+            // FIXME: leaf-ref to a topology
+            leaf ted-name {
+                type string;
+                default "example-linkstate-topology";
+            }
+
             uses pdc:pcep-config;
         }
     }
 
-    augment "/nt:network-topology/nt:topology/nt:topology-types" {
-        uses topology-pcep-type;
-    }
-
     grouping pcep-client-attributes {
         description "Data present in a node which is a PCEP client (PCC).";
 
index bb82494fc407767e647166dc819d6442b823904b..a482f5c8650000ee2965fc807de6ff0b5c76d958 100644 (file)
@@ -99,7 +99,7 @@ final class PCEPTopologyConfiguration implements Immutable {
 
         return new PCEPTopologyConfiguration(
             getInetSocketAddress(sessionConfig.getListenAddress(), sessionConfig.getListenPort()),
-            constructKeys(topology.getNode()), constructGraphKey(sessionConfig.getTedName()),
+            constructKeys(topology.getNode()), constructGraphKey(topologyPcep.getTedName()),
             sessionConfig.getRpcTimeout(), updateInterval, new PCEPTimerProposal(sessionConfig),
             constructCapabilities(capabilities), sessionConfig.requireMaxUnknownMessages(), sessionConfig.getTls());
     }
index a09ce24ce33986da3623b88655298cfca93c985c..7e093363345cf3e277da9b703e886e51a28cf4c8 100644 (file)
@@ -39,7 +39,7 @@ import org.opendaylight.protocol.pcep.PCEPDispatcher;
 import org.opendaylight.protocol.pcep.spi.PCEPExtensionConsumerContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.topology.stats.rpc.rev190321.PcepTopologyStatsRpcService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.TopologyTypes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.topology.pcep.type.TopologyPcep;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.network.topology.topology.topology.types.TopologyPcep;
 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.network.topology.Topology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
index a51bf285e12117ec6d0a918148d726c7743fbff4..46f58f183dbd8ab2da76430d3ac607bac3fa20ed 100644 (file)
@@ -41,7 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.TopologyTypes1Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.TriggerSyncArgs;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.UpdateLspArgs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.topology.pcep.type.TopologyPcepBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.network.topology.topology.topology.types.TopologyPcepBuilder;
 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.network.topology.Topology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyBuilder;