HomeDevCentral

Retrieve CARP configuration for a specific node

Description

Retrieve CARP configuration for a specific node

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

Reviewers: dereckson, Duranzed

Reviewed By: dereckson

Maniphest Tasks: T2264

Differential Revision: https://devcentral.nasqueron.org/D3979

Details

Provenance
yousraAuthored on Thu, Mar 5, 14:40
yousraPushed on Thu, Mar 5, 14:54
Reviewer
dereckson
Differential Revision
D3979: Retrieve CARP configuration for a specific node
Parents
rOPS7a20ee8b442c: Allow all servers to read IPsec in Vault
Branches
Unknown
Tags
Unknown
References
HEAD -> main
Tasks
T2264: Implement CARP configuration for router-002 and router-003