mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
topotests: make 'quagga' check optional
Only check for quagga directories and binaries when we don't find FRR. Also fix a copy-paste error in warning message.
This commit is contained in:
parent
45619ee3de
commit
812e38a94d
@ -885,10 +885,12 @@ def diagnose_env():
|
||||
|
||||
# Assert that FRR utilities exist
|
||||
frrdir = config.get('topogen', 'frrdir')
|
||||
hasfrr = False
|
||||
if not os.path.isdir(frrdir):
|
||||
logger.error('could not find {} directory'.format(frrdir))
|
||||
ret = False
|
||||
else:
|
||||
hasfrr = True
|
||||
try:
|
||||
pwd.getpwnam('frr')[2]
|
||||
except KeyError:
|
||||
@ -920,9 +922,13 @@ def diagnose_env():
|
||||
|
||||
# Assert that Quagga utilities exist
|
||||
quaggadir = config.get('topogen', 'quaggadir')
|
||||
if not os.path.isdir(quaggadir):
|
||||
if hasfrr:
|
||||
# if we have frr, don't check for quagga
|
||||
pass
|
||||
elif not os.path.isdir(quaggadir):
|
||||
logger.info('could not find {} directory (quagga tests will not run)'.format(quaggadir))
|
||||
else:
|
||||
ret = True
|
||||
try:
|
||||
pwd.getpwnam('quagga')[2]
|
||||
except KeyError:
|
||||
@ -937,7 +943,7 @@ def diagnose_env():
|
||||
if 'quagga' not in grp.getgrnam('quaggavty').gr_mem:
|
||||
logger.error('"quagga" user and group exist, but user is not under "quaggavty"')
|
||||
except KeyError:
|
||||
logger.warning('could not find "frrvty" group')
|
||||
logger.warning('could not find "quaggavty" group')
|
||||
|
||||
for fname in ['zebra', 'ospfd', 'ospf6d', 'bgpd', 'ripd', 'ripngd',
|
||||
'isisd', 'pimd']:
|
||||
|
Loading…
Reference in New Issue
Block a user