#NEWLINE# def _compare( self , obj , db_obj ) : #NEWLINE# #INDENT# for field in obj . fields : #NEWLINE# #INDENT# if ( field in ( 'default_route' , 'floating_ips' ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( field in fixed_ip . FIXED_IP_OPTIONAL_ATTRS ) : #NEWLINE# #INDENT# if ( obj . obj_attr_is_set ( field ) and ( db_obj [ field ] is not None ) ) : #NEWLINE# #INDENT# obj_val = obj [ field ] . uuid #NEWLINE# db_val = db_obj [ field ] [ 'uuid' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# obj_val = obj [ field ] #NEWLINE# db_val = db_obj [ field ] #NEWLINE# #UNINDENT# if isinstance ( obj_val , netaddr . IPAddress ) : #NEWLINE# #INDENT# obj_val = str ( obj_val ) #NEWLINE# #UNINDENT# self . assertEqual ( db_val , obj_val )