#NEWLINE# def _get_subnet_id_indexed_ha_groups( self , context , router_id , load_virtual_port = False ) : #NEWLINE# #INDENT# query = context . session . query ( RouterHAGroup ) #NEWLINE# query = query . filter ( ( RouterHAGroup . user_router_id == router_id ) ) #NEWLINE# if load_virtual_port : #NEWLINE# #INDENT# query = query . options ( joinedload ( 'redundancy_router' ) ) #NEWLINE# #UNINDENT# return { self [ 'subnet_id' ] : hag for hag in query }