tests: add tests for mgmt get-data with-defaults parameter

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2024-01-30 00:34:21 +02:00
parent c19d0a5bf3
commit 3afea9ccda
8 changed files with 57 additions and 1 deletions

View File

@ -15,6 +15,7 @@ debug mgmt client backend
interface r1-eth0
ip address 1.1.1.1/24
description r1-eth0-desc
evpn mh es-df-pref 32767
exit
interface r1-eth1 vrf red

View File

@ -10,7 +10,10 @@
"ip": "1.1.1.1",
"prefix-length": 24
}
]
],
"evpn-mh": {
"df-preference": 32767
}
}
}
]

View File

@ -0,0 +1,13 @@
{
"frr-zebra:evpn-mh": {
"df-preference": 32767,
"bypass": false,
"@bypass": {
"ietf-netconf-with-defaults:default": true
},
"uplink": false,
"@uplink": {
"ietf-netconf-with-defaults:default": true
}
}
}

View File

@ -0,0 +1,7 @@
{
"frr-zebra:evpn-mh": {
"df-preference": 32767,
"bypass": false,
"uplink": false
}
}

View File

@ -0,0 +1,5 @@
{
"frr-zebra:evpn-mh": {
"df-preference": 32767
}
}

View File

@ -0,0 +1,3 @@
{
"frr-zebra:evpn-mh": {}
}

View File

@ -20,6 +20,9 @@
"prefix-length": 24
}
],
"evpn-mh": {
"df-preference": 32767
},
"state": {
"up-count": 0,
"down-count": 0

View File

@ -146,6 +146,27 @@ def test_oper_simple(tgen):
'/frr-interface:lib/interface[name="r1-eth0"]/state/mtu',
"simple-results/result-intf-state-mtu.json",
),
# with-defaults
(
'/frr-interface:lib/interface[name="r1-eth0"]/frr-zebra:zebra/evpn-mh',
"simple-results/result-intf-eth0-wd-explicit.json",
"with-config exact",
),
(
'/frr-interface:lib/interface[name="r1-eth0"]/frr-zebra:zebra/evpn-mh',
"simple-results/result-intf-eth0-wd-trim.json",
"with-config exact with-defaults trim",
),
(
'/frr-interface:lib/interface[name="r1-eth0"]/frr-zebra:zebra/evpn-mh',
"simple-results/result-intf-eth0-wd-all.json",
"with-config exact with-defaults all",
),
(
'/frr-interface:lib/interface[name="r1-eth0"]/frr-zebra:zebra/evpn-mh',
"simple-results/result-intf-eth0-wd-all-tag.json",
"with-config exact with-defaults all-tag",
),
]
r1 = tgen.gears["r1"].net