#NEWLINE# def allocate_floating_ip( self , context , project_id ) : #NEWLINE# #INDENT# 'Gets an floating ip from the pool.' #NEWLINE# LOG . debug ( ( 'QUOTA: %s' % quota . allowed_floating_ips ( context , 1 ) ) ) #NEWLINE# if ( quota . allowed_floating_ips ( context , 1 ) < 1 ) : #NEWLINE# #INDENT# LOG . warn ( _ ( 'Quota exceeded for %s, tried to allocate address' ) , project_id . project_id ) #NEWLINE# raise quota . QuotaError ( _ ( 'Address quota exceeded. You cannot allocate any more addresses' ) ) #NEWLINE# #UNINDENT# return self . db . floating_ip_allocate_address ( context , project_id )