diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-13 23:54:08 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-15 09:27:33 +0100 |
commit | 2764344bcbd37c5ea69231d6e51ba9cd58edbb44 (patch) | |
tree | 1aa9970c47f61b48cc0ae36df297f0e2f01f969f /tests | |
parent | lib, mgmtd: add ability to request the exact node in get-data request (diff) | |
download | frr-2764344bcbd37c5ea69231d6e51ba9cd58edbb44.tar.xz frr-2764344bcbd37c5ea69231d6e51ba9cd58edbb44.zip |
tests: add tests for mgmt get-data exact node request
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'tests')
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json new file mode 100644 index 000000000..e00f23c3d --- /dev/null +++ b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-description-exact.json @@ -0,0 +1,3 @@ +{ + "frr-interface:description": "r1-eth0-desc" +} diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json new file mode 100644 index 000000000..f04e3a55e --- /dev/null +++ b/tests/topotests/mgmt_oper/simple-results/result-intf-eth0-exact.json @@ -0,0 +1,22 @@ +{ + "frr-interface:interface": [ + { + "name": "r1-eth0", + "vrf": "default", + "state": { + "if-index": "rubout", + "mtu": 1500, + "mtu6": 1500, + "speed": 10000, + "metric": 0, + "phy-address": "rubout" + }, + "frr-zebra:zebra": { + "state": { + "up-count": 0, + "down-count": 0 + } + } + } + ] +} diff --git a/tests/topotests/mgmt_oper/test_simple.py b/tests/topotests/mgmt_oper/test_simple.py index 2f75dfc82..a52d125ec 100644 --- a/tests/topotests/mgmt_oper/test_simple.py +++ b/tests/topotests/mgmt_oper/test_simple.py @@ -127,6 +127,16 @@ def test_oper_simple(tgen): "simple-results/result-intf-description.json", "with-config", ), + ( + '/frr-interface:lib/interface[name="r1-eth0"]', + "simple-results/result-intf-eth0-exact.json", + "exact", + ), + ( + '/frr-interface:lib/interface[name="r1-eth0"]/description', + "simple-results/result-intf-eth0-description-exact.json", + "with-config exact", + ), # Interface state ( '/frr-interface:lib/interface[name="r1-eth0"]/state', |