Skip to main content
Solved

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

  • July 6, 2021
  • 1 reply
  • 26 views

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

Best answer by deepak.bhardwaj

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.

View original

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings