Skip to content

Proposals #18

@itdependsnetworks

Description

@itdependsnetworks

Trying to get a feel for what the appetite for a few updates into textfsm are. Using it a fair amount I have identified a few short comings (that you can work around, but are difficult.)

Missed captures
Example: I recently had a case in which on a "show interface status" I hit a condition in about %2 of interfaces. My data size what over 60K of interfaces so it was not easy to find.

Proposal: Set a flag that indicates all lines must match. Not that there must be a capture group in a given match, but that simply you have seen every line, and have profiled it already. Meaning that if it completes the rule set without a match, fail. This would be helpful when trying to match large routing tables, or large amounts of data to identify an issue early.

Repeated Data
Example: As noted in #11 when data is repeated, there is not an elegant solution to capture the multiple items

Proposal: A new key (RepeatedItem) that will reprocess a line with the assumption that there is repeated data, and to add to the list.

Trim()
Example: Often it is tough (reverse or forward lookbacks is the only way I have found) to get rid of pre/post white space.

Proposal: A new key (Trim) that will do minor post processing on the data after the match

Column Count
Example: Some output is merely based on column count (routing tables especially) and difficult to match when data may or may not be there.

Proposal: This is clearly the flimsiest of the proposals, however I would like a mechanism to identify the regex in one space, and just define space counts in the next.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions