Page MenuHomeDevCentral

Retrieve CARP configuration for a specific node
ClosedPublic

Authored by yousra on Thu, Feb 26, 12:41.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 16, 20:25
Unknown Object (File)
Mon, Mar 16, 02:23
Unknown Object (File)
Sun, Mar 15, 23:30
Unknown Object (File)
Sun, Mar 15, 08:53
Unknown Object (File)
Sat, Mar 14, 14:15
Unknown Object (File)
Thu, Mar 12, 17:04
Unknown Object (File)
Thu, Mar 12, 07:17
Unknown Object (File)
Thu, Mar 12, 06:22
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)

Ref T2264

Test Plan

Added unit tests for get_carp_entries to validate:

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

Executed the tests and confirmed all tests pass

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

yousra requested review of this revision.Thu, Feb 26, 12:41
yousra created this revision.

I added a test to determine if the function get_carp_entries() will avoid an FHRP group
if it's not the CARP protocol. Also, it is more readable if we place the CARP configuration directly in the forest.yaml.

dereckson retitled this revision from add helper get_carp_entries() to _modules/node.py and unit tests to Retrieve CARP configuration for a specific node.
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Wed, Mar 4, 07:29