summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-01-25 15:31:53 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-01-25 15:31:53 -0500
commit4a2e65e5500eced93722ae6b39c7994a270563d2 (patch)
tree18ca3afb811b695b381afbe303b0c23221fd11a4 /roles/openshift_facts
parent5b188705f2e54da54ae64ac40ad133619e3e0d02 (diff)
parent93eb9ba8fc5d6d14b8ffff1b946c528233cbb1d5 (diff)
downloadopenshift-4a2e65e5500eced93722ae6b39c7994a270563d2.tar.gz
openshift-4a2e65e5500eced93722ae6b39c7994a270563d2.tar.bz2
openshift-4a2e65e5500eced93722ae6b39c7994a270563d2.tar.xz
openshift-4a2e65e5500eced93722ae6b39c7994a270563d2.zip
Merge pull request #1160 from vishpat/nuage
Nuage
Diffstat (limited to 'roles/openshift_facts')
-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 af819e218..40e54d706 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -338,6 +338,23 @@ def set_flannel_facts_if_unset(facts):
facts['common']['use_flannel'] = use_flannel
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
+ missing
+ Args:
+ facts (dict): existing facts
+ Returns:
+ dict: the facts dict updated with the nuage
+ facts if they were not already present
+
+ """
+ if 'common' in facts:
+ if 'use_nuage' not in facts['common']:
+ use_nuage = False
+ facts['common']['use_nuage'] = use_nuage
+ return facts
+
def set_node_schedulability(facts):
""" Set schedulable facts if not already present in facts dict
Args:
@@ -1128,6 +1145,7 @@ class OpenShiftFacts(object):
facts = set_project_cfg_facts_if_unset(facts)
facts = set_fluentd_facts_if_unset(facts)
facts = set_flannel_facts_if_unset(facts)
+ facts = set_nuage_facts_if_unset(facts)
facts = set_node_schedulability(facts)
facts = set_master_selectors(facts)
facts = set_metrics_facts_if_unset(facts)