Don't show built-in bridges as invalid
This commit is contained in:
parent
3cf90c46ad
commit
e724e73140
|
@ -402,7 +402,7 @@ def format_info(config, domain_information, long_output):
|
||||||
net_vni = re.sub('br', '', net['source'])
|
net_vni = re.sub('br', '', net['source'])
|
||||||
|
|
||||||
response = call_api(config, 'get', '/network/{net}'.format(net=net_vni))
|
response = call_api(config, 'get', '/network/{net}'.format(net=net_vni))
|
||||||
if response.status_code != 200 and net_vni != 'cluster':
|
if response.status_code != 200 and net_vni not in ['cluster', 'storage', 'upstream']:
|
||||||
net_list.append(ansiprint.red() + net_vni + ansiprint.end() + ' [invalid]')
|
net_list.append(ansiprint.red() + net_vni + ansiprint.end() + ' [invalid]')
|
||||||
else:
|
else:
|
||||||
net_list.append(net_vni)
|
net_list.append(net_vni)
|
||||||
|
@ -551,7 +551,7 @@ def format_list(config, vm_list, raw):
|
||||||
for net_vni in raw_net_list:
|
for net_vni in raw_net_list:
|
||||||
if not net_vni in valid_net_list:
|
if not net_vni in valid_net_list:
|
||||||
response = call_api(config, 'get', '/network/{net}'.format(net=net_vni))
|
response = call_api(config, 'get', '/network/{net}'.format(net=net_vni))
|
||||||
if response.status_code != 200 and net_vni != 'cluster':
|
if response.status_code != 200 and net_vni not in ['cluster', 'storage', 'upstream']:
|
||||||
vm_net_colour = ansiprint.red()
|
vm_net_colour = ansiprint.red()
|
||||||
else:
|
else:
|
||||||
valid_net_list.append(net_vni)
|
valid_net_list.append(net_vni)
|
||||||
|
|
Loading…
Reference in New Issue