@@ -395,8 +395,9 @@ def parse_deviceinfo(meta, hwsku):
395
395
for device_info in meta .findall (str (QName (ns , "DeviceInfo" ))):
396
396
dev_sku = device_info .find (str (QName (ns , "HwSku" ))).text
397
397
if dev_sku == hwsku :
398
- interfaces = device_info .find (str (QName (ns , "EthernetInterfaces" )))
399
- for interface in interfaces .findall (str (QName (ns1 , "EthernetInterface" ))):
398
+ interfaces = device_info .find (str (QName (ns , "EthernetInterfaces" ))).findall (str (QName (ns1 , "EthernetInterface" )))
399
+ interfaces = interfaces + device_info .find (str (QName (ns , "ManagementInterfaces" ))).findall (str (QName (ns1 , "ManagementInterface" )))
400
+ for interface in interfaces :
400
401
alias = interface .find (str (QName (ns , "InterfaceName" ))).text
401
402
speed = interface .find (str (QName (ns , "Speed" ))).text
402
403
desc = interface .find (str (QName (ns , "Description" )))
@@ -494,6 +495,8 @@ def parse_xml(filename, platform=None, port_config_file=None):
494
495
mgmt_intf_count += 1
495
496
mgmt_alias_reverse_mapping [alias ] = name
496
497
results ['MGMT_PORT' ][name ] = {'alias' : alias , 'admin_status' : 'up' }
498
+ if alias in port_speeds_default :
499
+ results ['MGMT_PORT' ][name ]['speed' ] = port_speeds_default [alias ]
497
500
results ['MGMT_INTERFACE' ][(name , key [1 ])] = mgmt_intf [key ]
498
501
results ['LOOPBACK_INTERFACE' ] = lo_intfs
499
502
0 commit comments