#NEWLINE# def get_network_id_by_cidr( self , context , cidr , project_id ) : #NEWLINE# #INDENT# 'Find the Quantum UUID associated with a IPv4 CIDR\n           address for the specified tenant.\n        ' #NEWLINE# tenant_id = ( project_id or FLAGS . quantum_default_tenant_id ) #NEWLINE# all_blocks = self . m_conn . get_blocks ( tenant_id ) #NEWLINE# for b in all_blocks [ 'ip_blocks' ] : #NEWLINE# #INDENT# if ( b [ 'cidr' ] == cidr ) : #NEWLINE# #INDENT# return b [ 'network_id' ] #NEWLINE# #UNINDENT# #UNINDENT# raise exception . NotFound ( _ ( ( 'No network found for cidr %s' % cidr ) ) )