Skip to content

Conversation

@prabahal
Copy link
Collaborator

@prabahal prabahal commented Jan 7, 2025

IPv6 address inventory failure.
NDFC returns ipv6 address in unabbrevated form (e.g) 2001:0:0:12 instead of 2001::12 for below requests. It mismatches value in inventory and NDFC response.
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/lanConfig/getLanSwitchCredentials
"ipAddress": "2001:420:448b:8006:fab2:0:0:13",
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/hello/inventory/test-reachability

in netascode/ansible-dc-vxlan#251

IPv6 address inventory failure.
NDFC returns ipv6 address with unabbrevated form (e.g) 2001:0:0:12 instead of 2001::12 for below requests.
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/lanConfig/getLanSwitchCredentials
        "ipAddress": "2001:420:448b:8006:fab2:0:0:13",
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/hello/inventory/test-reachability

in netascode/ansible-dc-vxlan#251
tags: sanity

- { include: dcnm.yaml, tags: ['dcnm'] }
- { include_tasks: dcnm.yaml, tags: ['dcnm'] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I merged #354 which introduced a merge conflict for this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Resolved the merge conflict

or isinstance(ipaddress.ip_address(ip_addr), ipaddress.IPv4Address)):
sw_ip = str(ipaddress.ip_address(ip_addr))
except ValueError:
sw_ip = ip_addr
Copy link
Collaborator

Choose a reason for hiding this comment

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

Help me understand the intent here. Why are we just setting sw_ip to the value that was passed in if we encounter an error?

Copy link
Collaborator Author

@prabahal prabahal Mar 6, 2025

Choose a reason for hiding this comment

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

During my UT, Observed couple of cases where have_c["switches"][0]["ipaddr"] was empty. Continuing the existing code flow if it is not of instance type "ipaddress"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants