IOSConfigList Object

class ciscoconfparse.IOSConfigList(data=None, comment_delimiter='!', debug=False, factory=False, ignore_blank_lines=True, syntax='ios', CiscoConfParse=None)

A custom list to hold IOSCfgLine objects. Most people will never need to use this class directly.

Initialize the class.

  • data (list): A list of parsed IOSCfgLine objects
  • comment (str): A comment delimiter. This should only be changed when parsing non-Cisco IOS configurations, which do not use a ! as the comment delimiter. comment defaults to ‘!’
  • debug (bool): debug defaults to False, and should be kept that way unless you’re working on a very tricky config parsing problem. Debug output is not particularly friendly
  • ignore_blank_lines (bool): ignore_blank_lines defaults to True; when this is set True, ciscoconfparse ignores blank configuration lines. You might want to set ignore_blank_lines to False if you intentionally use blank lines in your configuration (ref: Github Issue #2).

Walk this configuration and return the following tuple at each parent ‘level’:

(list_of_parent_sibling_objs, list_of_nonparent_sibling_objs)