import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.utils.Status;
import org.opendaylight.controller.sal.utils.StatusCode;
import org.opendaylight.ovsdb.schema.openvswitch.Port;
import org.opendaylight.ovsdb.utils.config.ConfigProperties;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
OvsdbConnectionService connectionService;
OvsdbInventoryService ovsdbInventoryService;
- protected static final String OPENFLOW_10 = "1.0";
protected static final String OPENFLOW_13 = "1.3";
void init() {
*
*/
void start() {
- registerWithOSGIConsole();
- }
-
- private void registerWithOSGIConsole() {
- BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass())
- .getBundleContext();
- bundleContext.registerService(CommandProvider.class.getName(), this,
- null);
}
/**
}
}
- private IClusterGlobalServices clusterServices;
-
- public void setClusterServices(IClusterGlobalServices i) {
- this.clusterServices = i;
- }
-
- public void unsetClusterServices(IClusterGlobalServices i) {
- if (this.clusterServices == i) {
- this.clusterServices = null;
- }
- }
-
private Connection getConnection (Node node) {
Connection connection = connectionService.getConnection(node);
if (connection == null || !connection.getClient().isActive()) {
String ofVersion = System.getProperty("ovsdb.of.version", OPENFLOW_13);
switch (ofVersion) {
- case OPENFLOW_10:
- protocols.add("OpenFlow10");
- break;
case OPENFLOW_13:
//fall through
default: