summaryrefslogtreecommitdiffstats
path: root/inventory
diff options
context:
space:
mode:
authorJoel Diaz <jdiaz@redhat.com>2015-12-16 15:59:26 -0500
committerJoel Diaz <jdiaz@redhat.com>2015-12-16 15:59:26 -0500
commitc607f1ba93be5e9f16723074ff97ffd27b025f8c (patch)
tree57d78b69cd526a57ad0258ba468868561626f384 /inventory
parent4dfe16e0e567a633cedd8ee56ffaed5110ca1629 (diff)
parentf826925c8217d5c9f150ef03ca8deb718c37c157 (diff)
downloadopenshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.gz
openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.bz2
openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.tar.xz
openshift-c607f1ba93be5e9f16723074ff97ffd27b025f8c.zip
Merge pull request #1078 from joelddiaz/master
sync master -> prod
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()