diff options
author | Samuel Munilla <smunilla@redhat.com> | 2015-11-20 15:58:05 -0500 |
---|---|---|
committer | Samuel Munilla <smunilla@redhat.com> | 2015-11-20 15:58:05 -0500 |
commit | 0b191360ec7d934b582d0c59cd8e377df92438dd (patch) | |
tree | 8d29bcba68824d29fc63f34f9bfd77b78f0f5200 /utils/src/ooinstall/cli_installer.py | |
parent | 27a8228a81c81b2f7db003eedb3b9eaf03a849b4 (diff) | |
download | openshift-0b191360ec7d934b582d0c59cd8e377df92438dd.tar.gz openshift-0b191360ec7d934b582d0c59cd8e377df92438dd.tar.bz2 openshift-0b191360ec7d934b582d0c59cd8e377df92438dd.tar.xz openshift-0b191360ec7d934b582d0c59cd8e377df92438dd.zip |
atomic-openshift-installer: Rename ha_proxy
Rename ha_proxy variables and methods to 'master_lb' to better
future-proof things.
Diffstat (limited to 'utils/src/ooinstall/cli_installer.py')
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 01093379f..ac9d884d9 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -115,7 +115,7 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen num_masters += 1 if num_masters > 1: - hosts.append(collect_ha_proxy()) + hosts.append(collect_master_lb()) if num_masters >= 3 or version == '3.0': masters_set = True @@ -139,7 +139,7 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen more_hosts = click.confirm('Do you want to add additional hosts?') return hosts -def collect_ha_proxy(): +def collect_master_lb(): """ Get an HA proxy from the user """ @@ -159,10 +159,10 @@ This will also require you to set a third master. host_props['run_on'] = click.confirm('Is this a clean host you want to install HAProxy on?') host_props['master'] = False host_props['node'] = False - host_props['ha_proxy'] = True - ha_proxy = Host(**host_props) + host_props['master_lb'] = True + master_lb = Host(**host_props) - return ha_proxy + return master_lb def confirm_hosts_facts(oo_cfg, callback_facts): hosts = oo_cfg.hosts @@ -237,13 +237,13 @@ def check_hosts_config(oo_cfg): click.clear() masters = [host for host in oo_cfg.hosts if host.master] if len(masters) > 1: - ha_proxy = [host for host in oo_cfg.hosts if host.ha_proxy] - click.echo(ha_proxy) - if len(ha_proxy) > 1: + master_lb = [host for host in oo_cfg.hosts if host.master_lb] + click.echo(master_lb) + if len(master_lb) > 1: click.echo('More than one HAProxy specified. Only one proxy is allowed.') sys.exit(0) - elif len(ha_proxy) == 1: - if ha_proxy[0].master or ha_proxy[0].node: + elif len(master_lb) == 1: + if master_lb[0].master or master_lb[0].node: click.echo('HAProxy is configured as a master or node. Please correct this.') sys.exit(0) else: |