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.

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 6376
Build 6660: arc lint + arc unit