Fix Resource.__eq__ mismatch semantics of object equal
The __eq__ of apiclient.base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.
Reviewed: https:/ /review. openstack. org/251836 /git.openstack. org/cgit/ openstack/ python- ironicclient/ commit/ ?id=932ac60dcbd c70c9f1ddf09689 45cd43028081cc
Committed: https:/
Submitter: Jenkins
Branch: master
commit 932ac60dcbdc70c 9f1ddf0968945cd 43028081cc
Author: Rui Chen <email address hidden>
Date: Tue Dec 1 20:25:18 2015 +0800
Fix Resource.__eq__ mismatch semantics of object equal
The __eq__ of apiclient. base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.
Change-Id: I1d072a900d0744 9b744f4e743e04a 57e42109730
Closes-Bug: #1499369