'Generate facts
Args:
local_facts (dict): local_facts for overriding generated defaults
additive_facts_to_overwrite (list): additive facts to overwrite in jinja
\'.\' notation ex: [\'master.named_certificates\']
openshift_env (dict): openshift_env facts for overriding generated defaults
protected_facts_to_overwrite (list): protected facts to overwrite in jinja
\'.\' notation ex: [\'master.master_count\']
Returns:
dict: The generated facts'

def generate_facts(self, local_facts, additive_facts_to_overwrite, openshift_env, openshift_env_structures, protected_facts_to_overwrite):

    local_facts = self.init_local_facts(local_facts, additive_facts_to_overwrite, openshift_env, openshift_env_structures, protected_facts_to_overwrite)
    roles = local_facts.keys()
    if (('common' in local_facts) and ('deployment_type' in local_facts['common'])):
        deployment_type = local_facts['common']['deployment_type']
    else:
        deployment_type = 'origin'
    if (('common' in local_facts) and ('deployment_subtype' in local_facts['common'])):
        deployment_subtype = local_facts['common']['deployment_subtype']
    else:
        deployment_subtype = 'basic'
    defaults = self.get_defaults(roles, deployment_type, deployment_subtype)
    provider_facts = self.init_provider_facts()
    facts = apply_provider_facts(defaults, provider_facts)
    facts = merge_facts(facts, local_facts, additive_facts_to_overwrite, protected_facts_to_overwrite)
    facts = migrate_oauth_template_facts(facts)
    facts['current_config'] = get_current_config(facts)
    facts = set_url_facts_if_unset(facts)
    facts = set_project_cfg_facts_if_unset(facts)
    facts = set_flannel_facts_if_unset(facts)
    facts = set_calico_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)
    facts = set_deployment_facts_if_unset(facts)
    facts = set_sdn_facts_if_unset(facts, self.system_facts)
    facts = set_container_facts_if_unset(facts)
    facts = build_kubelet_args(facts)
    facts = build_controller_args(facts)
    facts = build_api_server_args(facts)
    facts = set_version_facts_if_unset(facts)
    facts = set_dnsmasq_facts_if_unset(facts)
    facts = set_manageiq_facts_if_unset(facts)
    facts = set_aggregate_facts(facts)
    facts = set_etcd_facts_if_unset(facts)
    facts = set_proxy_facts(facts)
    facts = set_builddefaults_facts(facts)
    facts = set_buildoverrides_facts(facts)
    if (not safe_get_bool(facts['common']['is_containerized'])):
        facts = set_installed_variant_rpm_facts(facts)
    facts = set_nodename(facts)
    return dict(openshift=facts)
