You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/03/04 11:05:55 UTC

[11/50] [abbrv] git commit: updated refs/heads/reporter to 178a938

CLOUDSTACK-8276: Changes in Marvin to find free vlan in a setup when vlan is not returned for an existing network with listNetworks API

Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>


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

Branch: refs/heads/reporter
Commit: 429abe2bd53147381f3be1d1eae37cef7f5894cc
Parents: e1827fc
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Sun Feb 22 23:44:33 2015 -0800
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Thu Feb 26 13:04:20 2015 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/lib/common.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/429abe2b/tools/marvin/marvin/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py
index c59cf10..de6f146 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -977,9 +977,9 @@ def get_free_vlan(apiclient, zoneid):
 
     if isinstance(networks, list) and len(networks) > 0:
         usedVlanIds = [int(nw.vlan)
-                       for nw in networks if nw.vlan != "untagged"]
+                       for nw in networks if (nw.vlan and str(nw.vlan).lower() != "untagged")]
 
-    if hasattr(physical_network, "vlan") is False:
+    if not hasattr(physical_network, "vlan"):
         while True:
             shared_ntwk_vlan = random.randrange(1, 4095)
             if shared_ntwk_vlan in usedVlanIds: