Page MenuHomeDevCentral

Read the CARP peer parameter from pillar
ClosedPublic

Authored by yousra on Wed, Mar 18, 13:35.
Tags
None
Referenced Files
F25284638: D4009.id10496.diff
Wed, Apr 8, 20:09
Unknown Object (File)
Sat, Apr 4, 22:11
Unknown Object (File)
Sat, Apr 4, 14:30
Unknown Object (File)
Thu, Apr 2, 05:09
Unknown Object (File)
Wed, Apr 1, 11:34
Unknown Object (File)
Wed, Apr 1, 11:34
Unknown Object (File)
Wed, Apr 1, 11:34
Unknown Object (File)
Mon, Mar 30, 17:43

Details

Summary

Parameter is optional.

Ref T2274

Test Plan

Tested the function (get_carp_entries) with CARP entries containing a peer

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
test-node.py-peer
Build Status
Buildable 6492
Build 6776: arc lint + arc unit

Event Timeline

yousra requested review of this revision.Wed, Mar 18, 13:35
yousra created this revision.
dereckson retitled this revision from Update get_carp_entries in _modules/node.py to read the optional CARP peer parameter from pillar to Read the CARP peer parameter from pillar.Wed, Mar 18, 19:38
dereckson edited the summary of this revision. (Show Details)
_modules/node.py
523
537

Can be simplified in Python 3.8+:

if peer := fhrp.get("peer"):
    entry["peer"] = peer

Reference: https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions

Simplified in Python 3.8+ :

if peer := fhrp.get("peer"):

entry["peer"] = peer
This revision is now accepted and ready to land.Thu, Mar 19, 18:09
This revision was automatically updated to reflect the committed changes.