'Split openshift_env facts based on openshift_env structures.
Args:
openshift_env_fact (string): the openshift_env fact to split
ex: \'openshift_cloudprovider_openstack_auth_url\'
openshift_env_structures (list): a list of structures to determine fact keys
ex: [\'openshift.cloudprovider.openstack.*\']
Returns:
list: a list of keys that represent the fact
ex: [\'openshift\', \'cloudprovider\', \'openstack\', \'auth_url\']'

@staticmethod
def split_openshift_env_fact_keys(openshift_env_fact, openshift_env_structures):

    fact_keys = openshift_env_fact.split('_')
    matching_structure = None
    if (openshift_env_structures is not None):
        for structure in openshift_env_structures:
            if re.match(structure, openshift_env_fact):
                matching_structure = structure
    if (matching_structure is None):
        return fact_keys
    final_keys = []
    structure_keys = matching_structure.split('.')
    for structure_key in structure_keys:
        if (structure_key == fact_keys[structure_keys.index(structure_key)]):
            final_keys.append(structure_key)
        elif (structure_key == '*'):
            final_keys.append('_'.join(fact_keys[structure_keys.index(structure_key):]))
        else:
            return fact_keys
    return final_keys
