]> git.proxmox.com Git - mirror_frr.git/commit
topotests: add support for frr.conf as a unified config
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Sun, 27 Feb 2022 01:59:48 +0000 (19:59 -0600)
committerJafar Al-Gharaibeh <jafar@atcorp.com>
Mon, 28 Feb 2022 02:53:18 +0000 (20:53 -0600)
commita4b4bb5077c3c11cc13f43ef15dd3a3e7251a54c
treef517fb701d59b9b412b75386aed39ddf55a4f357
parentae45a630222b53b02d8fc7cd84bb24d8744cd09c
topotests: add support for frr.conf as a unified config

This PR adds support for configuring topotest routers using a single file.
  instead of:
```
        router.load_config(
    TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
    )
router.load_config(
    TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
    )
router.load_config(
    TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
    )
```
  you can now do:
```
        router.load_frr_config(
    os.path.join(CWD, "{}/frr.conf".format(rname)),
    [TopoRouter.RD_ZEBRA, TopoRouter.RD_OSPF, TopoRouter.RD_BGP]
    )
```
or just:

```
        router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
```
In this latter case, the daemons list will be inferred from frr.conf file.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
tests/topotests/lib/topogen.py
tests/topotests/lib/topotest.py