mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-10274: L2 network refused to be designed on VXLAN physical network (#2448)
L2 network refused to be designed on VXLAN physical network. Add fix for vxlan issue. Add condition for L2 networks which do not allow specifying vlan.
This commit is contained in:
parent
0bb20a7ed2
commit
c0b920f740
@ -55,11 +55,12 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru {
|
||||
@Override
|
||||
protected boolean canHandle(NetworkOffering offering, final NetworkType networkType, final PhysicalNetwork physicalNetwork) {
|
||||
// This guru handles only Guest Isolated network that supports Source nat service
|
||||
if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == Network.GuestType.Isolated &&
|
||||
isMyIsolationMethod(physicalNetwork)) {
|
||||
if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) &&
|
||||
(offering.getGuestType() == Network.GuestType.Isolated || offering.getGuestType() == Network.GuestType.L2) &&
|
||||
isMyIsolationMethod(physicalNetwork)) {
|
||||
return true;
|
||||
} else {
|
||||
s_logger.trace("We only take care of Guest networks of type " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
|
||||
s_logger.trace("We only take care of Guest networks of type " + GuestType.Isolated + " or " + GuestType.L2 + " in zone of type " + NetworkType.Advanced);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -72,6 +73,10 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (offering.getGuestType() == GuestType.L2 && network.getBroadcastUri() != null) {
|
||||
String vxlan = BroadcastDomainType.getValue(network.getBroadcastUri());
|
||||
network.setBroadcastUri(BroadcastDomainType.Vxlan.toUri(vxlan));
|
||||
}
|
||||
network.setBroadcastDomainType(BroadcastDomainType.Vxlan);
|
||||
|
||||
return network;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user