napalm-automation-community / napalm-arubaos-switch

NAPALM driver for ArubaOS-Switch
MIT License
16 stars 9 forks source link

IPv6 raw address improvement #17

Closed derpedda closed 2 years ago

derpedda commented 2 years ago

Added IPv6 raw address check and handling for underlying requests library

Description

When using the napalm plugin with the netbox-napalm-module, the underlying requests-library rejects requests when the hostname is not a resolvable FQDN or hostname, but a raw IPv6 address. To address this, I introduced a quick check in the ArubaOSS-Class that checks if the hostname is an IPv6 address and encloses it in squared brackets [ip6], so it is handled correctly by the requests-library.

Types of Changes

What types of changes does your code introduce? Keep the ones that apply:

Review

List of tasks the reviewer must do to review the PR