mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	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 <talluri@apache.org>
This commit is contained in:
		
							parent
							
								
									e1827fc696
								
							
						
					
					
						commit
						429abe2bd5
					
				| @ -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: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user