Skip to content

Conversation

ArunSaravananBalachandran
Copy link
Collaborator

@ArunSaravananBalachandran ArunSaravananBalachandran commented Dec 24, 2024

SUMMARY
  • Add Enterprise SONiC 'ipv6_router_advertisement' resource module:
    • Provide data definitions in 'argspec'.
    • Implement 'facts' to gather facts for the module.
    • Implement 'config' to apply configurations for merged, deleted, replaced and overridden states.
    • Implement support for 'check' and 'diff' modes.
  • Define regression and unit test cases to verify correct functionality of ipv6_router_advertisement resource module.

Model PR: ansible-network/resource_module_models#290

GitHub Issues

List the GitHub issues impacted by this PR. If no Github issues are affected, please indicate this with "N/A".

GitHub Issue #
N/A
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • sonic_ipv6_router_advertisement
OUTPUT
ADDITIONAL INFORMATION
Checklist:
  • I have performed a self-review of my own code to ensure there are no formatting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility or have provided any relevant "breaking_changes" descriptions in a "fragment" file in the "changelogs/fragments" directory of this repository.
  • I have provided a summary for this PR in valid "fragment" file format in the "changelogs/fragments" directory of this repository branch. Reference : Ansible Change Log Document
How Has This Been Tested?

Regression report: ipv6_router_advertisement_regression-2025-05-08-16-28-41.zip

ansible-lint logs:

ansible-lint plugins/modules/sonic_ipv6_router_advertisement.py tests/regression/roles/sonic_ipv6_router_advertisement/ tests/unit/modules/network/sonic/fixtures/sonic_ipv6_router_advertisement.yaml

Passed: 0 failure(s), 0 warning(s) on 10 files. Last profile that met the validation criteria was 'production'.

@ArunSaravananBalachandran ArunSaravananBalachandran added the new_resource_module This pull request adds a new resource module label Dec 24, 2024
@ArunSaravananBalachandran ArunSaravananBalachandran linked an issue Apr 3, 2025 that may be closed by this pull request
@kerry-meyer
Copy link
Collaborator

Overall, the code proposed in this PR looks very good. The code structure is great. The logic all looks correct and complete. I am posting a few minor comments, plus the following question on the regression test results:


For test case 4 (deleted), there is a deletion of the "1001::2000" prefix for Vlan101, but the command doesn't modify the other prefix ("1001::1000"). For that prefix, the "after", "after(Generated)" and diff show two (default?) options that aren't present in the "before".
Is this correct behavior? If so, why does it happen?
Here is the output snippet that made me wonder about this (because it showed added options for a deletion case):

 "--- 66,76 ----",
  "          'ra_fast_retrans': true,",
  "          'ra_prefixes': [",
  "              {",
  "+                 'no_autoconfig': false,",
  "                  'off_link': true,",
  "                  'prefix': '1001:1000::/64',",
  "+                 'router_address': false,",
  "                  'valid_lifetime': 2400",
  "              }",
  "          ],",
  "          'suppress': false"
]

Copy link
Collaborator

@kerry-meyer kerry-meyer left a comment

Choose a reason for hiding this comment

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

Overall, the code proposed in this PR looks very good. The code structure is great. The logic all looks correct and complete. I am posting a few minor comments and have separately posted a question on the regression results.

Copy link
Collaborator

@kerry-meyer kerry-meyer left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the posted review comments and questions.

All current proposed code changes and corresponding test results look good.

Thank you for providing the enterprise_sonic Ansible support for IPv6 neighbor discovery.

Approved.

@kerry-meyer kerry-meyer merged commit 2e8f20c into ansible-collections:main May 8, 2025
19 checks passed
@stalabi1 stalabi1 added this to the v3.1.0 milestone Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new_resource_module This pull request adds a new resource module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Support ipv6 nd suppress-ra
3 participants