def cisco_conf_parse_parents(parent, child, config):
    """
    Use CiscoConfParse to find parent lines that contain a specific child line.

    :param parent: The parent line to search for
    :param child:  The child line required under the given parent
    :param config: The device running/startup config
    """
    if type(config) == str:
        config = config.splitlines()
    parse = CiscoConfParse(config)
    cfg_obj = parse.find_parents_w_child(parent, child)
    return cfg_obj
def cisco_conf_parse_parents ( parent , child , config ) : if type ( config ) == str : config = config . splitlines ( ) parse = CiscoConfParse ( config ) cfg_obj = parse . find_parents_w_child ( parent , child ) return cfg_obj
Use CiscoConfParse to find parent lines that contain a specific child line.

    :param parent: The parent line to search for
    :param child:  The child line required under the given parent
    :param config: The device running/startup config