Add hostdev net_type to handler as well

This commit is contained in:
Joshua Boniface 2021-06-17 01:52:58 -04:00
parent 5607a6bb62
commit 509afd4d05
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ def getDomainNetworks(parsed_xml, stats_data):
net_wr_packets = net_stats.get('wr_packets', 0) net_wr_packets = net_stats.get('wr_packets', 0)
net_wr_errors = net_stats.get('wr_errors', 0) net_wr_errors = net_stats.get('wr_errors', 0)
net_wr_drops = net_stats.get('wr_drops', 0) net_wr_drops = net_stats.get('wr_drops', 0)
if net_type in ['direct']: if net_type in ['direct', 'hostdev']:
net_vni = device.source.attrib.get('dev') net_vni = device.source.attrib.get('dev')
else: else:
net_vni = re_match(r'[vm]*br([0-9a-z]+)', net_bridge).group(1) net_vni = re_match(r'[vm]*br([0-9a-z]+)', net_bridge).group(1)