-
Notifications
You must be signed in to change notification settings - Fork 52
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
Initial commit for sonic-gnmi. #3
Conversation
Signed-off-by: Gang Lv ganglv@microsoft.com
@@ -52,7 +52,16 @@ | |||
pbPath, err := xpath.ToGNMIPath(pathValuePair[0]) | |||
if err != nil { | |||
log.Exitf("error in parsing xpath %q to gnmi path", pathValuePair[0]) | |||
@@ -144,8 +166,10 @@ | |||
} | |||
var pbVal *pb.TypedValue |
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.
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.
This patch introduced jwt token, and also modified path schema.
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.
Do we use #
in path?
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.
Do we use
#
in path?
For example, update path is /a/b/c:xyz, and then /a/b/c is path, and xyz is path value.
If the first char of path value is '@', value is a file name.
If the first char is '#', value is nil.
It's possible to use special character in path, but I don't think we use '#' as the first char in path.
common_utils/shareMem.go
Outdated
var ( | ||
memKey = 7749 | ||
memSize = 1024 | ||
memMode = 01600 |
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.
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.
updated
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.
You did not mention "memMode" in above comment.
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.
I have updated the comment for memMode.
) | ||
|
||
var ( | ||
memKey = 7749 |
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.
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.
updated
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.
Is it a shared credential between server and gnmi_dump?
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.
Yes
|
||
package common_utils | ||
|
||
const GNMI_WORK_PATH = "/etc/sonic/gnmi" |
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.
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.
Both host and gNMI container can access /etc/sonic. So gNMI server can create a patch file in this path, and notify host to run “config apply-patch" with this patch file.
Do you think we should create a working path under /var/run, and share this path between host and gNMI container?
@qiluo-msft would you please review and approve this PR? |
Signed-off-by: Gang Lv ganglv@microsoft.com
Why I did it
This is the initial commit for sonic-gnmi.
HLD is under review, sonic-net/SONiC#996
How I did it
Modify sonic-telemetry to support incremental configuration and full configuration.
How to verify it
Run unit test for sonic-gnmi
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)