Conversation
The 'normalize' configuration is deployed as a separate step before the initial device configuration to ensure that the Ansible-controlled devices get normalized configuration before the initial configuration is deployed with configuration scripts. Closes #3319
There was a problem hiding this comment.
Pull request overview
This PR changes the netlab initial workflow so device “normalize” configuration is deployed as a distinct step before initial/module/custom deployment, ensuring Ansible-managed devices get normalized before any provider-specific configuration scripts run (fixing #3319).
Changes:
- Adds an explicit “normalize” deployment phase (and an Ansible
netlab_normalizeinventory group +normalize-config.ansibleplaybook). - Extends
netlab initialCLI with--normalizeand--dry-run, and wires dry-run logging into parts of the initial flow. - Updates documentation to reflect the new normalization step and new CLI flags.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
netsim/outputs/ansible.py |
Adds netlab_normalize inventory group membership based on features.initial.normalize. |
netsim/devices/iosvl2.yml |
Marks IOSvL2 as requiring initial.normalize. |
netsim/cli/initial/utils.py |
Adds --normalize / --dry-run CLI flags and changes deployment list logic for normalize-only runs. |
netsim/cli/initial/ready.py |
Adds partial dry-run handling for internal readiness checks. |
netsim/cli/initial/deploy.py |
Splits normalize deployment from the rest; adds dry-run logging; introduces normalize-config.ansible execution path. |
netsim/cli/initial/__init__.py |
Enables global dry-run flag via set_dry_run(args). |
netsim/ansible/tasks/initial-config.yml |
Removes legacy task file that previously ran normalize+initial. |
netsim/ansible/normalize-config.ansible |
New playbook for normalization step (hosts netlab_normalize). |
netsim/ansible/initial-config.ansible |
Inlines initial deployment tasks (no longer imports the removed task file). |
docs/netlab/initial.md |
Updates docs for the new normalize step and adds --normalize / --dry-run. |
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.
The 'normalize' configuration is deployed as a separate step before the initial device configuration to ensure that the Ansible-controlled devices get normalized configuration before the initial configuration is deployed with configuration scripts.
Closes #3319