Skip to content
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

[show_sflow_test.py]: Fix show sflow display and Sflow Tests. #1054

Merged
merged 3 commits into from
Aug 15, 2020

Conversation

praveen-li
Copy link

Changes:
-- Display ipv4 address with left adjust of 25 width and with space before UDP.
-- IPv6 address will be displayed as is.
-- Add test data to appl_db.json and config_db.json
-- add test file show_sflow_test.py

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com

- What I did
Changes:
-- Display ipv4 address with left adjust of 25 width and with space before UDP.
-- IPv6 address will be displayed as is.
-- Add test data to appl_db.json and config_db.json
-- add test file show_sflow_test.py

- How I did it
Display ipv4 address with left adjust of 25 width and with space before UDP.

- How to verify it
-- Add test data to appl_db.json and config_db.json
-- add test file show_sflow_test.py

Built with above test:

pchaudha@server05:/home/pchaudha/srcCode/azure_myforks/sonic-buildimage$ date
Fri Aug 14 14:01:58 PDT 2020
pchaudha@server05:/home/pchaudha/srcCode/azure_myforks/sonic-buildimage$ ls -l target/python-debs/python-sonic-utilities_1.2-1_all.deb
-rw-r--r-- 1 pchaudha pchaudha 168448 Aug 14 14:01 target/python-debs/python-sonic-utilities_1.2-1_all.deb

- Previous command output (if the output of a command-line utility has changed)
Before Fix:

show sflow
 
sFlow Global Information:
  sFlow Admin State:          up
  sFlow Polling Interval:     0
  sFlow AgentID:              eth0
 
  2 Collectors configured:
    Name: prod                IP addr: 10.252.194.107UDP port: 6343
    Name: ser5                IP addr: 172.21.47.15UDP port: 6343

- New command output (if the output of a command-line utility has changed)
After Fix:

admin@lnos-x1-a-asw04:~$ show sflow

sFlow Global Information:
  sFlow Admin State:          up
  sFlow Polling Interval:     0
  sFlow AgentID:              eth0

  2 Collectors configured:
    Name: prod                IP addr: 10.252.194.107  UDP port: 6343
    Name: ser5                IP addr: 172.21.47.15    UDP port: 6343


admin@lnos-x1-a-asw04:~$ show sflow

sFlow Global Information:
  sFlow Admin State:          up
  sFlow Polling Interval:     0
  sFlow AgentID:              eth0

  2 Collectors configured:
    Name: prod                IP addr: fe80::6e41:6aff:fe1e:cd8e UDP port: 6343
    Name: ser5                IP addr: 172.21.47.15    UDP port: 6343

Changes:
-- Display ipv4 address with left adjust of 25 width and with space before UDP.
-- IPv6 address will be displayed as is.
-- Add test data to appl_db.json and config_db.json
-- add test file show_sflow_test.py

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
tests/show_sflow_test.py Outdated Show resolved Hide resolved
tests/show_sflow_test.py Outdated Show resolved Hide resolved
tests/show_sflow_test.py Outdated Show resolved Hide resolved
tests/show_sflow_test.py Outdated Show resolved Hide resolved
tests/show_sflow_test.py Outdated Show resolved Hide resolved
tests/show_sflow_test.py Outdated Show resolved Hide resolved
Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
tests/sflow_test.py Outdated Show resolved Hide resolved
Changes
-- use pass_db decorator for sflow_interface.
-- since sflow needs ctx, create use Db() in function.
-- change the test code accordingly.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
@praveen-li
Copy link
Author

retest this please

@lguohan lguohan merged commit 3297b7a into sonic-net:master Aug 15, 2020
@praveen-li praveen-li changed the title [show_sflow_test.py]: Fix show sflow display. [show_sflow_test.py]: Fix show sflow display and Sflow Tests. Aug 17, 2020
@praveen-li praveen-li deleted the fix_show_sflow_azure branch August 31, 2020 18:57
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