sonic-buildimage/src/sonic-config-engine/tests/sample_platform.json
Sangita Maity 18263c99dd
[DPB|master] Update Dynamic Port Breakout Logic for flexible alias support a… (#6831)
To fix [DPB| wrong aliases for interfaces](https://github.com/Azure/sonic-buildimage/issues/6024) issue, implimented flexible alias support [design doc](https://github.com/Azure/SONiC/pull/749)

> [[dpb|config] Fix the validation logic of breakout mode](https://github.com/Azure/sonic-utilities/pull/1440) depends on this

#### How I did it

1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 
2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode.
```
{
    "interfaces": {
        "Ethernet0": {
            "index": "1,1,1,1",
            "lanes": "0,1,2,3",
            "breakout_modes": {
                "1x100G[40G]": ["Eth1"],
                "2x50G": ["Eth1/1", "Eth1/2"],
                "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"],
                "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"],
                "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"]
            }
        }
}
```
#### How to verify it
`config interface breakout`

Signed-off-by: Sangita Maity <samaity@linkedin.com>
2021-02-26 00:13:33 -08:00

356 lines
14 KiB
JSON

{
"interfaces": {
"Ethernet0": {
"index": "1,1,1,1",
"lanes": "0,1,2,3",
"breakout_modes": {
"1x100G[40G]": ["Eth1"],
"2x50G": ["Eth1/1", "Eth1/2"],
"4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"],
"2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"],
"1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"]
}
},
"Ethernet4": {
"index": "2,2,2,2",
"lanes": "4,5,6,7",
"breakout_modes": {
"1x100G[40G]": ["Eth2"],
"2x50G": ["Eth2/1", "Eth2/2"],
"4x25G[10G]": ["Eth2/1", "Eth2/2", "Eth2/3", "Eth2/4"]
}
},
"Ethernet8": {
"index": "3,3,3,3",
"lanes": "8,9,10,11",
"breakout_modes": {
"1x100G[40G]": ["Eth3"],
"2x50G": ["Eth3/1", "Eth3/2"],
"4x25G[10G]": ["Eth3/1", "Eth3/2", "Eth3/3", "Eth3/4"],
"2x25G(2)+1x50G(2)": ["Eth3/1", "Eth3/2", "Eth3/3"],
"1x50G(2)+2x25G(2)": ["Eth3/1", "Eth3/2", "Eth3/3"]
}
},
"Ethernet12": {
"index": "4,4,4,4",
"lanes": "12,13,14,15",
"breakout_modes": {
"1x100G[40G]": ["Eth4"],
"2x50G": ["Eth4/1", "Eth4/2"],
"4x25G[10G]": ["Eth4/1", "Eth4/2", "Eth4/3", "Eth4/4"],
"2x25G(2)+1x50G(2)": ["Eth4/1", "Eth4/2", "Eth4/3"],
"1x50G(2)+2x25G(2)": ["Eth4/1", "Eth4/2", "Eth4/3"]
}
},
"Ethernet16": {
"index": "5,5,5,5",
"lanes": "16,17,18,19",
"breakout_modes": {
"1x100G[40G]": ["Eth5"],
"2x50G": ["Eth5/1", "Eth5/2"],
"4x25G[10G]": ["Eth5/1", "Eth5/2", "Eth5/3", "Eth5/4"],
"2x25G(2)+1x50G(2)": ["Eth5/1", "Eth5/2", "Eth5/3"],
"1x50G(2)+2x25G(2)": ["Eth5/1", "Eth5/2", "Eth5/3"]
}
},
"Ethernet20": {
"index": "6,6,6,6",
"lanes": "20,21,22,23",
"breakout_modes": {
"1x100G[40G]": ["Eth6"],
"2x50G": ["Eth6/1", "Eth6/2"],
"4x25G[10G]": ["Eth6/1", "Eth6/2", "Eth6/3", "Eth6/4"],
"2x25G(2)+1x50G(2)": ["Eth6/1", "Eth6/2", "Eth6/3"],
"1x50G(2)+2x25G(2)": ["Eth6/1", "Eth6/2", "Eth6/3"]
}
},
"Ethernet24": {
"index": "7,7,7,7",
"lanes": "24,25,26,27",
"breakout_modes": {
"1x100G[40G]": ["Eth7"],
"2x50G": ["Eth7/1", "Eth7/2"],
"4x25G[10G]": ["Eth7/1", "Eth7/2", "Eth7/3", "Eth7/4"],
"2x25G(2)+1x50G(2)": ["Eth7/1", "Eth7/2", "Eth7/3"],
"1x50G(2)+2x25G(2)": ["Eth7/1", "Eth7/2", "Eth7/3"]
}
},
"Ethernet28": {
"index": "8,8,8,8",
"lanes": "28,29,30,31",
"breakout_modes": {
"1x100G[40G]": ["Eth8"],
"2x50G": ["Eth8/1", "Eth8/2"],
"4x25G[10G]": ["Eth8/1", "Eth8/2", "Eth8/3", "Eth8/4"],
"2x25G(2)+1x50G(2)": ["Eth8/1", "Eth8/2", "Eth8/3"],
"1x50G(2)+2x25G(2)": ["Eth8/1", "Eth8/2", "Eth8/3"]
}
},
"Ethernet32": {
"index": "9,9,9,9",
"lanes": "32,33,34,35",
"breakout_modes": {
"1x100G[40G]": ["Eth9"],
"2x50G": ["Eth9/1", "Eth9/2"],
"4x25G[10G]": ["Eth9/1", "Eth9/2", "Eth9/3", "Eth9/4"],
"2x25G(2)+1x50G(2)": ["Eth9/1", "Eth9/2", "Eth9/3"],
"1x50G(2)+2x25G(2)": ["Eth9/1", "Eth9/2", "Eth9/3"]
}
},
"Ethernet36": {
"index": "10,10,10,10",
"lanes": "36,37,38,39",
"breakout_modes": {
"1x100G[40G]": ["Eth10"],
"2x50G": ["Eth10/1", "Eth10/2"],
"4x25G[10G]": ["Eth10/1", "Eth10/2", "Eth10/3", "Eth10/4"],
"2x25G(2)+1x50G(2)": ["Eth10/1", "Eth10/2", "Eth10/3"],
"1x50G(2)+2x25G(2)": ["Eth10/1", "Eth10/2", "Eth10/3"]
}
},
"Ethernet40": {
"index": "11,11,11,11",
"lanes": "40,41,42,43",
"breakout_modes": {
"1x100G[50G,40G,25G,10G,1G]": ["Eth11"],
"2x50G[40G,25G,10G,1G]": ["Eth11/1", "Eth11/2"],
"4x25G[10G]": ["Eth11/1", "Eth11/2", "Eth11/3", "Eth11/4"],
"2x25G(2)+1x50G(2)": ["Eth11/1", "Eth11/2", "Eth11/3"],
"1x50G(2)+2x25G(2)": ["Eth11/1", "Eth11/2", "Eth11/3"]
}
},
"Ethernet44": {
"index": "12,12,12,12",
"lanes": "44,45,46,47",
"breakout_modes": {
"1x100G[50G,40G,25G,10G,1G]": ["Eth12"],
"2x50G[40G,25G,10G,1G]": ["Eth12/1", "Eth12/2"],
"4x25G[10G]": ["Eth12/1", "Eth12/2", "Eth12/3", "Eth12/4"],
"2x25G(2)+1x50G(2)": ["Eth12/1", "Eth12/2", "Eth12/3"],
"1x50G(2)+2x25G(2)": ["Eth12/1", "Eth12/2", "Eth12/3"]
}
},
"Ethernet48": {
"index": "13,13,13,13",
"lanes": "48,49,50,51",
"breakout_modes": {
"1x100G[40G]": ["Eth13"],
"2x50G": ["Eth13/1", "Eth13/2"],
"4x25G[10G]": ["Eth13/1", "Eth13/2", "Eth13/3", "Eth13/4"],
"2x25G(2)+1x50G(2)": ["Eth13/1", "Eth13/2", "Eth13/3"],
"1x50G(2)+2x25G(2)": ["Eth13/1", "Eth13/2", "Eth13/3"]
}
},
"Ethernet52": {
"index": "14,14,14,14",
"lanes": "52,53,54,55",
"breakout_modes": {
"1x100G[40G]": ["Eth14"],
"2x50G": ["Eth14/1", "Eth14/2"],
"4x25G[10G]": ["Eth14/1", "Eth14/2", "Eth14/3", "Eth14/4"],
"2x25G(2)+1x50G(2)": ["Eth14/1", "Eth14/2", "Eth14/3"],
"1x50G(2)+2x25G(2)": ["Eth14/1", "Eth14/2", "Eth14/3"]
}
},
"Ethernet56": {
"index": "15,15,15,15",
"lanes": "56,57,58,59",
"breakout_modes": {
"1x100G[40G]": ["Eth15"],
"2x50G": ["Eth15/1", "Eth15/2"],
"4x25G[10G]": ["Eth15/1", "Eth15/2", "Eth15/3", "Eth15/4"],
"2x25G(2)+1x50G(2)": ["Eth15/1", "Eth15/2", "Eth15/3"],
"1x50G(2)+2x25G(2)": ["Eth15/1", "Eth15/2", "Eth15/3"]
}
},
"Ethernet60": {
"index": "16,16,16,16",
"lanes": "60,61,62,63",
"breakout_modes": {
"1x100G[40G]": ["Eth16"],
"2x50G": ["Eth16/1", "Eth16/2"],
"4x25G[10G]": ["Eth16/1", "Eth16/2", "Eth16/3", "Eth16/4"],
"2x25G(2)+1x50G(2)": ["Eth16/1", "Eth16/2", "Eth16/3"],
"1x50G(2)+2x25G(2)": ["Eth16/1", "Eth16/2", "Eth16/3"]
}
},
"Ethernet64": {
"index": "17,17,17,17",
"lanes": "64,65,66,67",
"breakout_modes": {
"1x100G[40G]": ["Eth17"],
"2x50G": ["Eth17/1", "Eth17/2"],
"4x25G[10G]": ["Eth17/1", "Eth17/2", "Eth17/3", "Eth17/4"],
"2x25G(2)+1x50G(2)": ["Eth17/1", "Eth17/2", "Eth17/3"],
"1x50G(2)+2x25G(2)": ["Eth17/1", "Eth17/2", "Eth17/3"]
}
},
"Ethernet68": {
"index": "18,18,18,18",
"lanes": "68,69,70,71",
"breakout_modes": {
"1x100G[40G]": ["Eth18"],
"2x50G": ["Eth18/1", "Eth18/2"],
"4x25G[10G]": ["Eth18/1", "Eth18/2", "Eth18/3", "Eth18/4"],
"2x25G(2)+1x50G(2)": ["Eth18/1", "Eth18/2", "Eth18/3"],
"1x50G(2)+2x25G(2)": ["Eth18/1", "Eth18/2", "Eth18/3"]
}
},
"Ethernet72": {
"index": "19,19,19,19",
"lanes": "72,73,74,75",
"breakout_modes": {
"1x100G[40G]": ["Eth19"],
"2x50G": ["Eth19/1", "Eth19/2"],
"4x25G[10G]": ["Eth19/1", "Eth19/2", "Eth19/3", "Eth19/4"],
"2x25G(2)+1x50G(2)": ["Eth19/1", "Eth19/2", "Eth19/3"],
"1x50G(2)+2x25G(2)": ["Eth19/1", "Eth19/2", "Eth19/3"]
}
},
"Ethernet76": {
"index": "20,20,20,20",
"lanes": "76,77,78,79",
"breakout_modes": {
"1x100G[40G]": ["Eth20"],
"2x50G": ["Eth20/1", "Eth20/2"],
"4x25G[10G]": ["Eth20/1", "Eth20/2", "Eth20/3", "Eth20/4"],
"2x25G(2)+1x50G(2)": ["Eth20/1", "Eth20/2", "Eth20/3"],
"1x50G(2)+2x25G(2)": ["Eth20/1", "Eth20/2", "Eth20/3"]
}
},
"Ethernet80": {
"index": "21,21,21,21",
"lanes": "80,81,82,83",
"breakout_modes": {
"1x100G[40G]": ["Eth21"],
"2x50G": ["Eth21/1", "Eth21/2"],
"4x25G[10G]": ["Eth21/1", "Eth21/2", "Eth21/3", "Eth21/4"],
"2x25G(2)+1x50G(2)": ["Eth21/1", "Eth21/2", "Eth21/3"],
"1x50G(2)+2x25G(2)": ["Eth21/1", "Eth21/2", "Eth21/3"]
}
},
"Ethernet84": {
"index": "22,22,22,22",
"lanes": "84,85,86,87",
"breakout_modes": {
"1x100G[40G]": ["Eth22"],
"2x50G": ["Eth22/1", "Eth22/2"],
"4x25G[10G]": ["Eth22/1", "Eth22/2", "Eth22/3", "Eth22/4"],
"2x25G(2)+1x50G(2)": ["Eth22/1", "Eth22/2", "Eth22/3"],
"1x50G(2)+2x25G(2)": ["Eth22/1", "Eth22/2", "Eth22/3"]
}
},
"Ethernet88": {
"index": "23,23,23,23",
"lanes": "88,89,90,91",
"alias_at_lanes": "Eth23/1, Eth23/2, Eth23/3, Eth23/4",
"breakout_modes": {
"1x100G[40G]": ["Eth23"],
"2x50G": ["Eth23/1", "Eth23/2"],
"4x25G[10G]": ["Eth23/1", "Eth23/2", "Eth23/3", "Eth23/4"],
"2x25G(2)+1x50G(2)": ["Eth23/1", "Eth23/2", "Eth23/3"],
"1x50G(2)+2x25G(2)": ["Eth23/1", "Eth23/2", "Eth23/3"]
}
},
"Ethernet92": {
"index": "24,24,24,24",
"lanes": "92,93,94,95",
"breakout_modes": {
"1x100G[40G]": ["Eth24"],
"2x50G": ["Eth24/1", "Eth24/2"],
"4x25G[10G]": ["Eth24/1", "Eth24/2", "Eth24/3", "Eth24/4"],
"2x25G(2)+1x50G(2)": ["Eth24/1", "Eth24/2", "Eth24/3"],
"1x50G(2)+2x25G(2)": ["Eth24/1", "Eth24/2", "Eth24/3"]
}
},
"Ethernet96": {
"index": "25,25,25,25",
"lanes": "96,97,98,99",
"breakout_modes": {
"1x100G[40G]": ["Eth25"],
"2x50G": ["Eth25/1", "Eth25/2"],
"4x25G[10G]": ["Eth25/1", "Eth25/2", "Eth25/3", "Eth25/4"],
"2x25G(2)+1x50G(2)": ["Eth25/1", "Eth25/2", "Eth25/3"],
"1x50G(2)+2x25G(2)": ["Eth25/1", "Eth25/2", "Eth25/3"]
}
},
"Ethernet100": {
"index": "26,26,26,26",
"lanes": "100,101,102,103",
"breakout_modes": {
"1x100G[40G]": ["Eth26"],
"2x50G": ["Eth26/1", "Eth26/2"],
"4x25G[10G]": ["Eth26/1", "Eth26/2", "Eth26/3", "Eth26/4"],
"2x25G(2)+1x50G(2)": ["Eth26/1", "Eth26/2", "Eth26/3"],
"1x50G(2)+2x25G(2)": ["Eth26/1", "Eth26/2", "Eth26/3"]
}
},
"Ethernet104": {
"index": "27,27,27,27",
"lanes": "104,105,106,107",
"breakout_modes": {
"1x100G[40G]": ["Eth27"],
"2x50G": ["Eth27/1", "Eth27/2"],
"4x25G[10G]": ["Eth27/1", "Eth27/2", "Eth27/3", "Eth27/4"],
"2x25G(2)+1x50G(2)": ["Eth27/1", "Eth27/2", "Eth27/3"],
"1x50G(2)+2x25G(2)": ["Eth27/1", "Eth27/2", "Eth27/3"]
}
},
"Ethernet108": {
"index": "28,28,28,28",
"lanes": "108,109,110,111",
"breakout_modes": {
"1x100G[40G]": ["Eth28"],
"2x50G": ["Eth28/1", "Eth28/2"],
"4x25G[10G]": ["Eth28/1", "Eth28/2", "Eth28/3", "Eth28/4"],
"2x25G(2)+1x50G(2)": ["Eth28/1", "Eth28/2", "Eth28/3"],
"1x50G(2)+2x25G(2)": ["Eth28/1", "Eth28/2", "Eth28/3"]
}
},
"Ethernet112": {
"index": "29,29,29,29",
"lanes": "112,113,114,115",
"breakout_modes": {
"1x100G[40G]": ["Eth29"],
"2x50G": ["Eth29/1", "Eth29/2"],
"4x25G[10G]": ["Eth29/1", "Eth29/2", "Eth29/3", "Eth29/4"],
"2x25G(2)+1x50G(2)": ["Eth29/1", "Eth29/2", "Eth29/3"],
"1x50G(2)+2x25G(2)": ["Eth29/1", "Eth29/2", "Eth29/3"]
}
},
"Ethernet116": {
"index": "30,30,30,30",
"lanes": "116,117,118,119",
"breakout_modes": {
"1x100G[40G]": ["Eth30"],
"2x50G": ["Eth30/1", "Eth30/2"],
"4x25G[10G]": ["Eth30/1", "Eth30/2", "Eth30/3", "Eth30/4"],
"2x25G(2)+1x50G(2)": ["Eth30/1", "Eth30/2", "Eth30/3"],
"1x50G(2)+2x25G(2)": ["Eth30/1", "Eth30/2", "Eth30/3"]
}
},
"Ethernet120": {
"index": "31,31,31,31",
"lanes": "120,121,122,123",
"breakout_modes": {
"1x100G[40G]": ["Eth31"],
"2x50G": ["Eth31/1", "Eth31/2"],
"4x25G[10G]": ["Eth31/1", "Eth31/2", "Eth31/3", "Eth31/4"],
"2x25G(2)+1x50G(2)": ["Eth31/1", "Eth31/2", "Eth31/3"],
"1x50G(2)+2x25G(2)": ["Eth31/1", "Eth31/2", "Eth31/3"]
}
},
"Ethernet124": {
"index": "32,32,32,32",
"lanes": "124,125,126,127",
"breakout_modes": {
"1x100G[40G]": ["Eth32"],
"2x50G": ["Eth32/1", "Eth32/2"],
"4x25G[10G]": ["Eth32/1", "Eth32/2", "Eth32/3", "Eth32/4"],
"2x25G(2)+1x50G(2)": ["Eth32/1", "Eth32/2", "Eth32/3"],
"1x50G(2)+2x25G(2)": ["Eth32/1", "Eth32/2", "Eth32/3"]
}
}
}
}