def gen_target_cfg_items(target_cfg):
    """
    Convert target_cfg to list of target configs
    """
    if isinstance(target_cfg, list):
        # list of templates defined for this target
        return target_cfg
    elif isinstance(target_cfg, dict):
        # only one template defined for this target
        return [target_cfg]
    else:
        return None