summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-06 16:37:05 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-06 16:37:05 -0500
commit0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08 (patch)
tree65621b66033088d69cfa155e7319f780bd550ea8 /roles/openshift_facts/library
parent21caa21c84b8f5a8bec415107bb7a6b6a2082790 (diff)
parente7b200a24816daf05da374ccfce3a4d5db66e291 (diff)
downloadopenshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.gz
openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.bz2
openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.xz
openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.zip
Merge pull request #698 from lebauce/flannel
Add support for flannel
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 33aca987d..73d89b635 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -307,6 +307,23 @@ def set_fluentd_facts_if_unset(facts):
facts['common']['use_fluentd'] = use_fluentd
return facts
+def set_flannel_facts_if_unset(facts):
+ """ Set flannel facts if not already present in facts dict
+ dict: the facts dict updated with the flannel facts if
+ missing
+ Args:
+ facts (dict): existing facts
+ Returns:
+ dict: the facts dict updated with the flannel
+ facts if they were not already present
+
+ """
+ if 'common' in facts:
+ if 'use_flannel' not in facts['common']:
+ use_flannel = False
+ facts['common']['use_flannel'] = use_flannel
+ return facts
+
def set_node_schedulability(facts):
""" Set schedulable facts if not already present in facts dict
Args:
@@ -911,6 +928,7 @@ class OpenShiftFacts(object):
facts = set_url_facts_if_unset(facts)
facts = set_project_cfg_facts_if_unset(facts)
facts = set_fluentd_facts_if_unset(facts)
+ facts = set_flannel_facts_if_unset(facts)
facts = set_node_schedulability(facts)
facts = set_master_selectors(facts)
facts = set_metrics_facts_if_unset(facts)