Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow classes to use parent's textfsm templates #798

Merged
merged 3 commits into from Aug 30, 2018
Merged

Conversation

bewing
Copy link
Member

@bewing bewing commented Aug 23, 2018

Similar to the change in load_template, allow classes that inherit
from a NetworkDriver class to optionally override the textfsm templates
used via textfsm_extractor, or utilize the MRO to provide a list of paths
to search until a template is found.

Similar to the change in `load_template`, allow classes that inherit
from a NetworkDriver class to optionally override the textfsm templates
used via `textfsm_extractor`, or utilize the MRO to provide a list of paths
to search until a template is found.
No longer needed, and also provides a test for the new textfsm_extractor
inheritance.
@coveralls
Copy link

coveralls commented Aug 23, 2018

Coverage Status

Coverage increased (+0.02%) to 78.987% when pulling aa3cfaa on textfsm_inherit into 617d16a on develop.

@ktbyers
Copy link
Contributor

ktbyers commented Aug 30, 2018

Documenting the behavior:

[<class 'test.eos.conftest.PatchedEOSDriver'>, 
 <class 'napalm.eos.eos.EOSDriver'>, 
 <class 'napalm.base.base.NetworkDriver'>, 
 <class 'object'>]

In this example, it would first look in the following directories in the following order:

'/path/napalm/test/eos/utils/textfsm_templates'
'/path/napalm/napalm/eos/utils/textfsm_templates'
'/path/napalm/napalm/base/utils/textfsm_templates'

Copy link
Contributor

@ktbyers ktbyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ktbyers ktbyers merged commit 293f70d into develop Aug 30, 2018
@mirceaulinic mirceaulinic deleted the textfsm_inherit branch September 14, 2018 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants