From 5728ad03caf0580970f2c8226cae4440e12f4d92 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Mon, 24 Oct 2016 15:15:35 +0530 Subject: [PATCH 1/2] CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical network fix to ensure only physical network with guest traffic is picked up for creating a private network for vpc private gateway --- test/integration/smoke/test_privategw_acl.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py index 33a5d3f1e24..1a86175c864 100644 --- a/test/integration/smoke/test_privategw_acl.py +++ b/test/integration/smoke/test_privategw_acl.py @@ -867,5 +867,12 @@ class TestPrivateGwACL(cloudstackTestCase): if not physical_networks: return None for physical_network in physical_networks: - if physical_network.vlan: - return physical_network + if not physical_network.removed and physical_network.vlan: + traffic_type_list = self.dbclient.execute( + "select traffic_type from physical_network_traffic_types where physical_network_id=\ + (select id from physical_network where uuid='%s');" % physical_network.id + ) + for traffic_type in traffic_type_list: + if "Guest" in str(traffic_type[0]): + return physical_network + return None From e1202a0b06d687438203af4917badef3b3618e21 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Mon, 24 Oct 2016 15:15:35 +0530 Subject: [PATCH 2/2] CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical network fix to ensure only physical network with guest traffic is picked up for creating a private network for vpc private gateway Signed-off-by: Murali Reddy This closes #1724 --- test/integration/smoke/test_privategw_acl.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py index 33a5d3f1e24..1a86175c864 100644 --- a/test/integration/smoke/test_privategw_acl.py +++ b/test/integration/smoke/test_privategw_acl.py @@ -867,5 +867,12 @@ class TestPrivateGwACL(cloudstackTestCase): if not physical_networks: return None for physical_network in physical_networks: - if physical_network.vlan: - return physical_network + if not physical_network.removed and physical_network.vlan: + traffic_type_list = self.dbclient.execute( + "select traffic_type from physical_network_traffic_types where physical_network_id=\ + (select id from physical_network where uuid='%s');" % physical_network.id + ) + for traffic_type in traffic_type_list: + if "Guest" in str(traffic_type[0]): + return physical_network + return None