Skip to content

Commit 68523e6

Browse files
committed
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.
1 parent 3d570c7 commit 68523e6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
8484
&& !vlanId.equalsIgnoreCase("untagged")) {
8585
if(trafficLabel != null && !trafficLabel.isEmpty()) {
8686
s_logger.debug("creating a vlan dev and bridge for guest traffic per traffic label " + trafficLabel);
87-
intf.defBridgeNet(_pifs.get(trafficLabel), null, nic.getMac(), getGuestNicModel(guestOsType));
88-
intf.setVlanTag(Integer.parseInt(vlanId));
87+
String brName = createVlanBr(vlanId, _pifs.get(trafficLabel));
88+
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
8989
} else {
90-
intf.defBridgeNet(_pifs.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType));
91-
intf.setVlanTag(Integer.parseInt(vlanId));
90+
String brName = createVlanBr(vlanId, _pifs.get("private"));
91+
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
9292
}
9393
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
9494
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + logicalSwitchUuid);
@@ -144,7 +144,7 @@ private String setVnetBrName(String pifName, String vnetId) {
144144
return brName;
145145
}
146146

147-
private void deleteExitingLinkLocalRoutTable(String linkLocalBr) {
147+
private void deleteExitingLinkLocalRoutTable(String linkLocalBr) {
148148
Script command = new Script("/bin/bash", _timeout);
149149
command.add("-c");
150150
command.add("ip route | grep " + NetUtils.getLinkLocalCIDR());

0 commit comments

Comments
 (0)