diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-01-07 13:17:37 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 13:17:37 -0500 | 
| commit | 96ab6ae32b95e3399dc23805e2d31bae99a59a60 (patch) | |
| tree | a5410bfcd861edca3c7a33fcd31a541578f85c13 /tests | |
| parent | 0a52c233d366b6c97bafe941cbee37890fab7e93 (diff) | |
| parent | 0ce15fb0f770f5b20199dbff8931bd95f6aabcfd (diff) | |
Merge pull request #17781 from LabNConsulting/chopps/fix-keyless-list-query
fix xpath query on keyless list with positional predicate
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lib/northbound/test_oper_data.in | 3 | ||||
| -rw-r--r-- | tests/lib/northbound/test_oper_data.refout | 43 | 
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/lib/northbound/test_oper_data.in b/tests/lib/northbound/test_oper_data.in index f7c44cad31..0053148953 100644 --- a/tests/lib/northbound/test_oper_data.in +++ b/tests/lib/northbound/test_oper_data.in @@ -1,2 +1,5 @@  show yang operational-data /frr-test-module:frr-test-module +show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[2] +show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[3]/interface +show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[10]  test rpc diff --git a/tests/lib/northbound/test_oper_data.refout b/tests/lib/northbound/test_oper_data.refout index eadb639645..2536e0306b 100644 --- a/tests/lib/northbound/test_oper_data.refout +++ b/tests/lib/northbound/test_oper_data.refout @@ -131,6 +131,49 @@ test# show yang operational-data /frr-test-module:frr-test-module      }
    }
  }
 +test# show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[2] +{
 +  "frr-test-module:frr-test-module": {
 +    "vrfs": {
 +      "vrf": [
 +        {
 +          "name": "vrf0",
 +          "routes": {
 +            "route": [
 +              {
 +                "prefix": "10.0.0.1/32",
 +                "next-hop": "172.16.0.1",
 +                "interface": "eth1",
 +                "metric": 1
 +              }
 +            ]
 +          }
 +        }
 +      ]
 +    }
 +  }
 +}
 +test# show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[3]/interface +{
 +  "frr-test-module:frr-test-module": {
 +    "vrfs": {
 +      "vrf": [
 +        {
 +          "name": "vrf0",
 +          "routes": {
 +            "route": [
 +              {
 +                "interface": "eth2"
 +              }
 +            ]
 +          }
 +        }
 +      ]
 +    }
 +  }
 +}
 +test# show yang operational-data /frr-test-module:frr-test-module/vrfs/vrf[name='vrf0']/routes/route[10] +{}
  test# test rpc  vrf testname data testdata  test#   | 
