diff options
author | Monty Taylor <mordred@inaugust.com> | 2018-05-04 08:57:05 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2018-05-04 08:58:44 -0500 |
commit | e65033910714d6f7d198d8eff6997fdaec102474 (patch) | |
tree | 50d9e5661342ce7582db6671e108c5c3a790455a | |
parent | 5c2eae8f8242332aff59d18b45a7d17f01524aaa (diff) | |
download | os-client-config-e65033910714d6f7d198d8eff6997fdaec102474.tar.gz |
Add cache methods back to OpenSackConfig
These don't exist in sdk anymore. Add them back here for compat.
Change-Id: Iddba4809e1e6a949807426d46aa7701c2cd2b007
-rw-r--r-- | os_client_config/config.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index d506a04..721528d 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -27,6 +27,27 @@ class OpenStackConfig(loader.OpenStackConfig): get_one_cloud = loader.OpenStackConfig.get_one get_all_clouds = loader.OpenStackConfig.get_all + def get_cache_expiration_time(self): + return int(self._cache_expiration_time) + + def get_cache_interval(self): + return self.get_cache_expiration_time() + + def get_cache_max_age(self): + return self.get_cache_expiration_time() + + def get_cache_path(self): + return self._cache_path + + def get_cache_class(self): + return self._cache_class + + def get_cache_arguments(self): + return copy.deepcopy(self._cache_arguments) + + def get_cache_expiration(self): + return copy.deepcopy(self._cache_expiration) + if __name__ == '__main__': config = OpenStackConfig().get_all_clouds() |