149149 }
150150})
151151
152+ ISOLATED_NETWORK_SERVICES = (
153+ "Dhcp,Dns,UserData,"
154+ "SourceNat,StaticNat,PortForwarding,Firewall,Lb,CustomAction"
155+ )
156+
157+ VPC_NETWORK_SERVICES = (
158+ "Dhcp,Dns,UserData,"
159+ "SourceNat,StaticNat,PortForwarding,Lb,NetworkACL,CustomAction"
160+ )
152161
153162# ---------------------------------------------------------------------------
154163# Script download helpers
@@ -1310,7 +1319,7 @@ def test_05_isolated_network_full_lifecycle(self):
13101319 """
13111320 self ._check_kvm_host_prerequisites (['arping' , 'dnsmasq' , 'haproxy' ])
13121321 # ---- Setup ----
1313- svc = "SourceNat,StaticNat,PortForwarding,Firewall,Lb,UserData,Dhcp,Dns"
1322+ svc = ISOLATED_NETWORK_SERVICES
13141323 nw_offering , _ext_name = self ._setup_extension_nsp_offering (
13151324 "extnet-isolated" , supported_services = svc )
13161325 account , network , vm = self ._create_account_network_vm (
@@ -1523,12 +1532,11 @@ def test_06_vpc_multi_tier_and_restart(self):
15231532 """
15241533 self ._check_kvm_host_prerequisites (['arping' , 'dnsmasq' , 'haproxy' ])
15251534 # ---- Setup: extension + NSP only (no isolated offering for VPC tests) ----
1526- svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
15271535 _nw_offering , ext_name = self ._setup_extension_nsp_offering (
1528- "extnet-vpc" , supported_services = svc , for_vpc = True )
1536+ "extnet-vpc" , for_vpc = True )
15291537
15301538 # ---- VPC tier network offering (useVpc=on) ----
1531- vpc_tier_svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
1539+ vpc_tier_svc = VPC_NETWORK_SERVICES
15321540 _tier_prov = {s .strip (): ext_name for s in vpc_tier_svc .split (',' )}
15331541 vpc_tier_offering = NetworkOffering .create (self .apiclient , {
15341542 "name" : "ExtNet-VPCTier-%s" % random_gen (),
@@ -1548,7 +1556,7 @@ def test_06_vpc_multi_tier_and_restart(self):
15481556 self .logger .info ("VPC tier offering '%s' enabled" , vpc_tier_offering .name )
15491557
15501558 # ---- VPC offering ----
1551- vpc_svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
1559+ vpc_svc = VPC_NETWORK_SERVICES
15521560 _vpc_prov = {s .strip (): ext_name for s in vpc_svc .split (',' )}
15531561 vpc_offering = VpcOffering .create (self .apiclient , {
15541562 "name" : "ExtNet-VPC-%s" % random_gen (),
@@ -1832,12 +1840,11 @@ def test_07_vpc_network_acl(self):
18321840 self ._check_kvm_host_prerequisites (['arping' , 'dnsmasq' , 'haproxy' ])
18331841
18341842 # ---- Setup: extension + NSP (supporting NetworkACL) ----
1835- svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
18361843 _nw_offering , ext_name = self ._setup_extension_nsp_offering (
1837- "extnet-acl" , supported_services = svc , for_vpc = True )
1844+ "extnet-acl" , for_vpc = True )
18381845
18391846 # ---- VPC tier network offering (useVpc=on, with NetworkACL support) ----
1840- vpc_tier_svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
1847+ vpc_tier_svc = VPC_NETWORK_SERVICES
18411848 _tier_prov = {s .strip (): ext_name for s in vpc_tier_svc .split (',' )}
18421849 vpc_tier_offering = NetworkOffering .create (self .apiclient , {
18431850 "name" : "ExtNet-VPCTier-ACL-%s" % random_gen (),
@@ -1857,7 +1864,7 @@ def test_07_vpc_network_acl(self):
18571864 self .logger .info ("VPC tier offering '%s' enabled" , vpc_tier_offering .name )
18581865
18591866 # ---- VPC offering ----
1860- vpc_svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
1867+ vpc_svc = VPC_NETWORK_SERVICES
18611868 _vpc_prov = {s .strip (): ext_name for s in vpc_svc .split (',' )}
18621869 vpc_offering = VpcOffering .create (self .apiclient , {
18631870 "name" : "ExtNet-VPC-ACL-%s" % random_gen (),
@@ -2202,7 +2209,7 @@ def test_08_custom_action_policy_based_routing(self):
22022209 """
22032210 self ._check_kvm_host_prerequisites (['ip' , 'arping' , 'dnsmasq' , 'haproxy' ])
22042211
2205- svc = "SourceNat,PortForwarding,Dhcp,Dns,UserData,CustomAction"
2212+ svc = ISOLATED_NETWORK_SERVICES
22062213 nw_offering , _ext_name = self ._setup_extension_nsp_offering (
22072214 "extnet-pbr" , supported_services = svc )
22082215 _account , network , vm = self ._create_account_network_vm (
@@ -2351,9 +2358,9 @@ def test_09_vpc_source_nat_ip_update(self):
23512358 """Update VPC source NAT IP and verify old/new source NAT flags flip correctly."""
23522359 self ._check_kvm_host_prerequisites (['arping' ])
23532360
2354- svc = "SourceNat,StaticNat,PortForwarding,Lb,UserData,Dhcp,Dns,NetworkACL"
2361+ svc = VPC_NETWORK_SERVICES
23552362 _nw_offering , ext_name = self ._setup_extension_nsp_offering (
2356- "extnet-vpc-snat-update" , supported_services = svc , for_vpc = True )
2363+ "extnet-vpc-snat-update" , for_vpc = True )
23572364
23582365 suffix = random_gen ()
23592366 account = None
@@ -2647,9 +2654,9 @@ def test_10_vpc_custom_action_policy_based_routing(self):
26472654 """
26482655 self ._check_kvm_host_prerequisites (['ip' , 'arping' , 'dnsmasq' , 'haproxy' ])
26492656
2650- svc = "SourceNat,PortForwarding,Dhcp,Dns,UserData,NetworkACL,CustomAction"
2657+ svc = VPC_NETWORK_SERVICES
26512658 _nw_offering , ext_name = self ._setup_extension_nsp_offering (
2652- "extnet-vpc-pbr" , supported_services = svc , for_vpc = True )
2659+ "extnet-vpc-pbr" , for_vpc = True )
26532660
26542661 # ---- VPC tier network offering (useVpc=on) ----
26552662 _tier_prov = {s .strip (): ext_name for s in svc .split (',' )}
0 commit comments