diff options
author | Dan Osborne <djosborne10@gmail.com> | 2017-03-10 16:07:45 -0800 |
---|---|---|
committer | Dan Osborne <djosborne10@gmail.com> | 2017-03-23 13:53:46 -0700 |
commit | 7aa584b59baba5a7018d38aadd19aa7646702391 (patch) | |
tree | ccaf232790a12e81b923b4595d020deac1bfbe16 /roles/openshift_facts | |
parent | 33e181c39d5024ecd226567139a7b0d36683bf2c (diff) | |
download | openshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.gz openshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.bz2 openshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.xz openshift-7aa584b59baba5a7018d38aadd19aa7646702391.zip |
Add calico.
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index eeab8a99c..e1f4c4e6d 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -467,6 +467,24 @@ def set_flannel_facts_if_unset(facts): return facts +def set_calico_facts_if_unset(facts): + """ Set calico facts if not already present in facts dict + dict: the facts dict updated with the calico facts if + missing + Args: + facts (dict): existing facts + Returns: + dict: the facts dict updated with the calico + facts if they were not already present + + """ + if 'common' in facts: + if 'use_calico' not in facts['common']: + use_calico = False + facts['common']['use_calico'] = use_calico + return facts + + def set_nuage_facts_if_unset(facts): """ Set nuage facts if not already present in facts dict dict: the facts dict updated with the nuage facts if @@ -1953,6 +1971,7 @@ class OpenShiftFacts(object): facts = set_url_facts_if_unset(facts) facts = set_project_cfg_facts_if_unset(facts) facts = set_flannel_facts_if_unset(facts) + facts = set_calico_facts_if_unset(facts) facts = set_nuage_facts_if_unset(facts) facts = set_contiv_facts_if_unset(facts) facts = set_node_schedulability(facts) |