Skip to content

Use parent devices in validation test specs - #3759

Merged
ipspace merged 2 commits into
devfrom
validate-parents
Aug 11, 2026
Merged

Use parent devices in validation test specs#3759
ipspace merged 2 commits into
devfrom
validate-parents

Conversation

@ipspace

@ipspace ipspace commented Aug 11, 2026

Copy link
Copy Markdown
Owner

The 'show', 'exec', and 'valid' parameters in validation tests can accept parent devices to cover a wide range of platforms with a single definition.

Sample use case: DNS client integration test

The 'show', 'exec', and 'valid' parameters in validation tests can
accept parent devices to cover a wide range of platforms with a
single definition.

Sample use case: DNS client integration test

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables validation test specifications to use parent device types (device inheritance) in show / exec / valid dictionaries, reducing duplication across closely related platforms.

Changes:

  • Resolve validation actions by walking device inheritance (most-specific device → generic parents).
  • Extend validation schema to allow template/parent device identifiers as dictionary keys.
  • Update DNS client integration test and documentation to demonstrate/describe parent-device usage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/integration/services/01-dns-client.yml Simplifies per-platform exec map by using the ios parent key.
netsim/defaults/attributes.yml Allows template/parent device identifiers as keys for _v_option dictionaries.
netsim/cli/validate/utils.py Adds device-inheritance lookup for resolving per-device validation values/actions.
netsim/cli/validate/tests.py Updates call site for the new find_test_action(..., topology) signature.
docs/topology/validate.md Documents that show/exec/valid dictionaries may use parent device types.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread netsim/cli/validate/utils.py Outdated
Comment on lines +63 to +65
if value is None:
log.error(f'Cannot find the {action} value for {node.device} in {v_entry}',category=log.MissingDependency,module='validate')

@ipspace
ipspace merged commit 2316511 into dev Aug 11, 2026
9 checks passed
@ipspace
ipspace deleted the validate-parents branch August 11, 2026 06:17
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.

2 participants