Improve performance of the NOS driver #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Without these optimizations, it was taking around 9-10 minutes to configure a a switchport in access mode. The commits in this PR cuts this down by half. There are 2 major changes:
show running-config | include host-name
. In our case, because the switches are stacked this returns the configuration from all of our 8 stacked switches which takes a while to generate. By setting match to none, it ignores comparing[1] the source config and running config.Not sure if this has a place in this repository as the driver without the optimizations maybe okay for people who don't have their switches stacked, but I wanted to submit this in case folks are interested.
[1] https://docs.ansible.com/ansible/latest/collections/community/network/nos_config_module.html#parameter-match