package org.opendaylight.ovsdb.southbound.transactions.md;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
-
public class OvsdbNodeRemoveCommand extends AbstractTransactionCommand {
private static final Logger LOG = LoggerFactory.getLogger(OvsdbNodeRemoveCommand.class);
private static final long ONE_CONNECTED_MANAGER = 1;
getOvsdbConnectionInstance().getInstanceIdentifier());
} else {
LOG.debug("Other southbound plugin instances in cluster are connected to the device,"
- + " not deleting OvsdbNode form data store.");
+ + " not deleting OvsdbNode from operational data store.");
}
}
} catch (Exception e) {
- LOG.warn("Failure to delete ovsdbNode {}",e);
+ LOG.warn("Failure to delete ovsdbNode", e);
}
}
if (connectedManager == 0) {
return true;
}
- }
- /*When switch is listening in passive mode, this number represent number of active connection to the device
- This is to handle the controller initiated connection scenario, where all the controller will connect, but
- switch will have only one manager.
- */
- if (onlyConnectedManager.getNumberOfConnections().longValue() > ONE_ACTIVE_CONNECTION_IN_PASSIVE_MODE) {
- return false;
+
+ /*When switch is listening in passive mode, this number represent number of active connection to the device
+ This is to handle the controller initiated connection scenario, where all the controller will connect, but
+ switch will have only one manager.
+ */
+ if (onlyConnectedManager.getNumberOfConnections() > ONE_ACTIVE_CONNECTION_IN_PASSIVE_MODE) {
+ return false;
+ }
}
return true;
}