[console][minigraph] Avoid generate config for self console port (#7817)
Signed-off-by: Jing Kan jika@microsoft.com
This commit is contained in:
parent
9f4359804e
commit
0096765eba
@ -198,18 +198,18 @@ def parse_png(png, hname, dpg_ecmp_content = None):
|
||||
startport = link.find(str(QName(ns, "StartPort"))).text
|
||||
baudrate = link.find(str(QName(ns, "Bandwidth"))).text
|
||||
flowcontrol = 1 if link.find(str(QName(ns, "FlowControl"))) is not None and link.find(str(QName(ns, "FlowControl"))).text == 'true' else 0
|
||||
if enddevice.lower() == hname.lower():
|
||||
if enddevice.lower() == hname.lower() and endport.isdigit():
|
||||
console_ports[endport] = {
|
||||
'remote_device': startdevice,
|
||||
'baud_rate': baudrate,
|
||||
'flow_control': flowcontrol
|
||||
}
|
||||
else:
|
||||
}
|
||||
elif startport.isdigit():
|
||||
console_ports[startport] = {
|
||||
'remote_device': enddevice,
|
||||
'baud_rate': baudrate,
|
||||
'flow_control': flowcontrol
|
||||
}
|
||||
}
|
||||
continue
|
||||
|
||||
if linktype == "DeviceInterfaceLink":
|
||||
|
@ -194,6 +194,15 @@
|
||||
</DpgDec>
|
||||
<PngDec>
|
||||
<DeviceInterfaceLinks>
|
||||
<DeviceLinkBase i:type="DeviceSerialLink">
|
||||
<ElementType>DeviceSerialLink</ElementType>
|
||||
<Bandwidth>9600</Bandwidth>
|
||||
<EndDevice>switch-t0</EndDevice>
|
||||
<EndPort>console</EndPort>
|
||||
<FlowControl>true</FlowControl>
|
||||
<StartDevice>switch-t1</StartDevice>
|
||||
<StartPort>1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase i:type="DeviceSerialLink">
|
||||
<ElementType>DeviceSerialLink</ElementType>
|
||||
<Bandwidth>9600</Bandwidth>
|
||||
|
Loading…
Reference in New Issue
Block a user