Page MenuHomeDevCentral

add helper get_carp_entries() to _modules/node.py and unit tests
Needs ReviewPublic

Authored by yousra on Thu, Feb 26, 12:41.
Tags
None
Referenced Files
F24569424: D3979.diff
Fri, Feb 27, 18:40
F24565322: D3979.diff
Fri, Feb 27, 13:40
F24561572: D3979.diff
Fri, Feb 27, 08:50
F24556751: D3979.id10325.diff
Fri, Feb 27, 02:53
F24556733: D3979.id10324.diff
Fri, Feb 27, 02:53
F24555093: D3979.id10325.diff
Fri, Feb 27, 01:01
F24555080: D3979.id10324.diff
Fri, Feb 27, 01:00
Unknown Object (File)
Thu, Feb 26, 23:24
Subscribers
None

Details

Summary

Introduce a new helper function get_carp_entries() to retrieve CARP
configuration entries from pillar network data.

The function iterates over interfaces, filters FHRP entries using
the "carp" protocol, and returns structured and ordered data including:

  • device (interface name)
  • vhid
  • vip
  • advskew (defaulting to 0 when not specified)

Unit tests were added to validate:

  • correct extraction of CARP entries when present,
  • proper handling of empty FHRP lists

ref T2264

Test Plan
  • Ran make test in _tests directory and all the tests were successful

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
role-router
Build Status
Buildable 6375
Build 6659: arc lint + arc unit