Add cache methods back to OpenSackConfig

These don't exist in sdk anymore. Add them back here for compat.

Change-Id: Iddba4809e1e6a949807426d46aa7701c2cd2b007
This commit is contained in:
Monty Taylor 2018-05-04 08:57:05 -05:00
parent 5c2eae8f82
commit e650339107
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 21 additions and 0 deletions

View File

@ -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()