@@ -37,11 +37,16 @@ class TestCreateNetworkIdentityV3(TestNetwork):
3737
3838 # The new network created.
3939 _network = network_fakes .FakeNetwork .create_one_network (
40- attrs = {'tenant_id' : identity_fakes_v3 .project_id }
40+ attrs = {
41+ 'tenant_id' : identity_fakes_v3 .project_id ,
42+ 'availability_zone_hints' : ["nova" ],
43+ }
4144 )
4245
4346 columns = (
4447 'admin_state_up' ,
48+ 'availability_zone_hints' ,
49+ 'availability_zones' ,
4550 'id' ,
4651 'name' ,
4752 'project_id' ,
@@ -52,6 +57,8 @@ class TestCreateNetworkIdentityV3(TestNetwork):
5257
5358 data = (
5459 network ._format_admin_state (_network .admin_state_up ),
60+ utils .format_list (_network .availability_zone_hints ),
61+ utils .format_list (_network .availability_zones ),
5562 _network .id ,
5663 _network .name ,
5764 _network .project_id ,
@@ -129,13 +136,15 @@ def test_create_all_options(self):
129136 "--share" ,
130137 "--project" , identity_fakes_v3 .project_name ,
131138 "--project-domain" , identity_fakes_v3 .domain_name ,
139+ "--availability-zone-hint" , "nova" ,
132140 self ._network .name ,
133141 ]
134142 verifylist = [
135143 ('admin_state' , False ),
136144 ('shared' , True ),
137145 ('project' , identity_fakes_v3 .project_name ),
138146 ('project_domain' , identity_fakes_v3 .domain_name ),
147+ ('availability_zone_hints' , ["nova" ]),
139148 ('name' , self ._network .name ),
140149 ]
141150
@@ -144,6 +153,7 @@ def test_create_all_options(self):
144153
145154 self .network .create_network .assert_called_with (** {
146155 'admin_state_up' : False ,
156+ 'availability_zone_hints' : ["nova" ],
147157 'name' : self ._network .name ,
148158 'shared' : True ,
149159 'tenant_id' : identity_fakes_v3 .project_id ,
@@ -184,6 +194,8 @@ class TestCreateNetworkIdentityV2(TestNetwork):
184194
185195 columns = (
186196 'admin_state_up' ,
197+ 'availability_zone_hints' ,
198+ 'availability_zones' ,
187199 'id' ,
188200 'name' ,
189201 'project_id' ,
@@ -194,6 +206,8 @@ class TestCreateNetworkIdentityV2(TestNetwork):
194206
195207 data = (
196208 network ._format_admin_state (_network .admin_state_up ),
209+ utils .format_list (_network .availability_zone_hints ),
210+ utils .format_list (_network .availability_zones ),
197211 _network .id ,
198212 _network .name ,
199213 _network .project_id ,
@@ -324,6 +338,7 @@ class TestListNetwork(TestNetwork):
324338 'Subnets' ,
325339 'Network Type' ,
326340 'Router Type' ,
341+ 'Availability Zones' ,
327342 )
328343
329344 data = []
@@ -346,6 +361,7 @@ class TestListNetwork(TestNetwork):
346361 utils .format_list (net .subnets ),
347362 net .provider_network_type ,
348363 network ._format_router_external (net .router_external ),
364+ utils .format_list (net .availability_zones ),
349365 ))
350366
351367 def setUp (self ):
@@ -483,6 +499,8 @@ class TestShowNetwork(TestNetwork):
483499
484500 columns = (
485501 'admin_state_up' ,
502+ 'availability_zone_hints' ,
503+ 'availability_zones' ,
486504 'id' ,
487505 'name' ,
488506 'project_id' ,
@@ -493,6 +511,8 @@ class TestShowNetwork(TestNetwork):
493511
494512 data = (
495513 network ._format_admin_state (_network .admin_state_up ),
514+ utils .format_list (_network .availability_zone_hints ),
515+ utils .format_list (_network .availability_zones ),
496516 _network .id ,
497517 _network .name ,
498518 _network .project_id ,
0 commit comments