Summary: Add initial support for OpenVswitch to the KVM hypervisor

Create OvsVifDriver to deal with openvswitch specifics for plugging
intefaces

Create a parameter to set the bridge type to use in
LibvirtComputingResource. 
Create several functions to get bridge information from openvswitch

Add a check to detect the libvirt version and throw an exception when
the version is to low ( < 0.9.11 )

Fix classpath loading in Script.findScript to deal with missing path
separators at the end.

Add notification to the BridgeVifDriver that lswitch broadcast type is
not supported.
This commit is contained in:
Hugo Trippaers 2013-01-10 18:30:07 +01:00
parent 3d570c7647
commit 68523e641f

View File

@ -84,11 +84,11 @@ public class OvsVifDriver extends VifDriverBase {
&& !vlanId.equalsIgnoreCase("untagged")) {
if(trafficLabel != null && !trafficLabel.isEmpty()) {
s_logger.debug("creating a vlan dev and bridge for guest traffic per traffic label " + trafficLabel);
intf.defBridgeNet(_pifs.get(trafficLabel), null, nic.getMac(), getGuestNicModel(guestOsType));
intf.setVlanTag(Integer.parseInt(vlanId));
String brName = createVlanBr(vlanId, _pifs.get(trafficLabel));
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
} else {
intf.defBridgeNet(_pifs.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType));
intf.setVlanTag(Integer.parseInt(vlanId));
String brName = createVlanBr(vlanId, _pifs.get("private"));
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
}
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + logicalSwitchUuid);