Switch RemoteDeviceId equality to topologyPath 69/103869/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 1 Jan 2023 18:30:15 +0000 (19:30 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 1 Jan 2023 20:31:53 +0000 (21:31 +0100)
We have two requivalent representations here, but topologyPath really
wants to be called mountPath().

JIRA: NETCONF-913
Change-Id: I2be7da552ab4cea5185b589d84878d7e6bb5f5ef
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 6c60bfdacbb49ed22a30ef0cc6be9ce881172b51..2a11f8b1035463dd0967760c6a884d88956aff66 100644 (file)
@@ -47,6 +47,7 @@ public final class RemoteDeviceId {
     private final String name;
     private final YangInstanceIdentifier topologyPath;
     private final KeyedInstanceIdentifier<Node, NodeKey> topologyBindingPath;
+
     private InetSocketAddress address;
     private Host host;
 
@@ -96,11 +97,11 @@ public final class RemoteDeviceId {
     @Override
     public boolean equals(final Object obj) {
         return this == obj || obj instanceof RemoteDeviceId other
-            && name.equals(other.name) && topologyBindingPath.equals(other.topologyBindingPath);
+            && name.equals(other.name) && topologyPath.equals(other.topologyPath);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(name, topologyBindingPath);
+        return Objects.hash(name, topologyPath);
     }
 }