Skip to content

Conversation

@earies
Copy link
Contributor

@earies earies commented Jul 20, 2025

https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md#35151-once-subscriptions

Current behavior was suppressing sync_response output for ONCE mode
subscriptions due to lack of switch/case fallthrough.

Collapsed switch/case to provide same behavior on logging as STREAM

@earies
Copy link
Contributor Author

earies commented Jul 20, 2025

Example output:

$ ./gnmic -a r1:9339 -u user -p pass! --insecure subscribe -e proto --format prototext --mode once --stream-mode sample --path /system/state/hostname
update: {
  timestamp: 1753007645075333719
  update: {
    path: {
      elem: {
        name: "system"
      }
      elem: {
        name: "state"
      }
      elem: {
        name: "hostname"
      }
    }
    val: {
      string_val: "r1"
    }
  }
}

sync_response: true

@earies
Copy link
Contributor Author

earies commented Jul 31, 2025

@karimra bump for review/comment

@karimra
Copy link
Collaborator

karimra commented Aug 18, 2025

Thanks for the contribution and sorry for the delay

@karimra karimra merged commit 3ab12cf into openconfig:main Aug 18, 2025
2 checks passed
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