#NEWLINE# def _test_router_update_unset_gw_keeps_global_router( self , set_context = False ) : #NEWLINE# #INDENT# tenant_id = _uuid ( ) #NEWLINE# with self . network ( tenant_id = tenant_id ) as n_external : #NEWLINE# #INDENT# res = self . _create_subnet ( self . fmt , n_external [ 'network' ] [ 'id' ] , cidr = '10.0.1.0/24' , tenant_id = tenant_id ) #NEWLINE# s = self . deserialize ( self . fmt , res ) #NEWLINE# self . _set_net_external ( s [ 'subnet' ] [ 'network_id' ] ) #NEWLINE# ext_gw = { #NEWLINE# #INDENT# 'network_id' : s [ 'subnet' ] [ 'network_id' ] , #NEWLINE# #UNINDENT# } #NEWLINE# with self . router ( tenant_id = tenant_id , external_gateway_info = router1 , set_context = set_context ) as router1 , self . router ( name = 'router2' , tenant_id = tenant_id , external_gateway_info = ext_gw , set_context = set_context ) as router2 : #NEWLINE# #INDENT# r1 = router1 [ 'router' ] #NEWLINE# r2 = router2 [ 'router' ] #NEWLINE# qp = 'template_id=00000000-0000-0000-0000-000000000005' #NEWLINE# hds = self . _list ( 'hosting_devices' , query_params = qp ) #NEWLINE# self . _delete ( 'hosting_devices' , hds [ 'hosting_devices' ] [ 1 ] [ 'id' ] ) #NEWLINE# self . plugin . _process_backlogged_routers ( ) #NEWLINE# self . _verify_ha_created_routers ( [ r1 [ 'id' ] , r2 [ 'id' ] ] ) #NEWLINE# r_spec = { #NEWLINE# #INDENT# 'router' : { #NEWLINE# #INDENT# l3 . EXTERNAL_GW_INFO : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . _update ( 'routers' , r1 [ 'id' ] , r_spec ) #NEWLINE# self . _verify_ha_updated_router ( r2 [ 'id' ] ) #NEWLINE# self . _update ( 'routers' , r2 [ 'id' ] , r_spec ) #NEWLINE# self . _verify_ha_updated_router ( r2 [ 'id' ] , has_gw = False )