This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new a5856a6  network: allow advanced zones with security groups and VXLAN 
isolation type (#2693)
a5856a6 is described below

commit a5856a6447b8704deaa79b5506fdd6c34f207c24
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Fri Jun 8 04:43:25 2018 -0300

    network: allow advanced zones with security groups and VXLAN isolation type 
(#2693)
    
    Not possible to deploy an Advanced zone with Security Groups, and VXLAN 
isolation method on KVM. Exception: "Unable to convert network offering with 
specified id to network profile" is logged.
---
 server/src/com/cloud/network/guru/DirectNetworkGuru.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java 
b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index c92bb45..3edc8d2 100644
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -133,9 +133,20 @@ public class DirectNetworkGuru extends AdapterBase 
implements NetworkGuru {
         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;

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to