Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPB]Removing default admin status initialization in DPB flow while loading minigraph #8711

Merged
merged 3 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
"Ethernet0_2x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
"admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
Expand All @@ -18,21 +16,18 @@
"Ethernet12_1x50G_2x25G": {
"Ethernet12": {
"alias": "fortyGigE0/12",
"admin_status": "up",
"lanes": "37,38",
"speed": "50000",
"index": "3"
},
"Ethernet14": {
"alias": "fortyGigE0/14",
"admin_status": "up",
"lanes": "39",
"speed": "25000",
"index": "3"
},
"Ethernet15": {
"alias": "fortyGigE0/15",
"admin_status": "up",
"lanes": "40",
"speed": "25000",
"index": "3"
Expand All @@ -41,14 +36,12 @@
"Ethernet0_2x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
"admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
Expand All @@ -57,7 +50,6 @@
"Ethernet0_1x100G": {
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25,26,27,28",
"speed": "100000",
"index": "0"
Expand All @@ -66,28 +58,24 @@
"Ethernet0_4x25G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
"admin_status": "up",
"lanes": "27",
"speed": "25000",
"index": "0"
},
"Ethernet3": {
"alias": "fortyGigE0/3",
"admin_status": "up",
"lanes": "28",
"speed": "25000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25",
"speed": "25000",
"index": "0"
},
"Ethernet1": {
"alias": "fortyGigE0/1",
"admin_status": "up",
"lanes": "26",
"speed": "25000",
"index": "0"
Expand All @@ -96,21 +84,18 @@
"Ethernet0_2x25G_1x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
"admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25",
"speed": "25000",
"index": "0"
},
"Ethernet1": {
"alias": "fortyGigE0/1",
"admin_status": "up",
"lanes": "26",
"speed": "25000",
"index": "0"
Expand All @@ -119,21 +104,18 @@
"Ethernet0_1x50G_2x25G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
"admin_status": "up",
"lanes": "27",
"speed": "25000",
"index": "0"
},
"Ethernet3": {
"alias": "fortyGigE0/3",
"admin_status": "up",
"lanes": "28",
"speed": "25000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
"admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
Expand All @@ -142,28 +124,24 @@
"Ethernet4_4x25G": {
"Ethernet6": {
"alias": "fortyGigE0/6",
"admin_status": "up",
"lanes": "31",
"speed": "25000",
"index": "1"
},
"Ethernet7": {
"alias": "fortyGigE0/7",
"admin_status": "up",
"lanes": "32",
"speed": "25000",
"index": "1"
},
"Ethernet4": {
"alias": "fortyGigE0/4",
"admin_status": "up",
"lanes": "29",
"speed": "25000",
"index": "1"
},
"Ethernet5": {
"alias": "fortyGigE0/5",
"admin_status": "up",
"lanes": "30",
"speed": "25000",
"index": "1"
Expand All @@ -172,14 +150,12 @@
"Ethernet4_2x50G": {
"Ethernet6": {
"alias": "fortyGigE0/6",
"admin_status": "up",
"lanes": "31,32",
"speed": "50000",
"index": "1"
},
"Ethernet4": {
"alias": "fortyGigE0/4",
"admin_status": "up",
"lanes": "29,30",
"speed": "50000",
"index": "1"
Expand All @@ -188,14 +164,12 @@
"Ethernet8_2x50G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
"admin_status": "up",
"lanes": "33,34",
"speed": "50000",
"index": "2"
},
"Ethernet10": {
"alias": "fortyGigE0/10",
"admin_status": "up",
"lanes": "35,36",
"speed": "50000",
"index": "2"
Expand All @@ -204,14 +178,12 @@
"Ethernet8_1x50G_2x25G": {
"Ethernet10": {
"alias": "fortyGigE0/10",
"admin_status": "up",
"lanes": "35",
"speed": "25000",
"index": "2"
},
"Ethernet11": {
"alias": "fortyGigE0/11",
"admin_status": "up",
"lanes": "36",
"speed": "25000",
"index": "2"
Expand All @@ -220,21 +192,18 @@
"Ethernet8_2x25G_1x50G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
"admin_status": "up",
"lanes": "33",
"speed": "25000",
"index": "2"
},
"Ethernet9": {
"alias": "fortyGigE0/9",
"admin_status": "up",
"lanes": "34",
"speed": "25000",
"index": "2"
},
"Ethernet10": {
"alias": "fortyGigE0/10",
"admin_status": "up",
"lanes": "35,36",
"speed": "50000",
"index": "2"
Expand All @@ -243,7 +212,6 @@
"Ethernet8_1x100G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
"admin_status": "up",
"lanes": "33,34,35,36",
"speed": "100000",
"index": "2"
Expand Down
1 change: 0 additions & 1 deletion src/sonic-config-engine/portconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ def gen_port_config(ports, parent_intf_id, index, alias_list, lanes, k, offset)
raise Exception('Regex return for speed is None...')

ports[intf_name]['index'] = index.split(",")[alias_position]
ports[intf_name]['admin_status'] = "up"

parent_intf_id += step
alias_position += 1
Expand Down
118 changes: 118 additions & 0 deletions src/sonic-config-engine/tests/platform-sample-graph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CpgDec/>
<DpgDec>
<DeviceDataPlaneInfo>
<IPSecTunnels/>
<LoopbackIPInterfaces/>
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
<ManagementVIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
<MplsInterfaces/>
<MplsTeInterfaces/>
<RsvpInterfaces/>
<Hostname>switch-t0</Hostname>
<PortChannelInterfaces>
<PortChannel>
<Name>PortChannel01</Name>
<AttachTo>Ethernet20</AttachTo>
<SubInterface/>
</PortChannel>
<PortChannel>
<Name>PortChannel1001</Name>
<AttachTo>Ethernet4;Ethernet6</AttachTo>
<SubInterface/>
</PortChannel>
</PortChannelInterfaces>
<VlanInterfaces/>
<IPInterfaces/>
<DataAcls/>
<AclInterfaces/>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</DeviceDataPlaneInfo>
</DpgDec>
<PngDec>
<DeviceInterfaceLinks>
<DeviceLinkBase i:type="DeviceInterfaceLink">
<ElementType>DeviceInterfaceLink</ElementType>
<Bandwidth>100000</Bandwidth>
<EndDevice>ARISTA01T1</EndDevice>
<EndPort>et1</EndPort>
<FlowControl>true</FlowControl>
<StartDevice>switch-t0</StartDevice>
<StartPort>Ethernet0</StartPort>
<Validate>true</Validate>
</DeviceLinkBase>
</DeviceInterfaceLinks>
<Devices>
<Device i:type="ToRRouter">
<Hostname>switch-t0</Hostname>
<HwSku>Force10-S6000</HwSku>
<ClusterName>AAA00PrdStr00</ClusterName>
</Device>
<Device i:type="LeafRouter">
<Hostname>ARISTA01T1</Hostname>
<HwSku>Arista</HwSku>
</Device>
</Devices>
</PngDec>
<DeviceInfos>
<DeviceInfo>
<EthernetInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:EthernetInterface>
<ElementType>DeviceInterface</ElementType>
<AlternateSpeeds i:nil="true"/>
<EnableFlowControl>true</EnableFlowControl>
<Index>1</Index>
<InterfaceName>Ethernet0</InterfaceName>
<InterfaceType i:nil="true"/>
<MultiPortsInterface>false</MultiPortsInterface>
<PortName>0</PortName>
<Priority>0</Priority>
<Speed>100000</Speed>
</a:EthernetInterface>
<a:EthernetInterface>
<ElementType>DeviceInterface</ElementType>
<AlternateSpeeds i:nil="true"/>
<EnableFlowControl>true</EnableFlowControl>
<Index>1</Index>
<InterfaceName>Ethernet4</InterfaceName>
<InterfaceType i:nil="true"/>
<MultiPortsInterface>false</MultiPortsInterface>
<PortName>0</PortName>
<Priority>0</Priority>
<Speed>50000</Speed>
</a:EthernetInterface>
<a:EthernetInterface>
<ElementType>DeviceInterface</ElementType>
<AlternateSpeeds i:nil="true"/>
<EnableFlowControl>true</EnableFlowControl>
<Index>1</Index>
<InterfaceName>Ethernet6</InterfaceName>
<InterfaceType i:nil="true"/>
<MultiPortsInterface>false</MultiPortsInterface>
<PortName>0</PortName>
<Priority>0</Priority>
<Speed>50000</Speed>
</a:EthernetInterface>
<a:EthernetInterface>
<ElementType>DeviceInterface</ElementType>
<AlternateSpeeds i:nil="true"/>
<EnableFlowControl>true</EnableFlowControl>
<Index>1</Index>
<InterfaceName>Ethernet20</InterfaceName>
<InterfaceType i:nil="true"/>
<MultiPortsInterface>false</MultiPortsInterface>
<PortName>0</PortName>
<Priority>0</Priority>
<Speed>100000</Speed>
</a:EthernetInterface>
</EthernetInterfaces>
<FlowControl>true</FlowControl>
<Height>0</Height>
<HwSku>Force10-S6000</HwSku>
<ManagementInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
</DeviceInfo>
</DeviceInfos>
<Hostname>switch-t0</Hostname>
<HwSku>Force10-S6000</HwSku>
</DeviceMiniGraph>
Loading