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/252220 /git.openstack. org/cgit/ openstack/ python- muranoclient/ commit/ ?id=6fc085e78dc f20fc647f7b66ae 47cfe2f9d613a9
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6fc085e78dcf20f c647f7b66ae47cf e2f9d613a9
Author: Rui Chen <email address hidden>
Date: Wed Dec 2 15:02:22 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: If31659c503007e 08baa0a23485a49 a5e5dde8e8b
Closes-Bug: #1499369