Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xpath.ToGNMIPath() fails for a xpath string that contains square brackets in key value #389

Open
pkbehera opened this issue Oct 27, 2024 · 0 comments

Comments

@pkbehera
Copy link

x_path := '/a/b[id=foo][res=/bar/tar[name=xx]]/cfg'

gpath, err := xpath.ToGNMIPath(x_path)

// err = invalid path element b[id=foo][res=/bar/tar[name=xx]]: malformed List key-value pair string: [id=foo][res=/bar/tar[name=xx]]

Yang specification does not seem to prohibit use of [ or ] in the key-value pairs. ALSO I am able to add an element to a gnmi.Path with key-value pairs containing [ or ] or both

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

No branches or pull requests

1 participant