cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to 3547562
Date Sat, 09 Aug 2014 00:18:24 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master d1f6d7542 -> 354756219


CLOUDSTACK-6486: Guest network guru - when add network, validate isolation method in case
insensitive manner


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35475621
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35475621
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35475621

Branch: refs/heads/master
Commit: 354756219cb5ca0b941f9091d847e8dda099547f
Parents: d1f6d75
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Aug 7 16:00:22 2014 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Fri Aug 8 17:08:13 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/guru/GuestNetworkGuru.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35475621/server/src/com/cloud/network/guru/GuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
index fb11473..138afd5 100755
--- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
@@ -23,13 +23,12 @@ import java.util.Random;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.log4j.Logger;
 
 import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter;
@@ -151,16 +150,19 @@ public abstract class GuestNetworkGuru extends AdapterBase implements
NetworkGur
             return false;
         }
 
-        List<String> methods = physicalNetwork.getIsolationMethods();
+        List<String> methods = new ArrayList<String>();
+        for (String method : physicalNetwork.getIsolationMethods()) {
+            methods.add(method.toLowerCase());
+        }
         if (methods.isEmpty()) {
             // The empty isolation method is assumed to be VLAN
             s_logger.debug("Empty physical isolation type for physical network " + physicalNetwork.getUuid());
             methods = new ArrayList<String>(1);
-            methods.add("VLAN");
+            methods.add("VLAN".toLowerCase());
         }
 
         for (IsolationMethod m : _isolationMethods) {
-            if (methods.contains(m.toString())) {
+            if (methods.contains(m.toString().toLowerCase())) {
                 return true;
             }
         }


Mime
View raw message