Removed workaround codes related to OVSDB device availability issue
Change-Id: Id58812a16eba60ea368388dd6cadfa9102bd4f4c
diff --git a/src/main/java/org/onosproject/cordvtn/CordVtn.java b/src/main/java/org/onosproject/cordvtn/CordVtn.java
index a31917a..d56b3b6 100644
--- a/src/main/java/org/onosproject/cordvtn/CordVtn.java
+++ b/src/main/java/org/onosproject/cordvtn/CordVtn.java
@@ -395,10 +395,6 @@
}
if (!getOvsdbConnectionState(node)) {
- // FIXME remove existing OVSDB device to work around OVSDB device re-connect issue
- if (deviceService.getDevice(node.ovsdbId()) != null) {
- adminService.removeDevice(node.ovsdbId());
- }
controller.connect(node.ovsdbIp(), node.ovsdbPort());
}
}
@@ -420,11 +416,6 @@
OvsdbClientService ovsdbClient = getOvsdbClient(node);
ovsdbClient.disconnect();
}
-
- // FIXME remove existing OVSDB device to work around OVSDB device re-connect issue
- if (deviceService.getDevice(node.ovsdbId()) != null) {
- adminService.removeDevice(node.ovsdbId());
- }
}
/**
@@ -830,7 +821,9 @@
@Override
public void disconnected(Device device) {
- log.info("OVSDB {} is disconnected", device.id());
+ if (!deviceService.isAvailable(device.id())) {
+ adminService.removeDevice(device.id());
+ }
}
}