cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [05/50] [abbrv] git commit: updated refs/heads/opendaylight to 858fb69
Date Fri, 03 Jan 2014 10:17:38 GMT
CLOUDSTACK-5697 - public ip ranges should allow VNI rather than only working with untagged


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

Branch: refs/heads/opendaylight
Commit: c99f0f925b5cf6af2df4bd8c6bd5e2848bb7245a
Parents: b477e4e
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Dec 31 16:03:06 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Dec 31 16:09:52 2013 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/BridgeVifDriver.java   |  3 ++-
 .../kvm/resource/LibvirtComputingResource.java           | 11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c99f0f92/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
index b3bd3b3..57b111e 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
@@ -120,7 +120,8 @@ public class BridgeVifDriver extends VifDriverBase {
             intf.defBridgeNet(_bridges.get("linklocal"), null, nic.getMac(), getGuestNicModel(guestOsType));
         } else if (nic.getType() == Networks.TrafficType.Public) {
             Integer networkRateKBps = (nic.getNetworkRateMbps() != null && nic.getNetworkRateMbps().intValue()
!= -1) ? nic.getNetworkRateMbps().intValue() * 128 : 0;
-            if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan && !vNetId.equalsIgnoreCase("untagged"))
{
+            if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan && !vNetId.equalsIgnoreCase("untagged")
||
+                nic.getBroadcastType() == Networks.BroadcastDomainType.Vxlan) {
                 if (trafficLabel != null && !trafficLabel.isEmpty()) {
                     s_logger.debug("creating a vNet dev and bridge for public traffic per
traffic label " + trafficLabel);
                     String brName = createVnetBr(vNetId, trafficLabel, protocol);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c99f0f92/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 63c2a08..b3deb55 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -989,6 +989,17 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
             }
         }
 
+        // public creates bridges on a pif, if private bridge not found try pif direct
+        // This addresses the unnecessary requirement of someone to create an unused bridge
just for traffic label
+        if (_pifs.get("public") == null) {
+            s_logger.debug("public traffic label '" + _publicBridgeName+ "' not found as
bridge, looking for physical interface");
+            File dev = new File("/sys/class/net/" + _publicBridgeName);
+            if (dev.exists()) {
+                s_logger.debug("public traffic label '" + _publicBridgeName + "' found as
a physical device");
+                _pifs.put("public", _publicBridgeName);
+            }
+        }
+
         s_logger.debug("done looking for pifs, no more bridges");
     }
 


Mime
View raw message