#NEWLINE# def lease_fixed_ip( self , context , address ) : #NEWLINE# #INDENT# 'Called by dhcp-bridge when IP is leased.' #NEWLINE# LOG . debug ( 'Leased IP |%s|' , address , context = context ) #NEWLINE# fixed_ip = objects . FixedIP . get_by_address ( context , self ) #NEWLINE# if ( fixed_ip . instance_uuid is None ) : #NEWLINE# #INDENT# LOG . warning ( _LW ( 'IP %s leased that is not associated' ) , fixed_ip , context = context ) #NEWLINE# return #NEWLINE# #UNINDENT# fixed_ip . leased = True #NEWLINE# fixed_ip . save ( ) #NEWLINE# if ( not fixed_ip . allocated ) : #NEWLINE# #INDENT# LOG . warning ( _LW ( "IP |%s| leased that isn't allocated" ) , fixed_ip , context = context , instance_uuid = fixed_ip . instance_uuid )