summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-05-27 08:50:32 -0400
committerMonty Taylor <mordred@inaugust.com>2015-05-27 12:11:07 -0400
commit5c60aad725b0b98008ee467c5130931339c12d48 (patch)
tree0670c40df8d1ebe7e608f27100a01f5db41c08e5
parent5a4f809caf2223121803debab2e6ac52bc943116 (diff)
downloados-client-config-5c60aad725b0b98008ee467c5130931339c12d48.tar.gz
Add an equality method for CloudConfig
In order to track if a config has changed, we need to be able to compare the CloudConfig objects for equality. Change-Id: Icdd9acede81bc5fba60d877194048e24a62c9e5d
-rw-r--r--os_client_config/cloud_config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index c17bfc2..d893b0b 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -32,3 +32,7 @@ class CloudConfig(object):
def __iter__(self):
return self.config.__iter__()
+
+ def __eq__(self, other):
+ return (self.name == other.name and self.region == other.region
+ and self.config == other.config)