OVSDB should be "Ovsdb" in Camel Case.
This patch fixes some mis-Camelizations
Change-Id: I70fa37e59ccfadbf9e28001cb18197e9c69dc19c
Signed-off-by: Dave Tucker <djt@redhat.com>
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.plugin.Connection;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.plugin.StatusWithUuid;
import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
private Logger log = LoggerFactory.getLogger(OvsdbPluginIT.class);
@Inject
private BundleContext bc;
- private OVSDBConfigService ovsdbConfigService = null;
+ private OvsdbConfigService ovsdbConfigService = null;
private Node node = null;
private OvsdbClient client = null;
} catch (Exception e) {
fail("Exception : "+e.getMessage());
}
- this.ovsdbConfigService = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ this.ovsdbConfigService = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
}
@Test
import java.util.Map;
import org.opendaylight.ovsdb.lib.notation.json.Converter;
-import org.opendaylight.ovsdb.lib.notation.json.OvsDBMapSerializer;
+import org.opendaylight.ovsdb.lib.notation.json.OvsdbMapSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
@JsonDeserialize(converter = Converter.MapConverter.class)
-@JsonSerialize(using = OvsDBMapSerializer.class)
-public class OvsDBMap<K, V> extends ForwardingMap<K, V> {
+@JsonSerialize(using = OvsdbMapSerializer.class)
+public class OvsdbMap<K, V> extends ForwardingMap<K, V> {
Map<K, V> target = Maps.newHashMap();
- public OvsDBMap() {
+ public OvsdbMap() {
this(Maps.<K,V>newHashMap());
}
- public OvsDBMap(Map<K, V> value) {
+ public OvsdbMap(Map<K, V> value) {
this.target = value;
}
return target;
}
- public static<K,V> OvsDBMap<K,V> fromMap(Map<K, V> value) {
- return new OvsDBMap<K,V>(value);
+ public static<K,V> OvsdbMap<K,V> fromMap(Map<K, V> value) {
+ return new OvsdbMap<K,V>(value);
}
}
import com.google.common.collect.Sets;
import org.opendaylight.ovsdb.lib.notation.json.Converter;
-import org.opendaylight.ovsdb.lib.notation.json.OvsDBSetSerializer;
+import org.opendaylight.ovsdb.lib.notation.json.OvsdbSetSerializer;
import java.util.Set;
@JsonDeserialize(converter = Converter.SetConverter.class)
-@JsonSerialize(using = OvsDBSetSerializer.class)
-public class OvsDBSet<T> extends ForwardingSet<T> {
+@JsonSerialize(using = OvsdbSetSerializer.class)
+public class OvsdbSet<T> extends ForwardingSet<T> {
Set<T> target = null;
- public OvsDBSet() {
+ public OvsdbSet() {
this(Sets.<T>newHashSet());
}
- public OvsDBSet(Set<T> backing) {
+ public OvsdbSet(Set<T> backing) {
this.target = backing;
}
return target;
}
- public static<D> OvsDBSet<D> fromSet(Set<D> value) {
- return new OvsDBSet<>(value);
+ public static<D> OvsdbSet<D> fromSet(Set<D> value) {
+ return new OvsdbSet<>(value);
}
}
import org.opendaylight.ovsdb.lib.message.TableUpdates;
import org.opendaylight.ovsdb.lib.message.UpdateNotification;
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbMap;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import org.opendaylight.ovsdb.lib.notation.UUID;
import com.fasterxml.jackson.databind.DeserializationFeature;
static SetDeser setDeser = new SetDeser();
static UpdateNotificationDeser unDeser = new UpdateNotificationDeser();
- public static class MapConverter extends StdConverter<JsonNode, OvsDBMap<Object, Object>> {
+ public static class MapConverter extends StdConverter<JsonNode, OvsdbMap<Object, Object>> {
@Override
- public OvsDBMap<Object, Object> convert(JsonNode value) {
+ public OvsdbMap<Object, Object> convert(JsonNode value) {
return mapDeser.deserialize(value);
}
}
- public static class SetConverter extends StdConverter<JsonNode, OvsDBSet<Object>> {
+ public static class SetConverter extends StdConverter<JsonNode, OvsdbSet<Object>> {
@Override
- public OvsDBSet<Object> convert(JsonNode value) {
+ public OvsdbSet<Object> convert(JsonNode value) {
return setDeser.deserialize(value);
}
}
}
static class MapDeser {
- public OvsDBMap<Object, Object> deserialize(JsonNode node) {
+ public OvsdbMap<Object, Object> deserialize(JsonNode node) {
if (node.isArray()) {
if (node.size() == 2) {
if (node.get(0).isTextual() && "map".equals(node.get(0).asText())) {
- OvsDBMap<Object, Object> map = new OvsDBMap<Object, Object>();
+ OvsdbMap<Object, Object> map = new OvsdbMap<Object, Object>();
for (JsonNode pairNode : node.get(1)) {
if (pairNode.isArray() && node.size() == 2) {
Object key = atomDeser.deserialize(pairNode.get(0));
}
static class SetDeser {
- public OvsDBSet<Object> deserialize(JsonNode node) {
- OvsDBSet<Object> set = new OvsDBSet<Object>();
+ public OvsdbSet<Object> deserialize(JsonNode node) {
+ OvsdbSet<Object> set = new OvsdbSet<Object>();
if (node.isArray()) {
if (node.size() == 2) {
if (node.get(0).isTextual() && "set".equals(node.get(0).asText())) {
import java.io.IOException;
import java.util.Map;
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
+import org.opendaylight.ovsdb.lib.notation.OvsdbMap;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-public class OvsDBMapSerializer extends JsonSerializer<OvsDBMap<?,?>> {
+public class OvsdbMapSerializer extends JsonSerializer<OvsdbMap<?,?>> {
@Override
- public void serialize(OvsDBMap<?,?> map, JsonGenerator generator,
+ public void serialize(OvsdbMap<?,?> map, JsonGenerator generator,
SerializerProvider provider) throws IOException,
JsonProcessingException {
generator.writeStartArray();
import java.io.IOException;
import java.util.Set;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
-public class OvsDBSetSerializer extends JsonSerializer<OvsDBSet<?>> {
+public class OvsdbSetSerializer extends JsonSerializer<OvsdbSet<?>> {
@Override
- public void serialize(OvsDBSet<?> set, JsonGenerator generator,
+ public void serialize(OvsdbSet<?> set, JsonGenerator generator,
SerializerProvider provider) throws IOException,
JsonProcessingException {
generator.writeStartArray();
import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
import com.fasterxml.jackson.databind.type.TypeFactory;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import org.opendaylight.ovsdb.lib.notation.UUID;
-public class OVSDBTypesIDResolver implements TypeIdResolver {
+public class OvsdbTypesIdResolver implements TypeIdResolver {
private JavaType baseType;
@Override
public JavaType typeFromId(String id) {
if ("set".equals(id)) {
- return TypeFactory.defaultInstance().constructCollectionType(OvsDBSet.class, Object.class);
+ return TypeFactory.defaultInstance().constructCollectionType(OvsdbSet.class, Object.class);
} else if ("uuid".equals(id) || "named-uuid".equals(id)) {
return TypeFactory.defaultInstance().constructType(UUID.class);
}
import org.opendaylight.ovsdb.lib.error.BadSchemaException;
import org.opendaylight.ovsdb.lib.notation.Condition;
import org.opendaylight.ovsdb.lib.notation.Function;
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbMap;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import com.fasterxml.jackson.databind.JsonNode;
public Object getNormalizeData(D value) {
Object untypedValue = null;
if (value instanceof Set) {
- untypedValue = OvsDBSet.fromSet((Set) value);
+ untypedValue = OvsdbSet.fromSet((Set) value);
} else if (value instanceof Map) {
- untypedValue = OvsDBMap.fromMap((Map)value);
+ untypedValue = OvsdbMap.fromMap((Map) value);
} else {
untypedValue = value;
}
import org.opendaylight.ovsdb.lib.error.TyperException;
import org.opendaylight.ovsdb.lib.jsonrpc.JsonUtils;
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbMap;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.JsonNode;
@Override
public Object valueFromJson(JsonNode value) {
if (isMultiValued()) {
- OvsDBSet<Object> result = new OvsDBSet<Object>();
+ OvsdbSet<Object> result = new OvsdbSet<Object>();
if(value.isArray()) {
if (value.size() == 2) {
if (value.get(0).isTextual() && "set".equals(value.get(0).asText())) {
if (node.isArray()) {
if (node.size() == 2) {
if (node.get(0).isTextual() && "map".equals(node.get(0).asText())) {
- OvsDBMap<Object, Object> map = new OvsDBMap<Object, Object>();
+ OvsdbMap<Object, Object> map = new OvsdbMap<Object, Object>();
for (JsonNode pairNode : node.get(1)) {
if (pairNode.isArray() && node.size() == 2) {
Object key = getKeyType().toValue(pairNode.get(0));
import org.opendaylight.ovsdb.neutron.provider.IProviderNetworkManager;
import org.opendaylight.ovsdb.neutron.provider.ProviderNetworkManager;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
-import org.opendaylight.ovsdb.plugin.OVSDBInventoryListener;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbInventoryListener;
/**
* OSGi bundle activator for the OVSDB Neutron Interface.
}
if (imp.equals(SouthboundHandler.class)) {
- c.setInterface(new String[] {OVSDBInventoryListener.class.getName(), IInventoryListener.class.getName()}, null);
+ c.setInterface(new String[] {OvsdbInventoryListener.class.getName(), IInventoryListener.class.getName()}, null);
c.add(createServiceDependency().setService(IAdminConfigManager.class).setRequired(true));
c.add(createServiceDependency().setService(IInternalNetworkManager.class).setRequired(true));
c.add(createServiceDependency().setService(ITenantNetworkManager.class).setRequired(true));
//ToDo: DT: We don't need these dependencies for every implementation...
//ToDo: DT: Callbacks are only required when behaviour is more complex than simple set/unset operation
c.add(createServiceDependency().
- setService(OVSDBConfigService.class).
+ setService(OvsdbConfigService.class).
setCallbacks("setOVSDBConfigService", "unsetOVSDBConfigService").
setRequired(true));
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.ovsdb.lib.notation.Row;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Override
public InetAddress getTunnelEndPoint(Node node) {
InetAddress address = null;
- OVSDBConfigService ovsdbConfig = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbConfig = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Map<String, Row> ovsTable = ovsdbConfig.getRows(node, ovsdbConfig.getTableName(node, OpenVSwitch.class));
public String getPhysicalInterfaceName (Node node, String physicalNetwork) {
String phyIf = null;
- OVSDBConfigService ovsdbConfig = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbConfig = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Map<String, Row> ovsTable = ovsdbConfig.getRows(node, ovsdbConfig.getTableName(node, OpenVSwitch.class));
List<String> phyIfName = new ArrayList<String>();
try {
- OVSDBConfigService ovsdbConfig = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbConfig = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> ovsTable = ovsdbConfig.getRows(node, ovsdbConfig.getTableName(node, OpenVSwitch.class));
if (ovsTable == null) {
import org.opendaylight.controller.sal.utils.Status;
import org.opendaylight.controller.sal.utils.StatusCode;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
this.frm = s;
}
- protected OVSDBConfigService ovsdbConfigService;
+ protected OvsdbConfigService ovsdbConfigService;
- public OVSDBConfigService getOVSDBConfigService() {
+ public OvsdbConfigService getOVSDBConfigService() {
return ovsdbConfigService;
}
- public void unsetOVSDBConfigService(OVSDBConfigService s) {
+ public void unsetOVSDBConfigService(OvsdbConfigService s) {
if (s == this.ovsdbConfigService) {
this.ovsdbConfigService = null;
}
}
- public void setOVSDBConfigService(OVSDBConfigService s) {
+ public void setOVSDBConfigService(OvsdbConfigService s) {
this.ovsdbConfigService = s;
}
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.neutron.provider.IProviderNetworkManager;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.plugin.StatusWithUuid;
import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
@Override
public String getInternalBridgeUUID (Node node, String bridgeName) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable == null) return null;
for (String key : bridgeTable.keySet()) {
public Bridge getInternalBridge (Node node, String bridgeName) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable != null) {
for (String key : bridgeTable.keySet()) {
@Override
public boolean isPortOnBridge (Node node, Bridge bridge, String portName) {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
for (UUID portsUUID : bridge.getPortsColumn().getData()) {
try {
private Status addPortToBridge (Node node, String bridgeName, String portName) throws Exception {
logger.debug("addPortToBridge: Adding port: {} to Bridge {}, Node {}", portName, bridgeName, node);
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
String bridgeUUID = this.getInternalBridgeUUID(node, bridgeName);
if (bridgeUUID == null) {
}
private Status addPatchPort (Node node, String bridgeUUID, String portName, String peerPortName) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
logger.debug("addPatchPort: node: {}, bridgeUUID: {}, port: {}, peer: {}",
node, bridgeUUID, portName, peerPortName);
}
private Status addInternalBridge (Node node, String bridgeName, String localPatchName, String remotePatchName) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
String bridgeUUID = this.getInternalBridgeUUID(node, bridgeName);
Bridge bridge = ovsdbTable.createTypedRow(node, Bridge.class);
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBInventoryListener;
+import org.opendaylight.ovsdb.plugin.OvsdbInventoryListener;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
List <NeutronNetwork> networks = new ArrayList<NeutronNetwork>();
if (neutronNetworkService != null) {
networks = neutronNetworkService.getAllNetworks();
- OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
+ OvsdbInventoryListener inventoryListener = (OvsdbInventoryListener)ServiceHelper.getGlobalInstance(OvsdbInventoryListener.class, this);
if (networks.isEmpty()) {
logger.trace("neutronNetworkDeleted: last tenant network, delete tunnel ports...");
IConnectionServiceInternal connectionService = (IConnectionServiceInternal)
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.opendaylight.ovsdb.schema.openvswitch.Port;
import org.slf4j.Logger;
private void initializeNodeConfiguration(Node node) {
int vlan = 0;
String networkId = new String();
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Map<String, Row> portRows = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Port.class));
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBInventoryListener;
+import org.opendaylight.ovsdb.plugin.OvsdbInventoryListener;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
IConnectionServiceInternal connectionService = (IConnectionServiceInternal)ServiceHelper.getGlobalInstance(IConnectionServiceInternal.class, this);
INeutronNetworkCRUD neutronNetworkService = (INeutronNetworkCRUD)ServiceHelper.getGlobalInstance(INeutronNetworkCRUD.class, this);
NeutronNetwork neutronNetwork = neutronNetworkService.getNetwork(port.getNetworkUUID());
- OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
+ OvsdbInventoryListener inventoryListener = (OvsdbInventoryListener)ServiceHelper.getGlobalInstance(OvsdbInventoryListener.class, this);
List<Node> nodes = connectionService.getNodes();
for (Node node : nodes) {
try {
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.neutron.provider.IProviderNetworkManager;
-import org.opendaylight.ovsdb.plugin.OVSDBInventoryListener;
+import org.opendaylight.ovsdb.plugin.OvsdbInventoryListener;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
import org.opendaylight.ovsdb.schema.openvswitch.Port;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SouthboundHandler extends BaseHandler implements OVSDBInventoryListener, IInventoryListener {
+public class SouthboundHandler extends BaseHandler implements OvsdbInventoryListener, IInventoryListener {
static final Logger logger = LoggerFactory.getLogger(SouthboundHandler.class);
//private Thread eventThread;
private ExecutorService eventHandler;
import org.opendaylight.controller.sal.utils.HexEncode;
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.controller.sal.utils.Status;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.neutron.provider.IProviderNetworkManager;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
private String getNodeUUID(Node node) {
String nodeUuid = new String();
- OVSDBConfigService ovsdbConfigService = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbConfigService = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Map<String, Row> ovsTable = ovsdbConfigService.getRows(node, ovsdbConfigService.getTableName(node, OpenVSwitch.class));
nodeUuid = (String)ovsTable.keySet().toArray()[0];
return false;
}
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
/*
// Vlan Tag based identification
logger.error("Unable to get an internalVlan for Network {}", network);
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Port port = ovsdbTable.createTypedRow(node, Port.class);
- OvsDBSet<Long> tags = new OvsDBSet<Long>();
+ OvsdbSet<Long> tags = new OvsdbSet<Long>();
tags.add(Long.valueOf(vlan));
port.setTag(tags);
ovsdbTable.updateRow(node, port.getSchema().getName(), null, portUUID, port.getRow());
logger.error("ContainerManager is not accessible");
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Row portRow = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Port.class), portUUID);
Port port = ovsdbTable.getTypedRow(node, Port.class, portRow);
}
private Bridge getBridgeIdForPort (Node node, String uuid) {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
try {
Map<String, Row> bridges = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridges == null) return null;
import org.opendaylight.ovsdb.neutron.ITenantNetworkManager;
import org.opendaylight.ovsdb.neutron.NetworkHandler;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.plugin.StatusWithUuid;
import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
return;
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brNetId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
long patchOFPort = -1;
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> intfs = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Interface.class));
if (intfs != null) {
for (Row row : intfs.values()) {
long patchOFPort = -1;
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> intfs = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Interface.class));
if (intfs != null) {
for (Row row : intfs.values()) {
public long getOFPort (Node node, String portName) {
long ofPort = -1;
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> intfs = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Interface.class));
if (intfs != null) {
for (Row row : intfs.values()) {
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brUUID);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
private Interface getTunnelInterface (Node node, String tunnelType, InetAddress dst, String key) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
String portName = getTunnelName(tunnelType, key, dst);
Map<String, Row> tunIntfs = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Interface.class));
}
private boolean isTunnelPresent(Node node, String tunnelName, String bridgeUUID) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), bridgeUUID);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
if (bridge != null) {
}
private String getPortUuid(Node node, String portName, String bridgeUUID) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), bridgeUUID);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
if (bridge != null) {
try {
String bridgeUUID = null;
String tunnelBridgeName = adminConfigManager.getNetworkBridgeName();
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable != null) {
for (String uuid : bridgeTable.keySet()) {
private Status deletePort(Node node, String bridgeName, String portName) {
try {
String bridgeUUID = null;
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable != null) {
for (String uuid : bridgeTable.keySet()) {
}
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row row = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), brIntId);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, row);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
private String getInternalBridgeUUID (Node node, String bridgeName) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable == null) return null;
for (String key : bridgeTable.keySet()) {
import org.opendaylight.ovsdb.neutron.ITenantNetworkManager;
import org.opendaylight.ovsdb.neutron.NetworkHandler;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.plugin.StatusWithUuid;
import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
import org.opendaylight.ovsdb.schema.openvswitch.Interface;
}
private boolean isTunnelPresent(Node node, String tunnelName, String bridgeUUID) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row bridgeRow = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), bridgeUUID);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, bridgeRow);
if (bridge != null) {
}
private String getPortUuid(Node node, String name, String bridgeUUID) throws Exception {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row bridgeRow = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), bridgeUUID);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, bridgeRow);
if (bridge != null) {
try {
String bridgeUUID = null;
String tunnelBridgeName = adminConfigManager.getIntegrationBridgeName();
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable != null) {
for (String uuid : bridgeTable.keySet()) {
private Status deletePort(Node node, String bridgeName, String portName) {
try {
String bridgeUUID = null;
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable != null) {
for (String uuid : bridgeTable.keySet()) {
}
private Long getDpid (Node node, String bridgeUuid) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Row bridgeRow = ovsdbTable.getRow(node, ovsdbTable.getTableName(node, Bridge.class), bridgeUuid);
Bridge bridge = ovsdbTable.getTypedRow(node, Bridge.class, bridgeRow);
Set<String> dpids = bridge.getDatapathIdColumn().getData();
logger.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Set<Long> of_ports = intf.getOpenFlowPortColumn().getData();
if (of_ports == null || of_ports.size() <= 0) {
logger.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Set<Long> of_ports = intf.getOpenFlowPortColumn().getData();
if (of_ports == null || of_ports.size() <= 0) {
logger.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Set<Long> of_ports = intf.getOpenFlowPortColumn().getData();
int timeout = 6;
logger.debug("Openflow Datapath-ID not set for the integration bridge in {}", node);
return;
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService) ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService) ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Set<Long> of_ports = intf.getOpenFlowPortColumn().getData();
if (of_ports == null || of_ports.size() <= 0) {
private Status triggerInterfaceUpdates(Node node) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> intfs = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Interface.class));
if (intfs != null) {
for (Row row : intfs.values()) {
private String getInternalBridgeUUID (Node node, String bridgeName) {
try {
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class, this);
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class, this);
Map<String, Row> bridgeTable = ovsdbTable.getRows(node, ovsdbTable.getTableName(node, Bridge.class));
if (bridgeTable == null) return null;
for (String key : bridgeTable.keySet()) {
import org.opendaylight.controller.sal.utils.ServiceHelper;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.plugin.ConfigurationService;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
public class AdminConfigManagerTest {
AdminConfigManager adminConfigManager;
- private OVSDBConfigService ovsdbConfig;
+ private OvsdbConfigService ovsdbConfig;
private Node node;
private OpenVSwitch ovsTable;
private ConcurrentMap<String, Row> ovsMap;
node = mock(Node.class);
ovsdbConfig = mock(ConfigurationService.class);
PowerMockito.mockStatic(ServiceHelper.class);
- when(ServiceHelper.getGlobalInstance(eq(OVSDBConfigService.class), anyObject())).thenReturn(ovsdbConfig);
+ when(ServiceHelper.getGlobalInstance(eq(OvsdbConfigService.class), anyObject())).thenReturn(ovsdbConfig);
ovsTable = PowerMockito.mock(OpenVSwitch.class);
ovsMap = new ConcurrentHashMap<>();
ovsTable.setOtherConfig(localIp);
ovsMap.put("OpenVSwitch", ovsTable.getRow());
- OVSDBConfigService ovsdbConfig = mock(ConfigurationService.class);
+ OvsdbConfigService ovsdbConfig = mock(ConfigurationService.class);
when(ovsdbConfig.getRows(any(Node.class), anyString())).thenReturn(null)
.thenReturn(ovsMap);
PowerMockito.mockStatic(ServiceHelper.class);
- when(ServiceHelper.getGlobalInstance(eq(OVSDBConfigService.class), anyObject())).thenReturn(ovsdbConfig);
+ when(ServiceHelper.getGlobalInstance(eq(OvsdbConfigService.class), anyObject())).thenReturn(ovsdbConfig);
// OVSDBConfigService is null
assertEquals(null, adminConfigManager.getTunnelEndPoint(mockNode));
ovsMap.put("1", ovsRow1.getRow());
ovsMap.put("2", ovsRow2.getRow());
- OVSDBConfigService ovsdbConfig = mock(ConfigurationService.class);
+ OvsdbConfigService ovsdbConfig = mock(ConfigurationService.class);
when(ovsdbConfig.getRows(any(Node.class), anyString())).thenReturn(ovsMap);
PowerMockito.mockStatic(ServiceHelper.class);
- when(ServiceHelper.getGlobalInstance(eq(OVSDBConfigService.class), anyObject())).thenReturn(ovsdbConfig);
+ when(ServiceHelper.getGlobalInstance(eq(OvsdbConfigService.class), anyObject())).thenReturn(ovsdbConfig);
// Success...
assertEquals(testAddress, adminConfigManager.getTunnelEndPoint(mockNode));
import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
import org.opendaylight.ovsdb.plugin.Connection;
import org.opendaylight.ovsdb.plugin.IConnectionServiceInternal;
-import org.opendaylight.ovsdb.plugin.OVSDBConfigService;
+import org.opendaylight.ovsdb.plugin.OvsdbConfigService;
import org.opendaylight.ovsdb.plugin.OvsVswitchdSchemaConstants;
import org.opendaylight.ovsdb.plugin.StatusWithUuid;
import org.slf4j.Logger;
throw new UnauthorizedException("User is not authorized to perform this operation");
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class,
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class,
this);
if (ovsdbTable == null) {
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
throw new UnauthorizedException("User is not authorized to perform this operation");
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class,
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class,
this);
if (ovsdbTable == null) {
throw new ServiceUnavailableException("UserManager " + RestMessages.SERVICEUNAVAILABLE.toString());
throw new UnauthorizedException("User is not authorized to perform this operation");
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class,
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class,
this);
if (ovsdbTable == null) {
throw new ServiceUnavailableException("UserManager " + RestMessages.SERVICEUNAVAILABLE.toString());
throw new UnauthorizedException("User is not authorized to perform this operation");
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class,
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class,
this);
if (ovsdbTable == null) {
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
throw new UnauthorizedException("User is not authorized to perform this operation");
}
- OVSDBConfigService ovsdbTable = (OVSDBConfigService)ServiceHelper.getGlobalInstance(OVSDBConfigService.class,
+ OvsdbConfigService ovsdbTable = (OvsdbConfigService)ServiceHelper.getGlobalInstance(OvsdbConfigService.class,
this);
if (ovsdbTable == null) {
throw new ServiceUnavailableException("OVS Configuration Service " + RestMessages.SERVICEUNAVAILABLE.toString());
// by SAL
props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "OVS");
c.setInterface(new String[] { IPluginInBridgeDomainConfigService.class.getName(),
- OVSDBConfigService.class.getName()}, props);
+ OvsdbConfigService.class.getName()}, props);
c.add(createServiceDependency()
.setService(IConnectionServiceInternal.class)
"unsetPluginOutInventoryServices")
.setRequired(true));
c.add(createServiceDependency()
- .setService(OVSDBConfigService.class)
+ .setService(OvsdbConfigService.class)
.setCallbacks("setConfigurationService", "unsetConfigurationService")
.setRequired(false));
}
import org.opendaylight.ovsdb.lib.OvsdbClient;
import org.opendaylight.ovsdb.lib.notation.Column;
import org.opendaylight.ovsdb.lib.notation.Mutator;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
+import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
import org.opendaylight.ovsdb.lib.notation.Row;
import org.opendaylight.ovsdb.lib.notation.UUID;
import org.opendaylight.ovsdb.lib.operations.Insert;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ListenableFuture;
-public class ConfigurationService implements IPluginInBridgeDomainConfigService, OVSDBConfigService,
+public class ConfigurationService implements IPluginInBridgeDomainConfigService, OvsdbConfigService,
CommandProvider
{
private static final Logger logger = LoggerFactory
return false;
}
- OvsDBSet<String> protocols = new OvsDBSet<String>();
+ OvsdbSet<String> protocols = new OvsdbSet<String>();
String ofVersion = System.getProperty("ovsdb.of.version", OPENFLOW_10);
switch (ofVersion) {
private ConcurrentMap<NodeConnector, Map<String, Property>> nodeConnectorProps = new ConcurrentHashMap<NodeConnector, Map<String, Property>>();
private ConcurrentMap<Node, NodeDB> dbCache = Maps.newConcurrentMap();
private ScheduledExecutorService executor;
- private OVSDBConfigService configurationService;
+ private OvsdbConfigService configurationService;
/**
* Function called by the dependency manager when all the required
this.pluginOutInventoryServices.remove(service);
}
- public void setConfigurationService(OVSDBConfigService service) {
+ public void setConfigurationService(OvsdbConfigService service) {
configurationService = service;
}
- public void unsetConfigurationService(OVSDBConfigService service) {
+ public void unsetConfigurationService(OvsdbConfigService service) {
configurationService = null;
}
dbCache.put(n, db);
}
- OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
+ OvsdbInventoryListener inventoryListener = (OvsdbInventoryListener)ServiceHelper.getGlobalInstance(OvsdbInventoryListener.class, this);
for (String tableName : tableUpdates.getUpdates().keySet()) {
Map<String, Row> tCache = db.getTableCache(databaseName, tableName);
TableUpdate update = tableUpdates.getUpdates().get(tableName);
@Override
public void notifyNodeAdded(Node node) {
- OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
+ OvsdbInventoryListener inventoryListener = (OvsdbInventoryListener)ServiceHelper.getGlobalInstance(OvsdbInventoryListener.class, this);
if (inventoryListener != null) {
inventoryListener.nodeAdded(node);
}
@Override
public void removeNode(Node node) {
- OVSDBInventoryListener inventoryListener = (OVSDBInventoryListener)ServiceHelper.getGlobalInstance(OVSDBInventoryListener.class, this);
+ OvsdbInventoryListener inventoryListener = (OvsdbInventoryListener)ServiceHelper.getGlobalInstance(OvsdbInventoryListener.class, this);
if (inventoryListener != null) {
inventoryListener.nodeRemoved(node);
}
import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
-public interface OVSDBConfigService {
+public interface OvsdbConfigService {
/**
* This version of insertRow is a short-term replacement for the older & now deprecated method of the same name.
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.ovsdb.lib.notation.Row;
-public interface OVSDBInventoryListener {
+public interface OvsdbInventoryListener {
public void nodeAdded(Node node);
public void nodeRemoved(Node node);
public void rowAdded(Node node, String tableName, String uuid, Row row);