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

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

commit 83ae6d7c01afe5ec07b03eb2a8cd3cdf7cd37961
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Nov 27 07:12:26 2020 +0000

    integration test: skip vlan of public ip range in get_free_vlan
---
 tools/marvin/marvin/lib/common.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/marvin/marvin/lib/common.py 
b/tools/marvin/marvin/lib/common.py
index c3a2f1c..ae05414 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -1054,6 +1054,11 @@ def get_free_vlan(apiclient, zoneid):
         usedVlanIds = [int(nw.vlan)
                        for nw in networks if (nw.vlan and str(nw.vlan).lower() 
!= "untagged")]
 
+    ipranges = list_vlan_ipranges(apiclient, zoneid=zoneid)
+    if isinstance(ipranges, list) and len(ipranges) > 0:
+        usedVlanIds += [int(iprange.vlan.split("/")[-1])
+                        for iprange in ipranges if (iprange.vlan and 
iprange.vlan.split("/")[-1].lower() != "untagged")]
+
     if not hasattr(physical_network, "vlan"):
         while True:
             shared_ntwk_vlan = random.randrange(1, 4095)

Reply via email to