Allow VNI for "direct" type vNICs
This commit is contained in:
parent
284c581845
commit
f540dd320b
|
@ -397,9 +397,13 @@ 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']:
|
||||||
|
net_vni = device.source.attrib.get('dev')
|
||||||
|
else:
|
||||||
|
net_vni = re_match(r'[vm]*br([0-9a-z]+)', net_bridge).group(1)
|
||||||
net_obj = {
|
net_obj = {
|
||||||
'type': net_type,
|
'type': net_type,
|
||||||
'vni': re_match(r'[vm]*br([0-9a-z]+)', net_bridge).group(1),
|
'vni': net_vni,
|
||||||
'mac': net_mac,
|
'mac': net_mac,
|
||||||
'source': net_bridge,
|
'source': net_bridge,
|
||||||
'model': net_model,
|
'model': net_model,
|
||||||
|
|
Loading…
Reference in New Issue