Update IOS XE management_interface implementation to support proposed… #127
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.
… IPv6 parser for interface determination
Problem statement:
When connecting to a device that uses an IPv6-enabled management interface, the current implementation of
management_interface.py
uses the ShowIpInterfaceBriefPipeIp parser, which will return nothing for an IPv6 address. This results in Genie printing the message "Device '<device_name>' does not have a management interface configured which could be found"Proposed solution:
In conjunction with Genie parser PR #751 (CiscoTestAutomation/genieparser#751), this change attempts to import the ShowIpv6InterfaceBriefPipeIp parser which should be used if the address in the testbed is an IPv6 address.
If the module does not exist, catch the ModuleImportError exception and pass in the parser selection, leaving the existing functionality intact.
Note:
The try...except statements can be removed after approval of parser PR #751 - this is a safeguard until the next release.
Screenshot of existing behavior and connection result:

Screenshot of new behavior when ShowIpv6InterfaceBriefPipeIp is not available:

Screenshot of new behavior with ShowIpv6InterfaceBriefPipeIp parser installed:
