summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-06 16:59:00 +0200
committerChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-06 16:59:00 +0200
commita3ba0278879075e14373a6872acc5f0c3cc3d9a2 (patch)
tree3c0a829dabf217cbabb77075153664e869d4bcda /bin
parent071eee9acb80621919dda2a07f9fe9c56dcfda27 (diff)
downloadopenshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.gz
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.bz2
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.xz
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.zip
Revert "Revert "GCE support""
This reverts commit 3073d1f729f9dcd202088f6b318b465567c6344b.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cluster12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/cluster b/bin/cluster
index 582327415..0e305141f 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -142,10 +142,14 @@ class Cluster(object):
"""
config = ConfigParser.ConfigParser()
if 'gce' == provider:
- config.readfp(open('inventory/gce/hosts/gce.ini'))
-
- for key in config.options('gce'):
- os.environ[key] = config.get('gce', key)
+ gce_ini_default_path = os.path.join(
+ 'inventory/gce/hosts/gce.ini')
+ gce_ini_path = os.environ.get('GCE_INI_PATH', gce_ini_default_path)
+ if os.path.exists(gce_ini_path):
+ config.readfp(open(gce_ini_path))
+
+ for key in config.options('gce'):
+ os.environ[key] = config.get('gce', key)
inventory = '-i inventory/gce/hosts'
elif 'aws' == provider: