summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorSylvain Baubeau <sbaubeau@redhat.com>2015-10-13 16:36:01 +0200
committerSylvain Baubeau <sbaubeau@redhat.com>2015-10-27 17:42:56 +0100
commit2a7131b9403a4b22ebc55606814f604f723dc826 (patch)
tree0930790b4718d3bcfb96da8fb7cc65072e280f64 /roles/openshift_facts/library
parentf450c935f69366a15e078ec11b82bfa0c7130f6d (diff)
downloadopenshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.gz
openshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.bz2
openshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.xz
openshift-2a7131b9403a4b22ebc55606814f604f723dc826.zip
Add flannel support
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
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 67994d11d..850dc8a69 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -306,6 +306,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:
@@ -845,6 +862,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)