Commit 647b47b
authored
[Port Mirror][CLI] Align ERSPAN sample_rate range with YANG model (#381)
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
CODE_OF_CONDUCT.md LICENSE README.md SECURITY.md SUPPORT.md azure-pipelines failure_prs.log scripts skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->
#### What I did
Aligned the ERSPAN mirror session `sample_rate` validation range with the YANG model ([sonic-buildimage #26756](sonic-net/sonic-buildimage#26756)), which defines it as uint32 `2..max`.
#### How I did it
- `config/main.py`: changed from `SAMPLE_RATE_MIN` 256 to 2, changed `SAMPLE_RATE_MAX` 8388608 to `0xFFFFFFFF` (uint32 max).
- `tests/config_mirror_session_test.py`: updated assertions and reworked the boundary test.
- `doc/Command-Reference.md`: updated the valid range.
#### How to verify it
pytest tests/config_mirror_session_test.py
Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
#### Previous command output (if the output of a command-line utility has changed)
#### New command output (if the output of a command-line utility has changed)1 parent 8058eec commit 647b47b
3 files changed
Lines changed: 24 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
3216 | 3217 | | |
3217 | 3218 | | |
3218 | 3219 | | |
3219 | | - | |
| 3220 | + | |
3220 | 3221 | | |
3221 | 3222 | | |
3222 | 3223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9327 | 9327 | | |
9328 | 9328 | | |
9329 | 9329 | | |
9330 | | - | |
9331 | | - | |
| 9330 | + | |
| 9331 | + | |
9332 | 9332 | | |
9333 | 9333 | | |
9334 | 9334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
834 | 834 | | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
842 | 842 | | |
843 | | - | |
| 843 | + | |
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
848 | | - | |
| 848 | + | |
849 | 849 | | |
850 | 850 | | |
851 | | - | |
| 851 | + | |
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
| 856 | + | |
857 | 857 | | |
858 | 858 | | |
859 | | - | |
| 859 | + | |
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
| 863 | + | |
864 | 864 | | |
865 | | - | |
| 865 | + | |
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
| |||
0 commit comments