mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
This commit is contained in:
parent
68523e641f
commit
e0ecf7b834
@ -84,11 +84,11 @@ public class OvsVifDriver extends VifDriverBase {
|
|||||||
&& !vlanId.equalsIgnoreCase("untagged")) {
|
&& !vlanId.equalsIgnoreCase("untagged")) {
|
||||||
if(trafficLabel != null && !trafficLabel.isEmpty()) {
|
if(trafficLabel != null && !trafficLabel.isEmpty()) {
|
||||||
s_logger.debug("creating a vlan dev and bridge for guest traffic per traffic label " + trafficLabel);
|
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(_pifs.get(trafficLabel), null, nic.getMac(), getGuestNicModel(guestOsType));
|
||||||
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
|
intf.setVlanTag(Integer.parseInt(vlanId));
|
||||||
} else {
|
} else {
|
||||||
String brName = createVlanBr(vlanId, _pifs.get("private"));
|
intf.defBridgeNet(_pifs.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType));
|
||||||
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
|
intf.setVlanTag(Integer.parseInt(vlanId));
|
||||||
}
|
}
|
||||||
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
|
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Lswitch) {
|
||||||
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + logicalSwitchUuid);
|
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + logicalSwitchUuid);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user