Skip to content

Commit

Permalink
Add y-cable driver for simulated mux (sonic-net#213)
Browse files Browse the repository at this point in the history
Description
This PR added y-cable driver for simulated mux. This y-cable driver conforms with the requirement of https://github.com/Azure/SONiC/pull/757/files

Motivation and Context
After the abstract y-cable base class is added for multi-vendor y-cable support, we also need a y-cable driver for simulated mux used in lab testing.

How Has This Been Tested?
Update the xcvrd package in pmon docker to include the changes in [xcvrd] initial support for integrating vendor specfic class objects for calling Y-Cable API's inside xcvrd sonic-platform-daemons#197
Update the sonic_y_cable package in pmon docker to include the changes in this PR.
Create /etc/sonic/config_db.json on DUT.
Restart the pmon docker.
Run some dualtor test scripts.
Check mux status on dualtor testbed.

Signed-off-by: Xin Wang <[email protected]>
  • Loading branch information
wangxin authored Aug 25, 2021
1 parent c17c370 commit 0dc71c1
Show file tree
Hide file tree
Showing 5 changed files with 1,268 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'sonic_y_cable',
'sonic_y_cable.credo',
'sonic_y_cable.broadcom',
'sonic_y_cable.microsoft'
],
# NOTE: Install also depends on sonic-config-engine for portconfig.py
# This dependency should be eliminated by moving portconfig.py
Expand Down
18 changes: 18 additions & 0 deletions sonic_y_cable/microsoft/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Design of y-cable driver implemented multiple vendor API for mux simulator

The mux simulator exposes a set of APIs for the client. To access the APIs, the client needs to know some key information:
1. The mux simulator server IP and port
2. The vm_set information
3. The port index

Port index is know to the y-cable driver. So, we need to pass items #1-#3 to the y-cable driver. We can update the existing [test_inject_y_cable_simulator_client](https://github.com/Azure/sonic-mgmt/blob/master/tests/test_pretest.py#L182) test case to pass server IP/port and vm_set information to the DUT during pretest.

Simply create a json file to `/etc/sonic/mux_simulator.json` with content like
```
{
"server_ip": "192.168.0.10",
"server_port": "8000",
"vm_set": "vms17-7",
"side": "upper_tor"
}
```
Empty file.
Loading

0 comments on commit 0dc71c1

Please sign in to comment.