Skip to content

feat(inventory): qualify short provider names with group domain_suffix - #34

Merged
ntwrknrd merged 1 commit into
mainfrom
feat/netbox-group-domain
Oct 28, 2026
Merged

ntwrknrd merged 1 commit into
mainfrom
feat/netbox-group-domain

Conversation

@ntwrknrd

Copy link
Copy Markdown
Owner

Summary

NetBox stores many firewall cluster nodes under short names (for example ACME-vPAN01). nssh derives a domain only from dotted names, so those devices could not match a domain-based group and had no resolvable hostname.

A provider group's top-level domain_suffix now qualifies short objects assigned to that group: when it lists exactly one suffix and the object has no domain and no separate address, the host becomes <name><suffix> and keeps the short name as a lookup pattern. Group selection still uses the original name, so such groups match on fields like manufacturer and role.

Changes

  • internal/inventory/engine.go: route group assignment through groupProviderHost, which applies qualifyShortObject.
  • Tests for qualified short names and for untouched dotted, addressed, and multi-suffix cases.
  • Documented in the nssh skill reference and example_config.yaml.

Verification

  • make container-test passes.
  • Ran a branch build in an isolated config/state copy against production NetBox: a Palo Alto Firewall Cluster Node group with domain_suffix: [.custcbb.local] synced 1,076 vPAN nodes, all qualified. nssh inv get resolved both the short lowercase name and the FQDN.

NetBox records many firewall cluster nodes under short names such as
ACME-vPAN01. nssh only derives a domain from dotted names, so these devices
could never be addressed. A provider group's single top-level domain_suffix
now qualifies short, unaddressed objects assigned to it, keeping the short
name as a lookup pattern.
@ntwrknrd
ntwrknrd merged commit fb8893e into main Oct 28, 2026
3 checks passed
@ntwrknrd
ntwrknrd deleted the feat/netbox-group-domain branch October 28, 2026 17:00
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.

1 participant