summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorDan Osborne <djosborne10@gmail.com>2017-03-10 16:07:45 -0800
committerDan Osborne <djosborne10@gmail.com>2017-03-23 13:53:46 -0700
commit7aa584b59baba5a7018d38aadd19aa7646702391 (patch)
treeccaf232790a12e81b923b4595d020deac1bfbe16 /roles/openshift_facts/library
parent33e181c39d5024ecd226567139a7b0d36683bf2c (diff)
downloadopenshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.gz
openshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.bz2
openshift-7aa584b59baba5a7018d38aadd19aa7646702391.tar.xz
openshift-7aa584b59baba5a7018d38aadd19aa7646702391.zip
Add calico.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py19
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)