|
@@ -323,6 +323,24 @@ def set_fluentd_facts_if_unset(facts):
|
|
facts['common']['use_fluentd'] = use_fluentd
|
|
facts['common']['use_fluentd'] = use_fluentd
|
|
return facts
|
|
return facts
|
|
|
|
|
|
|
|
+def set_cluster_metrics_facts_if_unset(facts):
|
|
|
|
+ """ Set cluster metrics facts if not already present in facts dict
|
|
|
|
+ dict: the facts dict updated with the generated cluster metrics facts if
|
|
|
|
+ missing
|
|
|
|
+ Args:
|
|
|
|
+ facts (dict): existing facts
|
|
|
|
+ Returns:
|
|
|
|
+ dict: the facts dict updated with the generated cluster metrics
|
|
|
|
+ facts if they were not already present
|
|
|
|
+
|
|
|
|
+ """
|
|
|
|
+ if 'common' in facts:
|
|
|
|
+ deployment_type = facts['common']['deployment_type']
|
|
|
|
+ if 'use_cluster_metrics' not in facts['common']:
|
|
|
|
+ use_cluster_metrics = True if deployment_type == 'origin' else False
|
|
|
|
+ facts['common']['use_cluster_metrics'] = use_cluster_metrics
|
|
|
|
+ return facts
|
|
|
|
+
|
|
def set_identity_providers_if_unset(facts):
|
|
def set_identity_providers_if_unset(facts):
|
|
""" Set identity_providers fact if not already present in facts dict
|
|
""" Set identity_providers fact if not already present in facts dict
|
|
|
|
|
|
@@ -700,6 +718,7 @@ class OpenShiftFacts(object):
|
|
facts['current_config'] = get_current_config(facts)
|
|
facts['current_config'] = get_current_config(facts)
|
|
facts = set_url_facts_if_unset(facts)
|
|
facts = set_url_facts_if_unset(facts)
|
|
facts = set_fluentd_facts_if_unset(facts)
|
|
facts = set_fluentd_facts_if_unset(facts)
|
|
|
|
+ facts = set_cluster_metrics_facts_if_unset(facts)
|
|
facts = set_identity_providers_if_unset(facts)
|
|
facts = set_identity_providers_if_unset(facts)
|
|
facts = set_registry_url_if_unset(facts)
|
|
facts = set_registry_url_if_unset(facts)
|
|
facts = set_sdn_facts_if_unset(facts)
|
|
facts = set_sdn_facts_if_unset(facts)
|