コード例 #1
0
def _get_merge_match_key(key, variable_map):
    """
    Get the key name to use for matching in model merge.
    This includes resolving any variables, and removing delete notation if present.
    :param key: the key to be examined
    :param variable_map: variable map to use for substitutions
    :return: the key to use for matching
    """

    match_key = variables.substitute_key(key, variable_map)

    if model_helper.is_delete_name(match_key):
        match_key = model_helper.get_delete_item_name(match_key)
    return match_key
コード例 #2
0
def _get_merge_match_key(key, variable_map):
    """
    Get the key name to use for matching in model merge.
    This includes resolving any variables, and removing delete notation if present.
    :param key: the key to be examined
    :param variable_map: variable map to use for substitutions
    :return: the key to use for matching
    """
    if variable_map is not None:
        match_key = variables.substitute_key(key, variable_map)
    else:
        match_key = key

    if deployer_utils.is_delete_name(match_key):
        match_key = deployer_utils.get_delete_item_name(match_key)
    return match_key