gnxi icon indicating copy to clipboard operation
gnxi copied to clipboard

How to set Path prefix Elements in gnmi_get

Open openquer opened this issue 6 years ago • 2 comments

I would like to give the prefix path and set the Elem field in below structure using gnmi_get. p prefix *github.com/openconfig/gnmi/proto/gnmi.Path { Element: []string len: 0, cap: 0, nil, Origin: "", Elem: []*github.com/openconfig/gnmi/proto/gnmi.PathElem len: 0, cap: 0, nil, Target: "CONFIG_DB", XXX_NoUnkeyedLiteral: struct {} {}, XXX_unrecognized: []uint8 len: 0, cap: 0, nil, XXX_sizecache: 0,}

openquer avatar May 31 '19 09:05 openquer

I am not sure if I understand your question. You are talking about gnmi_get, or gnmi_set?

larryleguo avatar Jun 11 '19 06:06 larryleguo

I may have the same question, for either gnmi_get or gnmi_set

Take the following request:

== getRequest:
path: <
  elem: <
    name: "interfaces"
  >

I would like to add "prefix" to the request like this:

prefix: <
    origin: "openconfig-interfaces"
>
path: <
  elem: <
    name: "interfaces"
  >

jacossio avatar Mar 08 '22 09:03 jacossio