DataObjectModification<OvsdbNodeAugmentation> ovsdbNodeModification =
change.getRootNode().getModifiedAugmentation(OvsdbNodeAugmentation.class);
if (ovsdbNodeModification != null && ovsdbNodeModification.getDataBefore() == null
- && ovsdbNodeModification.getDataAfter() != null) {
+ && ovsdbNodeModification.getDataAfter() != null
+ && ovsdbNodeModification.getDataAfter().getConnectionInfo() != null) {
OvsdbNodeAugmentation ovsdbNode = ovsdbNodeModification.getDataAfter();
ConnectionInfo key = ovsdbNode.getConnectionInfo();
InstanceIdentifier<Node> iid = cm.getInstanceIdentifier(key);
DataObjectModification<OvsdbNodeAugmentation> ovsdbNodeModification =
change.getRootNode().getModifiedAugmentation(OvsdbNodeAugmentation.class);
if (ovsdbNodeModification != null && ovsdbNodeModification.getDataBefore() != null
- && ovsdbNodeModification.getDataAfter() != null) {
+ && ovsdbNodeModification.getDataAfter() != null
+ && ovsdbNodeModification.getDataAfter().getConnectionInfo() != null) {
OvsdbClient client = cm.getClient(ovsdbNodeModification.getDataAfter().getConnectionInfo());
if (client == null) {
if (ovsdbNodeModification.getDataBefore() != null) {
if (nodeModification != null && nodeModification.getDataAfter() != null && nodeModification
.getDataAfter().getConnectionInfo() != null) {
client = cm.getConnectionInstance(nodeModification.getDataAfter().getConnectionInfo());
+ } else if (nodeModification != null && nodeModification.getDataAfter() != null && nodeModification
+ .getDataAfter().getConnectionInfo() == null) {
+ InstanceIdentifier<Node> nodeIid = SouthboundMapper.createInstanceIdentifier(
+ node.getNodeId());
+ client = cm.getConnectionInstance(nodeIid);
} else {
if (node != null) {
List<TerminationPoint> terminationPoints = node.getTerminationPoint();
for (Entry<InstanceIdentifier<OvsdbNodeAugmentation>, OvsdbNodeAugmentation> ovsdbNodeEntry:
updated.entrySet()) {
OvsdbNodeAugmentation ovsdbNode = ovsdbNodeEntry.getValue();
- LOG.debug("Received request to update ovsdb node ip: {} port: {}",
+ if (ovsdbNode.getConnectionInfo() != null) {
+ LOG.debug("Received request to update ovsdb node ip: {} port: {}",
ovsdbNode.getConnectionInfo().getRemoteIp(),
ovsdbNode.getConnectionInfo().getRemotePort());
+ } else {
+ LOG.debug("Received request to update ovsdb node: {}", ovsdbNode);
+ }
// OpenVSwitchPart
OpenVSwitch ovs = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), OpenVSwitch.class);