X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=hwvtepsouthbound%2Fhwvtepsouthbound-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Fhwvtepsouthbound%2Ftransact%2FUcastMacsRemoteUpdateCommand.java;h=227608c2c6c6f395cb42856371688eacd573344d;hb=f3e348263b4ad6f3ca1a7def9d6a251f394ea4ec;hp=2de4177ea64e82387634ec95ef3c5eb2b6ebb573;hpb=7a3fc572b602b234f6977ab9d5900e571262a24e;p=ovsdb.git diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java index 2de4177ea..227608c2c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/UcastMacsRemoteUpdateCommand.java @@ -74,7 +74,7 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand { UcastMacsRemote ucastMacsRemote = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), UcastMacsRemote.class); setIpAddress(ucastMacsRemote, remoteUcastMac); setLocator(transaction, ucastMacsRemote, remoteUcastMac); - setLogicalSwitch(instanceIdentifier, ucastMacsRemote, remoteUcastMac); + setLogicalSwitch(ucastMacsRemote, remoteUcastMac); if (!operationalMacOptional.isPresent()) { setMac(ucastMacsRemote, remoteUcastMac, operationalMacOptional); transaction.add(op.insert(ucastMacsRemote)); @@ -90,18 +90,19 @@ public class UcastMacsRemoteUpdateCommand extends AbstractTransactCommand { } } - private void setLogicalSwitch(InstanceIdentifier iid, UcastMacsRemote ucastMacsRemote, RemoteUcastMacs inputMac) { + private void setLogicalSwitch(UcastMacsRemote ucastMacsRemote, RemoteUcastMacs inputMac) { if (inputMac.getLogicalSwitchRef() != null) { - HwvtepNodeName lswitchName = new HwvtepNodeName(inputMac.getLogicalSwitchRef().getValue()); + @SuppressWarnings("unchecked") + InstanceIdentifier lswitchIid = (InstanceIdentifier) inputMac.getLogicalSwitchRef().getValue(); Optional operationalSwitchOptional = - getOperationalState().getLogicalSwitches(iid, new LogicalSwitchesKey(lswitchName)); + getOperationalState().getLogicalSwitches(lswitchIid); if (operationalSwitchOptional.isPresent()) { Uuid logicalSwitchUuid = operationalSwitchOptional.get().getLogicalSwitchUuid(); UUID logicalSwitchUUID = new UUID(logicalSwitchUuid.getValue()); ucastMacsRemote.setLogicalSwitch(logicalSwitchUUID); } else { - LOG.warn("Create or update remoteUcastMac: No logical switch named {} found in operational datastore!", - lswitchName); + LOG.warn("Create or update remoteUcastMac: No logical switch with iid {} found in operational datastore!", + lswitchIid); } } }