Skip to content

Access Point CG bug fix#450

Merged
madhansansel merged 1 commit intomainfrom
ap_cg_bug_fix
Apr 30, 2026
Merged

Access Point CG bug fix#450
madhansansel merged 1 commit intomainfrom
ap_cg_bug_fix

Conversation

@shatagopasunil
Copy link
Copy Markdown

Type of Change

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

Description

This PR fixes bugs in accesspoint_playbook_config_generator.py around filter processing and improves unit test reliability and structure.

  • Provisioning validation in provision_hostname_list filter: APs found by hostname are now checked for rf_profile and site before being included. Unprovisioned APs are added to the unprocessed list instead of causing failures.
  • No-fail behavior for unmatched filters: When filters produce no matching APs, the module now returns an ok status instead of failing.
  • Log level cleanup: Expected no-match scenarios (e.g., unprovisioned AP) now log at DEBUG instead of WARNING.
  • File-write idempotency: When the output file content is unchanged, the module returns changed=False and ok status. A new file write returns changed=True and success status.

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

@madhansansel madhansansel merged commit 80860a2 into main Apr 30, 2026
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