Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gNMI SET RPC #4

Merged
merged 1 commit into from
Feb 7, 2019
Merged

Conversation

tanakatakafumi
Copy link
Contributor

Example

  • server
$ docker run -it --rm -v /etc/oopt:/etc/oopt -p 10164:10164 oopt go run /go/src/github.com/osrg/oopt/gnmi/sample_server/run.go
  • client
    Update frequency channel of Opt6 to 2.
$ go run $GOPATH/src/github.com/osrg/oopt/cmd/gnmi_set/gnmi_set.go -target_addr localhost:10164 -update /optical-modules/optical-module[name=Opt6]/optical-module-frequency/config/channel:2
== setRequest:
update: <
  path: <
    elem: <
      name: "optical-modules"
    >
    elem: <
      name: "optical-module"
      key: <
        key: "name"
        value: "Opt6"
      >
    >
    elem: <
      name: "optical-module-frequency"
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "channel"
    >
  >
  val: <
    int_val: 2
  >
>

== getResponse:
response: <
  path: <
    elem: <
      name: "optical-modules"
    >
    elem: <
      name: "optical-module"
      key: <
        key: "name"
        value: "Opt6"
      >
    >
    elem: <
      name: "optical-module-frequency"
    >
    elem: <
      name: "config"
    >
    elem: <
      name: "channel"
    >
  >
  op: UPDATE
>

@ishidawataru
Copy link
Member

@tanakatakafumi Please open a PR against master branch. You can squash my commit for the fix.

gnmi: use PacketTransponder as the root of the model instead of Device

Signed-off-by: Wataru Ishida <ishida@nel-america.com>
@tanakatakafumi
Copy link
Contributor Author

I changed this PR to osrg:master and squashed some commits.

@ishidawataru ishidawataru merged commit 406a9ef into osrg:master Feb 7, 2019
@ishidawataru
Copy link
Member

@tanakatakafumi Sorry for the delay. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants