Skip to main content

How many different Matching Flags are there in FIT line pattern and what are there uses?

There are total 4 flags supported by Feature Intent Templates (FIT) :-

O: Optional

M: Must to have

F: Fuzzy match

E: Exact match

 

As per name suggest, these flags have below meanings:-

Optional: The given line pattern can be or cannot be present in the configuration

Must to have: Given line pattern has to be present in the configuration

Exact match: The matched configuration has to be of same length and type as per line pattern

Fuzzy match: It is used for partially matching the configuration lines.

Here is an example for Fuzzy match:

If you want to compare 

ip address 10.10.10.10 255.255.255.0 secondary

Then you can use below line pattern

ip address $ip_address $ip_subnet

As we can see that “Secondary” word is not matched by this line pattern, but still if this is a Fuzzy match. Then it will return this configuration line as matched.

Note: The fuzzy match will only work as long as configuration line exactly starts with the line pattern.


Reply