Better modularization for gnoi_client.go #338
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
The gnoi/gnmi code in sonic-gnmi have some diamond dependency problems since different code can dependent on different version of gnoi/gnmi, leading to inability to implement newer services such as
containerz
, which comes after gnoi v0.4.0. Golang with itsgo mod vendor
offers a way to solve this problem. But the code needs to be properly modularized to take advantage of this.How I did it
Untangle gnoi_client.go into separate modules such as
config
,util
,system
,file
andsonic
.How to verify it
built and unit tested, also verified by copying the new gnoi_client binary to a VS and run sonic-mgmt gnoi_kill_process test.
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)