Merge "Add __ne__ built-in function"
This commit is contained in:
commit
421f625494
@ -428,6 +428,9 @@ class CinderComparableObject(base.ComparableVersionedObject):
|
||||
return self.obj_to_primitive() == obj.obj_to_primitive()
|
||||
return False
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
|
||||
class ObjectListBase(base.ObjectListBase):
|
||||
def obj_make_compatible(self, primitive, target_version):
|
||||
|
@ -87,6 +87,9 @@ class Comment(object):
|
||||
def __eq__(self, actual):
|
||||
return (dict(ast.literal_eval(actual)) == self.expected)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
|
||||
class HPE3PARBaseDriver(object):
|
||||
|
||||
|
@ -403,6 +403,9 @@ class NaElement(object):
|
||||
def __eq__(self, other):
|
||||
return str(self) == str(other)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(str(self))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user