Skip to content

Fix: Null update/delete values become empty lists in SR Linux config#3415

Merged
ipspace merged 1 commit into
devfrom
srl-deploy
May 19, 2026
Merged

Fix: Null update/delete values become empty lists in SR Linux config#3415
ipspace merged 1 commit into
devfrom
srl-deploy

Conversation

@ipspace
Copy link
Copy Markdown
Owner

@ipspace ipspace commented May 19, 2026

As a safeguard against 'updates:' (or some such) lists generated by the Jinja2 templates becoming "null", the 'default([])' filter used to set the Ansible module parameters now converts falsy values into empty lists.

Based on a review comment in #3414

As a safeguard against 'updates:' (or some such) lists generated by the
Jinja2 templates becoming "null", the 'default([])' filter used to set
the Ansible module parameters now converts falsy values into empty
lists
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the SR Linux deploy-config Ansible task against YAML config fragments where delete:, updates:, or replace: are present but evaluate to null, ensuring the Nokia SR Linux Ansible module receives empty lists instead of null.

Changes:

  • Treat cfg.delete, cfg.updates, and cfg.replace as empty lists when they are falsy (including null) by switching to default([], true).
  • Preserve existing task execution gating (when:) while preventing null list parameters from reaching nokia.srlinux.config.

ipspace added a commit that referenced this pull request May 19, 2026
@ipspace ipspace merged commit 34f9b4d into dev May 19, 2026
15 checks passed
@ipspace ipspace deleted the srl-deploy branch May 19, 2026 12:32
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