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
Well Jmespath search which is used by Jdiff in this implementation is case sensitive. So just because you look at the template in ntc-templates repo and the key is named INTERFACE in your jpath definition you must realize that it will be lowercased behind the scenes. So make sure your jpath is lowercased for the key calls.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When you're creating your own onboarding extension that is using TextFSM its important to know how the case sensitivity works.
The onboarding parsing type is
textfsm
, which in reality usesntc-templates
behind the scenes, more specifically commands are parsed using thentc-templates
parse
method. This method will lowercase all the parsed data keys.https://github.com/networktocode/ntc-templates/blob/0cb018ab1e96a748969b2231c33bf651dd7483a8/ntc_templates/parse.py#L37
So why does it matter?
Well Jmespath search which is used by Jdiff in this implementation is case sensitive. So just because you look at the template in ntc-templates repo and the key is named
INTERFACE
in your jpath definition you must realize that it will be lowercased behind the scenes. So make sure your jpath is lowercased for the key calls.Beta Was this translation helpful? Give feedback.
All reactions