Skip to content

[enumerators] unify naming convention of the parameter enumerators#2494

Merged
yxieca merged 3 commits intosonic-net:masterfrom
yxieca:enum
Nov 10, 2020
Merged

[enumerators] unify naming convention of the parameter enumerators#2494
yxieca merged 3 commits intosonic-net:masterfrom
yxieca:enum

Conversation

@yxieca
Copy link
Collaborator

@yxieca yxieca commented Nov 9, 2020

Description of PR

Summary: unify naming convention of the parameter enumerators.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Due the the ambiguity of parameter enumerators, some testcase has been written with unintended enumeration. Which causes the testcase being executed many times during nightly test.

How did you do it?

  • Prefix enumerators with enum_ when the parameter is enumerating all applicable entities.
  • Prefix enumerators with rand_ when the parameter is randomly select some applicable entities.
  • Introduce rand_one_dut_hostname to enumerate one randomly chosen dut hostname.

Signed-off-by: Ying Xie [email protected]

How did you verify/test it?

Tested against test_link_flap, test_lag_2, test_pretest, test_posttest, and test_interfaces.

Tested the new enumerator rand_one_dut_hostname with instrumented code.

All above tests passed.

- Prefix enumerators with enum_ when the parameter is enumerating all
  applicable entities.
- Prefix enumerators with rand_ when the parameter is randomly select
  some applicable entities.
- Introduce rand_one_dut_hostname to enumerate one randomly chosen
  dut hostname.

Signed-off-by: Ying Xie <[email protected]>
@yxieca
Copy link
Collaborator Author

yxieca commented Nov 9, 2020

retest vsimage please

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@yxieca yxieca merged commit 0a244b1 into sonic-net:master Nov 10, 2020
@yxieca yxieca deleted the enum branch November 10, 2020 01:21
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
utilities:
* 4b7335f 2022-11-29 | Add db_migrator_constants.py script to setup.py (sonic-net#2534) (HEAD -> 202205) [Vaibhav Hemant Dixit]
* 8a78cf4 2022-11-23 | Port 202012 DB migration changes to newer branches (sonic-net#2515) (HEAD -> 202205) [Vaibhav Hemant Dixit]
* 0157086 2022-11-22 | [VXLAN]Fixing traceback in show remotemac when mac moves during command execution (sonic-net#2506) [Sudharsan Dhamal Gopalarathnam]
* 1f26c8c 2022-11-17 | avoid printing error if no neighbors are present (sonic-net#2502) [arlakshm]
* 2573aae 2022-11-19 | [sfp] Fix issue: Application Advertisement is not well formatted (sonic-net#2491) [Junchao-Mellanox]
* 1d96b55 2022-11-10 | [show][muxcable] Catch port Value error exception (sonic-net#2076) (sonic-net#2486) [Isabella de Leon]
* 6ed2afb 2022-11-09 | bugfix[2024] vnet route check exit code fix. (sonic-net#2480) [siqbal1986]
* d8c49dc 2022-11-17 | Fixed SONIC_CLI_IFACE_MODE=alias show ip|ipv6 route output in default mode issue (sonic-net#2422) [Marty Y. Lok]
* 166739e 2022-11-11 | Accept 0 for queue and dscp (sonic-net#2494) (github/202205) [bingwang-ms]

Signed-off-by: Ying Xie <[email protected]>

Signed-off-by: Ying Xie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants