#NEWLINE# def test_az_scheduler_ha_az_hints( self ) : #NEWLINE# #INDENT# cfg . CONF . set_override ( 'max_l3_agents_per_router' , 2 ) #NEWLINE# r1 = self . _create_ha_router ( az_hints = [ 'az1' , 'az3' ] ) #NEWLINE# self . plugin . schedule_router ( self . adminContext , r1 [ 'id' ] ) #NEWLINE# agents = self . plugin . get_l3_agents_hosting_routers ( self . adminContext , [ r1 [ 'id' ] ] ) #NEWLINE# self . assertEqual ( 2 , len ( agents ) ) #NEWLINE# expected_azs = set ( [ 'az1' , 'az3' ] ) #NEWLINE# azs = set ( [ a [ 'availability_zone' ] for a in agents ] ) #NEWLINE# self . assertEqual ( expected_azs , azs )