Skip to content

Commit 0dc71c1

Browse files
authored
Add y-cable driver for simulated mux (#213)
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]>
1 parent c17c370 commit 0dc71c1

5 files changed

Lines changed: 1268 additions & 0 deletions

File tree

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'sonic_y_cable',
2727
'sonic_y_cable.credo',
2828
'sonic_y_cable.broadcom',
29+
'sonic_y_cable.microsoft'
2930
],
3031
# NOTE: Install also depends on sonic-config-engine for portconfig.py
3132
# This dependency should be eliminated by moving portconfig.py

sonic_y_cable/microsoft/README

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Design of y-cable driver implemented multiple vendor API for mux simulator
2+
3+
The mux simulator exposes a set of APIs for the client. To access the APIs, the client needs to know some key information:
4+
1. The mux simulator server IP and port
5+
2. The vm_set information
6+
3. The port index
7+
8+
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.
9+
10+
Simply create a json file to `/etc/sonic/mux_simulator.json` with content like
11+
```
12+
{
13+
"server_ip": "192.168.0.10",
14+
"server_port": "8000",
15+
"vm_set": "vms17-7",
16+
"side": "upper_tor"
17+
}
18+
```

sonic_y_cable/microsoft/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)