def cisco_conf_parse_objects(cfg_section, config):
return_config = []<EOL>if type(config) is str:<EOL><INDENT>config = config.splitlines()<EOL><DEDENT>parse = CiscoConfParse(config)<EOL>cfg_obj = parse.find_objects(cfg_section)<EOL>for parent in cfg_obj:<EOL><INDENT>return_config.append(parent.text)<EOL>for child in parent.all_children:<EOL><INDENT>return_config.append(child.text)<EOL><DEDENT><DEDENT>return return_config<EOL>
Use CiscoConfParse to find and return a section of Cisco IOS config.
Similar to "show run | section <cfg_section>"

:param cfg_section: The section of the config to return eg. "router bgp"
:param config: The running/startup config of the device to parse