You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/01/15 09:21:19 UTC
[20/26] git commit: Summary: Add vlan configuration to the network
inteface definition
Summary: Add vlan configuration to the network inteface definition
Add xml piece for defining vlans
Set vlan tag in the libvirt definition for the network inteface
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e0ecf7b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e0ecf7b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e0ecf7b8
Branch: refs/heads/cloud-agent-with-openvswitch
Commit: e0ecf7b834d88d8b50064eba0e149e67bdf2de1e
Parents: 68523e6
Author: Hugo Trippaers <tr...@gmail.com>
Authored: Fri Jan 11 17:04:32 2013 +0100
Committer: Hugo Trippaers <tr...@gmail.com>
Committed: Tue Jan 15 09:18:24 2013 +0100
----------------------------------------------------------------------
.../hypervisor/kvm/resource/OvsVifDriver.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e0ecf7b8/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 d8b80e9..5b8fab1 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);
- String brName = createVlanBr(vlanId, _pifs.get(trafficLabel));
- intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
+ intf.defBridgeNet(_pifs.get(trafficLabel), null, nic.getMac(), getGuestNicModel(guestOsType));
+ intf.setVlanTag(Integer.parseInt(vlanId));
} else {
- String brName = createVlanBr(vlanId, _pifs.get("private"));
- intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
+ intf.defBridgeNet(_pifs.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType));
+ intf.setVlanTag(Integer.parseInt(vlanId));
}
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + logicalSwitchUuid);