parseConfigBlocks
parseConfigBlocks(os: OS, text: String) : List<ConfigLine>
The parseConfigBlocks(os, text) function can be used to parse
a collection of configuration blocks from a string that holds a device configuration.
In other words,
an expression like parseConfigBlocks(OS.NXOS, "interface eth1\n no shut\n")
could be used to parse some NXOS configuration in the given string.
The resulting value can then be used with various pattern-matching functions.
This function may be useful to process the response to custom commands, for example the response to command "show running-config all".
Not all lines in the given text correspond to some ConfigLine in the output.
The lines that are ignored depend on the value of os.
Here are all the ways that an input line is ignored.
OS.PAN_OS- No lines are ignored.
- For all other values of
os, a line is ignored if any of the following are true.- The line is blank.
- The line starts with
!,#,;,%,building configuration...(ignoring case), orcurrent configuration :(ignoring case).
- The line starts with
Usingand containsbytes, such asUsing 2016 out of 260088 bytes!.