Conversation
This commit adds the '--include' and '--exclude' parameters to the 'netlab graph' command. These parameters can be used to include or exclude nodes or links from the lab topology and thus create graphs from a subset of the overall topology.
There was a problem hiding this comment.
Pull request overview
This PR adds --include and --exclude parameters to the netlab graph command, enabling users to create graphs from subsets of lab topology nodes and links based on modules, roles, or custom graph classes.
Changes:
- New CLI parameters (
-i/--includeand-x/--exclude) for filtering topology elements - Core filtering logic that matches against node modules, link roles, and graph.class attributes
- Schema extensions to support graph.class attribute on nodes and links
- Comprehensive test coverage with multiple filtering scenarios
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| netsim/cli/graph.py | Adds CLI argument parsing for include/exclude parameters with validation |
| netsim/outputs/_graph.py | Implements two-phase filtering algorithm: marking items then removing orphaned connections |
| netsim/outputs/graph.yml | Extends schema to support graph.class attribute as list of strings on nodes and links |
| docs/netlab/graph.md | Documents new filtering parameters with usage examples and behavior explanation |
| tests/platform-integration/graph/05-include-exclude.yml | Adds integration tests for exclude by class and include by module/role |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Owner
Author
|
You asked for it @a-v-popov ;) |
ipspace
added a commit
that referenced
this pull request
Feb 3, 2026
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.
This commit adds the '--include' and '--exclude' parameters to the 'netlab graph' command. These parameters can be used to include or exclude nodes or links from the lab topology and thus create graphs from a subset of the overall topology.