gnmic icon indicating copy to clipboard operation
gnmic copied to clipboard

`gnmic path --with-prefix` should use the module name as a prefix

Open hellt opened this issue 11 months ago • 0 comments

The --with-prefix argument of the gnmic path command outputs paths with yang prefixes, literally.

Yet, what it needs to use as a prefix is the module name, and not the module prefix, as the latter has local significance.

For example, a path generated for SR Linux with --with-prefix:

 	
/srl_nokia-if:interface[name=*]/traffic-rate

shows the usage of the srl_nokia-if as a prefix, while it should've used the module name instead, like:

 	
/srl_nokia-interfaces:interface[name=*]/traffic-rate

I think that keeping the --with-prefix flag name is OK, and we can change the value only.

hellt avatar Apr 05 '25 18:04 hellt