diff --git a/rally/plugins/openstack/scenarios/vm/utils.py b/rally/plugins/openstack/scenarios/vm/utils.py index 95dc2da4..eeea1c67 100644 --- a/rally/plugins/openstack/scenarios/vm/utils.py +++ b/rally/plugins/openstack/scenarios/vm/utils.py @@ -86,6 +86,9 @@ class Host(object): other, Host.__class__.__name__)) return self.ip == other.ip and self.status == other.status + def __ne__(self, other): + return not self.__eq__(other) + class VMScenario(nova_utils.NovaScenario, cinder_utils.CinderScenario): """Base class for VM scenarios with basic atomic actions. diff --git a/tests/unit/test_mock.py b/tests/unit/test_mock.py index 1b451a4f..15e83d24 100644 --- a/tests/unit/test_mock.py +++ b/tests/unit/test_mock.py @@ -36,6 +36,9 @@ class Variants(object): def __eq__(self, val): return getattr(val, "variants", val) == self.variants + def __ne__(self, other): + return not self.__eq__(other) + def __contains__(self, val): return val in self.variants