summaryrefslogtreecommitdiffstats
path: root/bin/cluster
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2015-04-20 14:11:48 +0200
committerLénaïc Huard <lhuard@amadeus.com>2015-06-08 08:08:52 +0200
commit901f0ee491efb34f9788e11dd6d572928146da91 (patch)
treed058cf07ec8efa46d9d8c35144baadc9c5d7bc41 /bin/cluster
parentaf8b0b25f5e572ab20e3c3efdba596bae7ae7563 (diff)
downloadopenshift-901f0ee491efb34f9788e11dd6d572928146da91.tar.gz
openshift-901f0ee491efb34f9788e11dd6d572928146da91.tar.bz2
openshift-901f0ee491efb34f9788e11dd6d572928146da91.tar.xz
openshift-901f0ee491efb34f9788e11dd6d572928146da91.zip
Implement OpenStack provider
Diffstat (limited to 'bin/cluster')
-rwxr-xr-xbin/cluster13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/cluster b/bin/cluster
index bf8198de9..2ea389523 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -143,6 +143,8 @@ class Cluster(object):
inventory = '-i inventory/aws/hosts'
elif 'libvirt' == provider:
inventory = '-i inventory/libvirt/hosts'
+ elif 'openstack' == provider:
+ inventory = '-i inventory/openstack/hosts'
else:
# this code should never be reached
raise ValueError("invalid PROVIDER {}".format(provider))
@@ -163,6 +165,11 @@ class Cluster(object):
if args.verbose > 0:
verbose = '-{}'.format('v' * args.verbose)
+ if args.option:
+ for opt in args.option:
+ k, v = opt.split('=', 1)
+ env['opt_'+k] = v
+
ansible_env = '-e \'{}\''.format(
' '.join(['%s=%s' % (key, value) for (key, value) in env.items()])
)
@@ -189,13 +196,13 @@ if __name__ == '__main__':
[DEFAULT]
validate_cluster_ids = False
cluster_ids = marketing,sales
- providers = gce,aws,libvirt
+ providers = gce,aws,libvirt,openstack
"""
environment = ConfigParser.SafeConfigParser({
'cluster_ids': 'marketing,sales',
'validate_cluster_ids': 'False',
- 'providers': 'gce,aws,libvirt',
+ 'providers': 'gce,aws,libvirt,openstack',
})
path = os.path.expanduser("~/.openshift-ansible")
@@ -224,6 +231,8 @@ if __name__ == '__main__':
meta_parser.add_argument('-t', '--deployment-type',
choices=['origin', 'online', 'enterprise'],
help='Deployment type. (default: origin)')
+ meta_parser.add_argument('-o', '--option', action='append',
+ help='options')
action_parser = parser.add_subparsers(dest='action', title='actions',
description='Choose from valid actions')