summaryrefslogtreecommitdiffstats
path: root/inventory
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-12-14 17:13:20 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-12-14 17:13:20 -0500
commit27b8533edca79ba78a3e443bd33992a5415662f4 (patch)
treeb2d3a2ebceeb76b9e5f7f1d29c9b172560d45e65 /inventory
parentfc967c5159a37e5127a5294bdb7446c6f06eb54a (diff)
parentba08cf8c8e2138ae5de60fb28df7f50d3f45b5cf (diff)
downloadopenshift-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-xinventory/multi_inventory.py18
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()