reference icon indicating copy to clipboard operation
reference copied to clipboard

set a leaf-list using gnmi

Open NoaKirsh opened this issue 7 months ago • 0 comments

Hi, Let's say I have the following leaf-list, which represents a list of 8 elements, each has a value in the range 0 .. 7:

    leaf-list my_leaf {
      min-elements 8;
      max-elements 8;
      type uint8 {
        range 0..7;
      }
    }

How can I use the gnmi set command to set this list? e.g. set to [3,0,5,1,2,6,7,4]. I tried the following options, but none of them worked:

set --update "interfaces/interface[name=p0]/config/my_leaf:::json:::[3,0,5,1,2,6,7,4]" set --update-path "/" --update-file my_leaf.json

Thanks

NoaKirsh avatar Jun 04 '25 07:06 NoaKirsh