summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library/openshift_facts.py
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-03-27 22:28:40 -0500
committerGitHub <noreply@github.com>2017-03-27 22:28:40 -0500
commita502b675936b617515ae7a00228aa62f1ec5bc53 (patch)
treefac00fa6dee431cc92ac92610387def9b8aeb155 /roles/openshift_facts/library/openshift_facts.py
parenta22e780b21eacf9ae7fc067d9f26e1a01c1d4558 (diff)
parent7aa584b59baba5a7018d38aadd19aa7646702391 (diff)
downloadopenshift-a502b675936b617515ae7a00228aa62f1ec5bc53.tar.gz
openshift-a502b675936b617515ae7a00228aa62f1ec5bc53.tar.bz2
openshift-a502b675936b617515ae7a00228aa62f1ec5bc53.tar.xz
openshift-a502b675936b617515ae7a00228aa62f1ec5bc53.zip
Merge pull request #3038 from djosborne/calico
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_facts/library/openshift_facts.py')
-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)