]> git.puffer.fish Git - matthieu/frr.git/commit
tools: significantly simplify frr-reload context processing
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 9 Aug 2021 20:38:21 +0000 (23:38 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 23 Aug 2021 19:08:20 +0000 (22:08 +0300)
commitfc43980f25eab0f5e05e274f7144cda811333284
treeb7a5e1d5990ebb1d2be601e86b7378be6b6aaacf
parent6b7388555605024fd6594cc998badb6bcd7069f5
tools: significantly simplify frr-reload context processing

Currently, in frr-reload we:
- store a list of single-line context keywords which needs to be
  frequently updated,
- have a separate "if" clause for every node and subnode we have in FRR.

Instead, we can store the tree of all known FRR nodes. This tree needs
to be updated whenever we add a new node, which is not frequent. And,
most importantly, it allows us to write node-agnostic code and save more
than 250 LOC.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
tools/frr-reload.py