diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-12-14 17:13:20 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-12-14 17:13:20 -0500 |
commit | 27b8533edca79ba78a3e443bd33992a5415662f4 (patch) | |
tree | b2d3a2ebceeb76b9e5f7f1d29c9b172560d45e65 /inventory | |
parent | fc967c5159a37e5127a5294bdb7446c6f06eb54a (diff) | |
parent | ba08cf8c8e2138ae5de60fb28df7f50d3f45b5cf (diff) | |
download | openshift-27b8533edca79ba78a3e443bd33992a5415662f4.tar.gz openshift-27b8533edca79ba78a3e443bd33992a5415662f4.tar.bz2 openshift-27b8533edca79ba78a3e443bd33992a5415662f4.tar.xz openshift-27b8533edca79ba78a3e443bd33992a5415662f4.zip |
Merge pull request #1064 from kwoodson/ohifix
Adding option for cache reading and specify openshift version.
Diffstat (limited to 'inventory')
-rwxr-xr-x | inventory/multi_inventory.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/inventory/multi_inventory.py b/inventory/multi_inventory.py index 232f2402d..20fc48aa9 100755 --- a/inventory/multi_inventory.py +++ b/inventory/multi_inventory.py @@ -56,15 +56,6 @@ class MultiInventory(object): else: self.config_file = None # expect env vars - - def run(self): - '''This method checks to see if the local - cache is valid for the inventory. - - if the cache is valid; return cache - else the credentials are loaded from multi_inventory.yaml or from the env - and we attempt to get the inventory from the provider specified. - ''' # load yaml if self.config_file and os.path.isfile(self.config_file): self.config = self.load_yaml_config() @@ -91,6 +82,15 @@ class MultiInventory(object): if self.config.has_key('cache_location'): self.cache_path = self.config['cache_location'] + def run(self): + '''This method checks to see if the local + cache is valid for the inventory. + + if the cache is valid; return cache + else the credentials are loaded from multi_inventory.yaml or from the env + and we attempt to get the inventory from the provider specified. + ''' + if self.args.get('refresh_cache', None): self.get_inventory() self.write_to_cache() |