Repository navigation
feat(inventory): qualify short provider names with group domain_suffix - #34
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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_suffixnow 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 throughgroupProviderHost, which appliesqualifyShortObject.example_config.yaml.Verification
make container-testpasses.Firewall Cluster Nodegroup withdomain_suffix: [.custcbb.local]synced 1,076 vPAN nodes, all qualified.nssh inv getresolved both the short lowercase name and the FQDN.