-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update GNMI design #2
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,20 @@ This repository hosts the DASH API definition for the SONiC project. The schema | |
|
||
## GNMI | ||
|
||
TODO | ||
``` | ||
update { | ||
path { | ||
origin: "sonic_db" | ||
elem {name: "DPU0"} elem {name: "APPL_DB"} elem {name: "DASH_ACL_RULE_TABLE"} elem {name: "group1:3"} | ||
} | ||
val { | ||
proto_bytes: “\n\x010\x12$b6d54023-5d24-47de-ae94-8afe693dd1fc…” | ||
} | ||
} | ||
``` | ||
1. GNMI path will have 4 elements, please refer to the above example | ||
2. The first element is device name, and it should be one of the following values: `localhost`, `DPU0`, `DPU1`, ..., `DPUx` | ||
3. The second element is SONiC database name, and it should be `APPL_DB` for DASH API | ||
4. The third element is table name, please refer to [DASH APP DB](https://github.com/sonic-net/DASH/blob/main/documentation/general/dash-sonic-hld.md#32-dash-app-db) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to be self-contained, the table name should be refered in this repo. do not refer to dash doc. |
||
5. The fourth element is table key. For example, in the `DASH_ACL_RULE_TABLE`, the table key consists of two fields: `group_id` and `rule_num`. These fields are separated by a colon `:` in the APPL_DB. Therefore, the fourth element would be `group1:3` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i thought the fourth element should be part ofthe protobuf definition. it should not be part of the path. @qiluo-msft There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GNMI delete operation only has path, and it does not have value. So, there's no protobuf in GNMI delete operation. https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi.proto#L337 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i thought protobuf has the key already defined. then you need to state how would people know how to form a key for a specific table. https://github.com/sonic-net/sonic-dash-api/blob/master/proto/eni.proto#L38 |
||
6. GNMI value is the bytes array of protobuf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If DPU0 is not specified, can it be defaulted to 'localhost'?