Skip to content

Commit

Permalink
tests: add tests for mgmt get-data with-defaults parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Jan 31, 2024
1 parent c19d0a5 commit 3afea9c
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/topotests/mgmt_oper/r1/frr-simple.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"ip": "1.1.1.1",
"prefix-length": 24
}
]
],
"evpn-mh": {
"df-preference": 32767
}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"frr-zebra:evpn-mh": {
"df-preference": 32767,
"bypass": false,
"uplink": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"frr-zebra:evpn-mh": {
"df-preference": 32767
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"frr-zebra:evpn-mh": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"prefix-length": 24
}
],
"evpn-mh": {
"df-preference": 32767
},
"state": {
"up-count": 0,
"down-count": 0
Expand Down
21 changes: 21 additions & 0 deletions tests/topotests/mgmt_oper/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3afea9c

Please sign in to comment.