summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-03-01 22:17:22 -0500
committerGitHub <noreply@github.com>2017-03-01 22:17:22 -0500
commit2d52f7c89baae452f3012102ac0f22a071f8f4ce (patch)
treefeb36c4dd6e8a04fa14a24d88d36b6dacc0fa213 /roles/openshift_facts/library
parent4a3e61e035e42a260e0bf59d1e0c891dc004d50d (diff)
parent58818a6af147e457d56a1faf77b02d37bb538826 (diff)
downloadopenshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.gz
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.bz2
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.xz
openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.zip
Merge pull request #3393 from srampal/contiv
Pull request for Contiv Ansible code integration into Openshift Ansible
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 32bbbc30a..75b55c369 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -485,6 +485,24 @@ def set_nuage_facts_if_unset(facts):
return facts
+def set_contiv_facts_if_unset(facts):
+ """ Set contiv facts if not already present in facts dict
+ dict: the facts dict updated with the contiv facts if
+ missing
+ Args:
+ facts (dict): existing facts
+ Returns:
+ dict: the facts dict updated with the contiv
+ facts if they were not already present
+
+ """
+ if 'common' in facts:
+ if 'use_contiv' not in facts['common']:
+ use_contiv = False
+ facts['common']['use_contiv'] = use_contiv
+ return facts
+
+
def set_node_schedulability(facts):
""" Set schedulable facts if not already present in facts dict
Args:
@@ -1936,6 +1954,7 @@ class OpenShiftFacts(object):
facts = set_project_cfg_facts_if_unset(facts)
facts = set_flannel_facts_if_unset(facts)
facts = set_nuage_facts_if_unset(facts)
+ facts = set_contiv_facts_if_unset(facts)
facts = set_node_schedulability(facts)
facts = set_selectors(facts)
facts = set_identity_providers_if_unset(facts)