Remove RemoteDeviceId.getBindingKey() 68/103868/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 1 Jan 2023 18:23:17 +0000 (19:23 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 1 Jan 2023 20:31:19 +0000 (21:31 +0100)
We expose this as the instance identifier already and there are no users
anyway.

JIRA: NETCONF-913
Change-Id: I38ad921fb321014167d59fe1f2a7932fcdc06087
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/util/RemoteDeviceId.java

index 8b40fc08f5020eede9941e994175bfc143ce53fb..6c60bfdacbb49ed22a30ef0cc6be9ce881172b51 100644 (file)
@@ -45,7 +45,6 @@ public final class RemoteDeviceId {
         .child(Topology.class, new TopologyKey(new TopologyId(DEFAULT_TOPOLOGY_NAME)));
 
     private final String name;
-    private final NodeKey key;
     private final YangInstanceIdentifier topologyPath;
     private final KeyedInstanceIdentifier<Node, NodeKey> topologyBindingPath;
     private InetSocketAddress address;
@@ -54,8 +53,7 @@ public final class RemoteDeviceId {
     private RemoteDeviceId(final String name) {
         this.name = requireNonNull(name);
         topologyPath = DEFAULT_TOPOLOGY_NODE.node(NodeIdentifierWithPredicates.of(Node.QNAME, NODE_ID_QNAME, name));
-        key = new NodeKey(new NodeId(name));
-        topologyBindingPath = DEFAULT_TOPOLOGY_IID.child(Node.class, key);
+        topologyBindingPath = DEFAULT_TOPOLOGY_IID.child(Node.class, new NodeKey(new NodeId(name)));
     }
 
     public RemoteDeviceId(final String name, final InetSocketAddress address) {
@@ -74,11 +72,7 @@ public final class RemoteDeviceId {
         return name;
     }
 
-    public NodeKey getBindingKey() {
-        return key;
-    }
-
-    public InstanceIdentifier<Node> getTopologyBindingPath() {
+    public KeyedInstanceIdentifier<Node, NodeKey> getTopologyBindingPath() {
         return topologyBindingPath;
     }