rhtyd closed pull request #2693: Fix to enable Advanced zones with Security
groups and VXLAN isolation type
URL: https://github.com/apache/cloudstack/pull/2693
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index c92bb45dfef..3edc8d217d1 100644
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -133,9 +133,20 @@ protected boolean isMyIsolationMethod(PhysicalNetwork
physicalNetwork) {
return TrafficTypes;
}
+ /**
+ * True for Advanced zones, with VXLAN isolation method and Security
Groups enabled
+ */
+ private boolean isMyIsolationMethodVxlanWithSecurityGroups(NetworkOffering
offering, DataCenter dc, PhysicalNetwork physnet) {
+ return dc.getNetworkType().equals(NetworkType.Advanced) &&
+
_networkModel.areServicesSupportedByNetworkOffering(offering.getId(),
Service.SecurityGroup) &&
+ physnet.getIsolationMethods().contains("VXLAN");
+ }
+
protected boolean canHandle(NetworkOffering offering, DataCenter dc,
PhysicalNetwork physnet) {
// this guru handles only Guest networks in Advance zone with source
nat service disabled
- if (dc.getNetworkType() == NetworkType.Advanced &&
isMyTrafficType(offering.getTrafficType()) && isMyIsolationMethod(physnet) &&
offering.getGuestType() == GuestType.Shared
+ boolean vxlanWithSecurityGroups =
isMyIsolationMethodVxlanWithSecurityGroups(offering, dc, physnet);
+ if (dc.getNetworkType() == NetworkType.Advanced &&
isMyTrafficType(offering.getTrafficType()) &&
+ (isMyIsolationMethod(physnet) || vxlanWithSecurityGroups) &&
offering.getGuestType() == GuestType.Shared
&&
!_ntwkOfferingSrvcDao.isProviderForNetworkOffering(offering.getId(),
Network.Provider.NuageVsp)
&&
!_ntwkOfferingSrvcDao.isProviderForNetworkOffering(offering.getId(),
Network.Provider.NiciraNvp)) {
return true;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services