google / google/gnxi

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

Open
#389 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
289
Forks
131
Avg merge
1d 28m
Merged PRs (30d)
1

Description

```
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.