Skip to content

[dualtor]: Add utilities for dual ToR mocking#2945

Merged
yxieca merged 4 commits intosonic-net:masterfrom
theasianpianist:dual-tor-mock
Feb 16, 2021
Merged

[dualtor]: Add utilities for dual ToR mocking#2945
yxieca merged 4 commits intosonic-net:masterfrom
theasianpianist:dual-tor-mock

Conversation

@theasianpianist
Copy link
Contributor

@theasianpianist theasianpianist commented Feb 6, 2021

  • Apply config DB tables to mock dual ToR setup
  • Apply kernel configurations (neighbor entries and route)
  • Apply orchagent config to mock dual ToR setup

Signed-off-by: Lawrence Lee lawlee@microsoft.com

Description of PR

Summary:
Closes #2808

Type of change

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

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

* Apply config DB tables to mock dual ToR setup
* Apply kernel configurations (neighbor entries and route)
* Apply orchagent config to mock dual ToR setup

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@theasianpianist theasianpianist requested review from a team and prsunny February 6, 2021 02:20
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
'''

dut = duthosts[rand_one_dut_hostname]
lo_facts = dut.get_running_config_facts()['LOOPBACK_INTERFACE']
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, is this picking up Loopback0 ip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just whichever is listed first. If the config came from a minigraph generated by sonic-mgmt, it will always be Loopback0. Also, the single ToR config only has a single Loopback interface regardless.

* Use `ip * replace` instead of `add` and `delete`
* Make variable names better

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 11, 2021

This pull request introduces 1 alert when merging 08c44be into ad98413 - view on LGTM.com

new alerts:

  • 1 for Unused import

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@yxieca yxieca merged commit bf26ec9 into sonic-net:master Feb 16, 2021
@theasianpianist theasianpianist deleted the dual-tor-mock branch May 13, 2021 22:52
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (sonic-net#17329)

#### Why I did it
src/sonic-swss
```
* fbab6b75 - (HEAD -> 202205, origin/202205) [Chassis][202205][orchagent] : Support WRED profiles on system ports (sonic-net#2945) (9 hours ago) [vmittal-msft]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

Dual ToR Mock Utility

3 participants