Commit 8df96a1
committed
test/infamy: support [.='value'] in restconf transport
The xpath_to_uri() method did not properly handle XPath expressions that
use [.='value'] syntax for selecting leaf-list items. Example types of
XPath selection syntaxes:
[key='value'] - for list items with named keys
[.='value'] - for leaf-list items (current node selection)
Example XPath requiring this fix:
/infix-firewall:firewall/zone[name='untrusted']/interface[.='e2']
Must be converted to a RESTCONF URL:
/infix-firewall:firewall/zone=untrusted/interface=e2
Without this fix, the [.='value'] pattern was incorrectly converted and
caused "400 Bad Request" errors when attempting to delete any leaf-list
value with this syntax via RESTCONF.
Signed-off-by: Joachim Wiberg <[email protected]>1 parent 9ff50e2 commit 8df96a1
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
0 commit comments