+ "to same device, hence dropping the request {}", connection, hwvtepGlobal);
} else {
try {
- hcm.connect(HwvtepSouthboundMapper.createInstanceIdentifier(node.getNodeId()), hwvtepGlobal);
+ OvsdbClient client = hcm.connect(key, hwvtepGlobal);
} catch (UnknownHostException e) {
- LOG.warn("Failed to connect to OVSDB node", e);
+ LOG.warn("Failed to connect to HWVTEP node", e);
}
}
}
if (client == null) {
try {
hcm.disconnect(hgOriginal);
- hcm.connect(HwvtepSouthboundMapper.createInstanceIdentifier(original.getNodeId()), hgUpdated);
+ hcm.stopConnectionReconciliationIfActive(key, hgOriginal);
+ OvsdbClient newClient = hcm.connect(key, hgUpdated);
+ if (newClient == null) {
+ hcm.reconcileConnection(key, hgUpdated);
+ }
} catch (UnknownHostException e) {
- LOG.warn("Failed to update connection on OVSDB Node", e);
+ LOG.warn("Failed to update connection on HWVTEP Node", e);
}
}
}
}
private void updateData(Collection<DataTreeModification<Node>> changes) {
- /* TODO:
+ /* TODO:
* Get connection instances for each change
* Update data for each connection
* Requires Command patterns. TBD.
if (hgDeleted != null) {
try {
hcm.disconnect(hgDeleted);
+ hcm.stopConnectionReconciliationIfActive(key, hgDeleted);
} catch (UnknownHostException e) {
- LOG.warn("Failed to disconnect OVSDB Node", e);
+ LOG.warn("Failed to disconnect HWVTEP Node", e);
}
}
}