Skip to content

Return None in case of invalid syntax#454

Merged
madhansansel merged 2 commits into
mainfrom
private/vivekraj2000/CSCwu13821
May 8, 2026
Merged

Return None in case of invalid syntax#454
madhansansel merged 2 commits into
mainfrom
private/vivekraj2000/CSCwu13821

Conversation

@vivekraj2000
Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Description

Summary:
The device_credential_playbook_config_generator module creates YAML files even when the filters match nothing. This contradicts the documented behavior, which says no file should be created and the module should return a "No configurations found" message.

Made changes to return None in case of invalid filters

Testing Done:

  • [] Manual testing
  • [] Unit tests
  • [] Integration tests

Test cases covered: [Mention test case IDs or brief points]

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • All the sanity checks have been completed and the sanity test cases have been executed

Ansible Best Practices

  • Tasks are idempotent (can be run multiple times without changing state)
  • Variables and secrets are handled securely (e.g., using ansible-vault or environment variables)
  • Playbooks are modular and reusable
  • Handlers are used for actions that need to run on change

Documentation

  • All options and parameters are documented clearly.
  • Examples are provided and tested.
  • Notes and limitations are clearly stated.

Screenshots (if applicable)

Notes to Reviewers

@vivekraj2000 vivekraj2000 requested a review from madhansansel as a code owner May 8, 2026 07:13
"Returning empty credential details.",
"WARNING"
)
return None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add a new line after this.

@madhansansel madhansansel merged commit 7690f27 into main May 8, 2026
12 of 13 checks passed
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