You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating templates for some Cisco IOS devices.
Unfortunately Cisco is not consistent with the output on some of their commands across IOS versions and devices.
For example the command "show vtp status" outputs:
VTP version running : 2
on some switches. And this on others:
VTP Version : 2
Is it possible to handle this with an if statement or or?
(regexp like this, if null then regexp like this instead).
Or something similar to this:
pattern_match:
regex: "VTP Version capable : (.*)" | "VTP Version : (.*)"
Also the amounts of whitespace between names and variables differ on different devices:
Number of existing VLANs : 34
Number of existing VLANs : 8
I haven't found any examples or documentation on how to handle these situations.
EDIT:
I solved this particular problem with this regex:
I am creating templates for some Cisco IOS devices.
Unfortunately Cisco is not consistent with the output on some of their commands across IOS versions and devices.
For example the command "show vtp status" outputs:
on some switches. And this on others:
Is it possible to handle this with an if statement or or?
(regexp like this, if null then regexp like this instead).
Or something similar to this:
Also the amounts of whitespace between names and variables differ on different devices:
I haven't found any examples or documentation on how to handle these situations.
EDIT:
I solved this particular problem with this regex:
Still I would like to know if there is a possibility to do an if statement.
Also more documentation would be very helpful.
The text was updated successfully, but these errors were encountered: