Skip to content

feat(inventory): dual-stack IPv6 Import-Inventory (#58) - #68

Merged
jacobyoby merged 1 commit into
mainfrom
cursor/inventory-dual-stack-ipv6-c3de
Sep 9, 2026
Merged

jacobyoby merged 1 commit into
mainfrom
cursor/inventory-dual-stack-ipv6-c3de

Conversation

@jacobyoby

Copy link
Copy Markdown
Owner

Closes #58.

Import-Inventory still called ConvertTo-NormalizedIPv4Address / ConvertTo-NormalizedIPv4Cidr after #57, so ARP and DrawIO could handle IPv6 while the documented inventory path rejected it.

Changes

  • New private helpers ConvertTo-NormalizedIPAddress and ConvertTo-NormalizedCidr (canonical string form; CIDR host bits cleared for both families).
  • Import-Inventory uses those helpers. IPv4-named converters stay in place for Invoke-NetworkDiscovery (Wizard + Invoke-NetworkDiscovery: IPv6 / dual-stack scan follow-on #61 follow-on).
  • Single-node identity: one ip per device. Uniqueness is the normalized address string (compressed vs expanded IPv6 are duplicates). When a dual-stack host needs only one row, prefer IPv4.
  • README inventory contract + template now show v6 and no longer claim IPv4-only rejection.

Tests

  • IPv6 literal import and dual-stack import (devices + both-family CIDRs)
  • Duplicate compressed/expanded v6, invalid v6, invalid v6 prefix, v6 CIDR host-bit clearing
  • DrawIO parenting after Import-Inventory of a dual-stack fixture

Does not merge. Wizard / discovery IPv6 scanning remains out of scope.

Open in Web Open in Cursor 

Import-Inventory now normalizes IPv4 and IPv6 device ips and subnet
CIDRs via family-agnostic helpers instead of the IPv4-only converters.
Node identity remains one address per row; prefer IPv4 when a dual-stack
host needs a single identity.

Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
@jacobyoby
jacobyoby marked this pull request as ready for review September 9, 2026 19:22
@jacobyoby
jacobyoby merged commit 9a5bdfa into main Sep 9, 2026
7 checks passed
@jacobyoby
jacobyoby deleted the cursor/inventory-dual-stack-ipv6-c3de branch September 9, 2026 19:22
jacobyoby added a commit that referenced this pull request Sep 9, 2026
Replace the hand-built Import-Topology IPv6 path with inventory JSON
(v4 + v6 node/subnet) through Import-Inventory → Export-DrawIO so the
packaged smoke gate exercises #68. Assert both family IPs in XML.

Closes #75.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import-Inventory: accept dual-stack IPv6 addresses and CIDRs after #57

2 participants