summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-02 12:44:05 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-02 12:44:05 -0500
commit719ab11adadbcd2b608bef09f11512d746debb4c (patch)
tree41cdccd5d27241f0b82234349aadea9c636eae84 /roles/openshift_facts/library
parent63b19e964fcc09e60562fd253d725edcc2ec4aef (diff)
parenta9143d5d0e7245e12e0597fa5105fdcbb85e0846 (diff)
downloadopenshift-719ab11adadbcd2b608bef09f11512d746debb4c.tar.gz
openshift-719ab11adadbcd2b608bef09f11512d746debb4c.tar.bz2
openshift-719ab11adadbcd2b608bef09f11512d746debb4c.tar.xz
openshift-719ab11adadbcd2b608bef09f11512d746debb4c.zip
Merge pull request #772 from detiber/aep
Disable OpenShift features if installing Atomic Enterprise
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index ac19fac5f..e5aeb9244 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -508,8 +508,9 @@ def set_deployment_facts_if_unset(facts):
dict: the facts dict updated with the generated deployment_type
facts
"""
- # Perhaps re-factor this as a map?
- # pylint: disable=too-many-branches
+ # disabled to avoid breaking up facts related to deployment type into
+ # multiple methods for now.
+ # pylint: disable=too-many-statements, too-many-branches
if 'common' in facts:
deployment_type = facts['common']['deployment_type']
if 'service_type' not in facts['common']:
@@ -550,6 +551,17 @@ def set_deployment_facts_if_unset(facts):
registry_url = 'aep3/aep-${component}:${version}'
facts[role]['registry_url'] = registry_url
+ if 'master' in facts:
+ deployment_type = facts['common']['deployment_type']
+ openshift_features = ['Builder', 'S2IBuilder', 'WebConsole']
+ if 'disabled_features' in facts['master']:
+ if deployment_type == 'atomic-enterprise':
+ curr_disabled_features = set(facts['master']['disabled_features'])
+ facts['master']['disabled_features'] = list(curr_disabled_features.union(openshift_features))
+ else:
+ if deployment_type == 'atomic-enterprise':
+ facts['master']['disabled_features'] = openshift_features
+
if 'node' in facts:
deployment_type = facts['common']['deployment_type']
if 'storage_plugin_deps' not in facts['node']: