#NEWLINE# def _get_network_profiles( self , db_session = None , physical_network = None ) : #NEWLINE# #INDENT# '\n        Retrieve all network profiles.\n\n        Get Network Profiles on a particular physical network, if physical\n        network is specified. If no physical network is specified, return\n        all network profiles.\n        ' #NEWLINE# db_session = ( db_session or db . get_session ( ) ) #NEWLINE# if physical_network : #NEWLINE# #INDENT# return db_session . query ( n1kv_models . NetworkProfile ) . filter_by ( physical_network = self ) #NEWLINE# #UNINDENT# return db_session . query ( n1kv_models . NetworkProfile )