-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dualtor][minigraph.py] Add
soc_ipv4
and cable_type
to MUX_CABLE
(
#10776) Why I did it To further add cable_type and soc_ipv4 field to table MUX_CABLE, this PR tries to parse the minigraph like the following: ``` <Device i:type="SmartCable"> <ElementType>SmartCable</ElementType> <SubType>active-active</SubType> <Address xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>192.168.0.3/21</d5p1:IPPrefix> </Address> <AddressV6 xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>::/0</d5p1:IPPrefix> </AddressV6> <ManagementAddress xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>0.0.0.0/0</d5p1:IPPrefix> </ManagementAddress> <ManagementAddressV6 xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>::/0</d5p1:IPPrefix> </ManagementAddressV6> <SerialNumber i:nil="true" /> <Hostname>svcstr-7050-acs-1-Servers0-SC</Hostname> </Device> <Device i:type="Server"> <ElementType>Server</ElementType> <Address xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>192.168.0.2/21</d5p1:IPPrefix> </Address> <AddressV6 xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>fc02:1000::2/64</d5p1:IPPrefix> </AddressV6> <ManagementAddress xmlns:d5p1="Microsoft.Search.Autopilot.NetMux"> <d5p1:IPPrefix>0.0.0.0/0</d5p1:IPPrefix> </ManagementAddress> <Hostname>Servers0</Hostname> </Device> ``` Signed-off-by: Longxiang Lyu lolv@microsoft.com How I did it get_mux_cable_entries will try to get the mux cable device from the devices list and get the cable type and soc ip address from the device definition. How to verify it Pass the unit-test
- Loading branch information
Showing
3 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters