You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issue: out of range sflow polling interval is accepted and stored in config_db (sonic-net#2847)
#### What I did
Fixed issue: out of range sflow polling interval is accepted and stored in config_db.
Reproduce step:
```
1. Enable sflow feature: config feature state sflow enabled
2. Enable sflow itself: config sflow enable
3. Configure out of range polling interval: config sflow polling-interval 1. Error message is shown as expected
4. Save config: config save -y
5. Check "SFLOW" section inside config_db
```
As the interval is invalid, the expected behavior is that the interval is not saved to redis. But we see the invalid value was written to redis.
#### How I did it
Change `click.echo` to `ctx.fail`
#### How to verify it
1. Manual test
2. Add a check in existing unit test case to cover the change
0 commit comments