summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2016-07-08 10:11:04 -0400
committerGitHub <noreply@github.com>2016-07-08 10:11:04 -0400
commit69b47af2aa3986ac18d5fdddf5dc6ed478fe08c4 (patch)
tree0419cfc12d414a95c987f7667f6618fba923c522 /roles/openshift_facts/library
parent8a0c9b6b6a9820b38694cb23979ffc7a8c358588 (diff)
parent57dfae185d3d0e02ebe515263c54867bee37b45e (diff)
downloadopenshift-69b47af2aa3986ac18d5fdddf5dc6ed478fe08c4.tar.gz
openshift-69b47af2aa3986ac18d5fdddf5dc6ed478fe08c4.tar.bz2
openshift-69b47af2aa3986ac18d5fdddf5dc6ed478fe08c4.tar.xz
openshift-69b47af2aa3986ac18d5fdddf5dc6ed478fe08c4.zip
Merge pull request #2023 from abutcher/openshift-hosted
Various hosted component improvements
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 31e70960e..4c551c37e 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -114,6 +114,12 @@ def migrate_hosted_facts(facts):
if 'router' not in facts['hosted']:
facts['hosted']['router'] = {}
facts['hosted']['router']['selector'] = facts['master'].pop('router_selector')
+ if 'registry_selector' in facts['master']:
+ if 'hosted' not in facts:
+ facts['hosted'] = {}
+ if 'registry' not in facts['hosted']:
+ facts['hosted']['registry'] = {}
+ facts['hosted']['registry']['selector'] = facts['master'].pop('registry_selector')
return facts
def first_ip(network):
@@ -466,11 +472,11 @@ def set_selectors(facts):
facts['hosted']['router'] = {}
if 'selector' not in facts['hosted']['router'] or facts['hosted']['router']['selector'] in [None, 'None']:
facts['hosted']['router']['selector'] = selector
+ if 'registry' not in facts['hosted']:
+ facts['hosted']['registry'] = {}
+ if 'selector' not in facts['hosted']['registry'] or facts['hosted']['registry']['selector'] in [None, 'None']:
+ facts['hosted']['registry']['selector'] = selector
- if 'master' in facts:
- if 'infra_nodes' in facts['master']:
- if 'registry_selector' not in facts['master']:
- facts['master']['registry_selector'] = selector
return facts
def set_metrics_facts_if_unset(facts):