#NEWLINE# @ test . idempotent_id ( '476be1e0-f72e-47dc-9a14-4435926bbe82' ) #NEWLINE# def test_policy_allows_tenant_to_attach_ext_gw( self ) : #NEWLINE# #INDENT# net = self . _create_network ( external = False ) #NEWLINE# self . create_subnet ( net , client = self . admin_client , enable_dhcp = False ) #NEWLINE# self . admin_client . create_rbac_policy ( object_type = 'network' , object_id = net [ 'id' ] , action = 'access_as_external' , target_tenant = r . client2 . tenant_id ) #NEWLINE# r = self . client2 . create_router ( data_utils . rand_name ( 'router-' ) , external_gateway_info = { #NEWLINE# #INDENT# 'network_id' : net [ 'id' ] , #NEWLINE# #UNINDENT# } ) [ 'router' ] #NEWLINE# self . addCleanup ( self . admin_client . delete_router , r [ 'id' ] )