Skip to content

Fix RegEx for xpath leaf-list keys which include a "-" character.#240

Merged
mike-albano merged 1 commit intomasterfrom
fix_pathkey
Sep 17, 2020
Merged

Fix RegEx for xpath leaf-list keys which include a "-" character.#240
mike-albano merged 1 commit intomasterfrom
fix_pathkey

Conversation

@mike-albano
Copy link
Contributor

For example:
/bgp/neighbors/neighbor[neighbor-address=30.1.1.1]/config/neighbor-address

For example:
/bgp/neighbors/neighbor[neighbor-address=30.1.1.1]/config/neighbor-address
@mike-albano mike-albano merged commit f17ca2a into master Sep 17, 2020
@mike-albano mike-albano mentioned this pull request Sep 17, 2020
Verma-Anukul added a commit to Verma-Anukul/sonic-buildimage that referenced this pull request Jan 27, 2026
Verma-Anukul added a commit to Verma-Anukul/sonic-buildimage that referenced this pull request Mar 18, 2026
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Mar 20, 2026
What is the motivation for this PR?
When running pygnmi GET requests with xpaths where the keyname contains "-", pygnmi returns errors (xpath parse error and syntax warnings). This blocks openconfig sonic-mgmt tests.

How did you do it?
Ported the gnxi upstream patch (google/gnxi#240) to sonic-buildimage and fixed the python syntax issues in py_gnmicli.py.

How did you verify/test it?
Tested patch application, ran pygnmi with key-name containing "-", and ran sonic-mgmt gnmi tests.

Signed-off-by:
Verma-Anukul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant