Repository: cloudstack Updated Branches: refs/heads/master e1827fc69 -> f39319932
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 <[email protected]> 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/master Commit: 429abe2bd53147381f3be1d1eae37cef7f5894cc Parents: e1827fc Author: Gaurav Aradhye <[email protected]> Authored: Sun Feb 22 23:44:33 2015 -0800 Committer: SrikanteswaraRao Talluri <[email protected]> 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:
