factory

factory is an experimental feature to derive more information about configurations by using several different configuration objects for a given syntax.

>>> from ciscoconfparse import CiscoConfParse
>>> parse = CiscoConfParse('/tftpboot/sfob09f02sw01.conf', syntax='ios', factory=True)
>>> hsrp_intf = parse.find_parent_objects("interface", " standby")
>>>

The most developed factory is ios.

Note

factory is an experimental feature; to enable it, parse with factory=True. If something doesn’t work, it’s a feature, not a bug.

Warning

Anything about factory parsing can change at any time (but mostly does not).

Also See