Skip to content

set a leaf-list using gnmi #225

@NoaKirsh

Description

@NoaKirsh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions