Providing transformer support for sflow feature#91
Providing transformer support for sflow feature#91kwangsuk merged 9 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com> Co-authored-by: mohanapriya-meganathan <mohanapriya.m1@dell.com>
already updated in above comment (Following are the dependent pull request,) |
…mments Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com> Co-authored-by: mohanapriya-meganathan <mohanapriya.m1@dell.com>
…mments for sflow app test Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com> Co-authored-by: mohanapriya-meganathan <mohanapriya.m1@dell.com>
sachinholla
left a comment
There was a problem hiding this comment.
Test binary related changes look fine. Did not review sflow app related changes.
|
hi @kwangsuk, please do not merge this PR before sonic-net/sonic-buildimage#15226 is merged. Full image builds may fail without those buildimage makefile changes. It includes an enhancement to the main docker image makefile slave.mk, hence waiting for MSFT's approval |
|
Hi @Gokulnath-Raja , some tests are failing -- https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/build/builds/334869/logs/12 |
@sachinholla ,yes, we are looking into it. |
Enabling sflow feature for the
Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com> Co-authored-by: mohanapriya-meganathan <mohanapriya.m1@dell.com>
|
@sachinholla Sanity test fails as it depends on a SFLOW_SESSION_TABLE which will be created by sflow docker container. As the azure pipelines, runs the sanity test in an isolated sonic-mgmt-framework environment it fails. So, updated the changes in the unit test framework to support the interdependency table. Updated log: |
|
/AzurePipelines run Azure.sonic-common |
|
Commenter does not have sufficient privileges for PR 91 in repo sonic-net/sonic-mgmt-common |
|
@sachinholla please help in restarting the /AzurePipelines run Azure.sonic-common (pipeline failed due to space issue) |
|
hi @Gokulnath-Raja, I don't know the procedure to manually trigger the PR build. I used to amend the last commit without making any changes and force push :) |
bb934c9 to
25f3fcc
Compare
|
Hi Gokul, please merge latest from master branch to solve "no space left on device" error |
@sachinholla done and pushed the code, kindly merge... |
|
I don't have merge permissions.. please follow up with Kwan |
What are the changes
Transformer support has been added for the sflow app.
Files Changed:
openconfig-sampling-sflow.yang: which have the parameters that can be configured via gnmi and Rest and its deviations parameters has been added in the openconfig-sampling-sflow-deviation.yang
openconfig-sampling-sflow-annot.yang: which consists of the transformer specific functions which needs to be called based on the rest/gnmi call.
xfmr_sflow.go: go file which consists of the function definitions which needs to be called based on the subscription/get/set request and for the validations.
Unit test file changes for Rest:
sflow_sonic_test.go - To test for the parameters in the sonic-sflow.yang
sflow_openconfig_test.go – To test for the parameters in the openconfig-sampling-sflow.yang.
Unit test file changes for Gnmi:
translib/test/sflow
Why the changes are required
Currently sflow feature can be configured via click interface alone.
Transformer support has been added to support for the configuration via Rest and Gnmi
How did I verify the changes
Verified by adding sflow unit test files for restui and gnmi
Attached are the UT results and log.
gnmi_ut_for_openconfig_sflow.txt
gnmi_ut_for_sonic_sflow.txt
rest_ut_for_sflow.txt
Attached are the subscription UT log
target_defined_subscription.txt
On_change_subscription.txt
Sample_subscription.txt
Support added:
Sflow agent, collector and interface parameters can be modified via rest and gnmi.
Collector Name cannot be configured from rest_ui, it will be auto-generated with pattern using Collector-IP,Collector-Port & Collector-VRF. For e.g. 10.1.1.1_6343_default
Port , Portchannel , Mgmt port , Vlan can be configured as an Sflow Agent Interface. So, while configuring for the sflow agent prior configurations of the interface is mandatory. Vlan leafref is not available now.
Alias support for the interface names are not available to configure for the sflow agent and for the sflow interface.
We cannot configure more than 2 collectors.
We need to enable the sflow globally , which interns enable the sflow in all available interfaces and then we can disable the sflow interface individually if required. We cannot disable the sflow globally and enable the interfaces locally.