incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [17/45] git commit: Summary: Add initial support for OpenVswitch to the KVM hypervisor
Date Wed, 23 Jan 2013 07:15:57 GMT
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.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/68523e64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/68523e64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/68523e64

Branch: refs/heads/master
Commit: 68523e641fa323e1303bfc7499a524b0475fa55f
Parents: 3d570c7
Author: Hugo Trippaers <trippie@gmail.com>
Authored: Thu Jan 10 18:30:07 2013 +0100
Committer: Hugo Trippaers <trippie@gmail.com>
Committed: Tue Jan 15 09:18:24 2013 +0100

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/OvsVifDriver.java      |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/68523e64/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
index 52fc29e..d8b80e9 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
@@ -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);
@@ -144,7 +144,7 @@ public class OvsVifDriver extends VifDriverBase {
         return brName;
     }
     
-	private void deleteExitingLinkLocalRoutTable(String linkLocalBr) {
+    private void deleteExitingLinkLocalRoutTable(String linkLocalBr) {
         Script command = new Script("/bin/bash", _timeout);
         command.add("-c");
         command.add("ip route | grep " + NetUtils.getLinkLocalCIDR());


Mime
View raw message