summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorSanjeev Rampal <srampal@cisco.com>2017-02-23 12:25:34 -0800
committerSanjeev Rampal <srampal@cisco.com>2017-02-27 21:04:48 -0800
commit58818a6af147e457d56a1faf77b02d37bb538826 (patch)
tree6f9f4faaf19ae4fbac83979048aa327849609469 /roles/openshift_facts
parentc7f83e208ee433da74b7eb26644b30684a69649b (diff)
downloadopenshift-58818a6af147e457d56a1faf77b02d37bb538826.tar.gz
openshift-58818a6af147e457d56a1faf77b02d37bb538826.tar.bz2
openshift-58818a6af147e457d56a1faf77b02d37bb538826.tar.xz
openshift-58818a6af147e457d56a1faf77b02d37bb538826.zip
Combined (squashed) commit for all changes related to adding Contiv support into Openshift Ansible. This is the first (beta) release of Contiv with Openshift and is only supported for Openshift Origin + Bare metal deployments at the time of this commit. Please refer to the Openshift and Contiv official documentation for details of the level of support for different features and modes of operation.
Diffstat (limited to 'roles/openshift_facts')
-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 ef7f159c5..23a2bbcde 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)