public void updateElanInterfaceForwardingTablesList(String elanInstanceName, String interfaceName,
String existingInterfaceName, MacEntry mac, WriteTransaction tx) {
if (existingInterfaceName.equals(interfaceName)) {
LOG.error(String.format(
"Static MAC address %s has already been added for the same ElanInstance "
+ "%s on the same Logical Interface Port %s."
+ " No operation will be done.",
mac.getMacAddress().toString(), elanInstanceName, interfaceName));
} else {
LOG.warn(String.format(
"Static MAC address %s had already been added for ElanInstance %s on Logical Interface Port %s. "
+ "This would be considered as MAC movement scenario and old static mac will be removed "
+ "and new static MAC will be added"
+ "for ElanInstance %s on Logical Interface Port %s",
mac.getMacAddress().toString(), elanInstanceName, interfaceName, elanInstanceName, interfaceName));
deleteElanInterfaceForwardingTablesList(existingInterfaceName, mac, tx);
createElanInterfaceForwardingTablesList(interfaceName, mac, tx);
updateElanForwardingTablesList(elanInstanceName, interfaceName, mac, tx);
}
}