@@ -402,8 +402,9 @@ def parse_deviceinfo(meta, hwsku):
402
402
for device_info in meta .findall (str (QName (ns , "DeviceInfo" ))):
403
403
dev_sku = device_info .find (str (QName (ns , "HwSku" ))).text
404
404
if dev_sku == hwsku :
405
- interfaces = device_info .find (str (QName (ns , "EthernetInterfaces" )))
406
- for interface in interfaces .findall (str (QName (ns1 , "EthernetInterface" ))):
405
+ interfaces = device_info .find (str (QName (ns , "EthernetInterfaces" ))).findall (str (QName (ns1 , "EthernetInterface" )))
406
+ interfaces = interfaces + device_info .find (str (QName (ns , "ManagementInterfaces" ))).findall (str (QName (ns1 , "ManagementInterface" )))
407
+ for interface in interfaces :
407
408
alias = interface .find (str (QName (ns , "InterfaceName" ))).text
408
409
speed = interface .find (str (QName (ns , "Speed" ))).text
409
410
desc = interface .find (str (QName (ns , "Description" )))
@@ -501,6 +502,8 @@ def parse_xml(filename, platform=None, port_config_file=None):
501
502
mgmt_intf_count += 1
502
503
mgmt_alias_reverse_mapping [alias ] = name
503
504
results ['MGMT_PORT' ][name ] = {'alias' : alias , 'admin_status' : 'up' }
505
+ if alias in port_speeds_default :
506
+ results ['MGMT_PORT' ][name ]['speed' ] = port_speeds_default [alias ]
504
507
results ['MGMT_INTERFACE' ][(name , key [1 ])] = mgmt_intf [key ]
505
508
results ['LOOPBACK_INTERFACE' ] = lo_intfs
506
509
0 commit comments