mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 12:16:46 +00:00
Merge pull request #3488 from donaldsharp/bsd_topo_abstract1
Bsd topo abstract1
This commit is contained in:
commit
4870191362
@ -908,7 +908,7 @@ class TopoExaBGP(TopoHost):
|
||||
|
||||
# Disable linter branch warning. It is expected to have these here.
|
||||
# pylint: disable=R0912
|
||||
def diagnose_env():
|
||||
def diagnose_env_linux():
|
||||
"""
|
||||
Run diagnostics in the running environment. Returns `True` when everything
|
||||
is ok, otherwise `False`.
|
||||
@ -1066,3 +1066,14 @@ def diagnose_env():
|
||||
logger.removeHandler(fhandler)
|
||||
|
||||
return ret
|
||||
|
||||
def diagnose_env_freebsd():
|
||||
return True
|
||||
|
||||
def diagnose_env():
|
||||
if sys.platform.startswith("linux"):
|
||||
return diagnose_env_linux()
|
||||
elif sys.platform.startswith("freebsd"):
|
||||
return diagnose_env_freebsd()
|
||||
|
||||
return False
|
||||
|
@ -336,7 +336,7 @@ def normalize_text(text):
|
||||
|
||||
return text
|
||||
|
||||
def module_present(module, load=True):
|
||||
def module_present_linux(module, load):
|
||||
"""
|
||||
Returns whether `module` is present.
|
||||
|
||||
@ -352,6 +352,15 @@ def module_present(module, load=True):
|
||||
else:
|
||||
return True
|
||||
|
||||
def module_present_freebsd(module, load):
|
||||
return True
|
||||
|
||||
def module_present(module, load=True):
|
||||
if sys.platform.startswith("linux"):
|
||||
module_present_linux(module, load)
|
||||
elif sys.platform.startswith("freebsd"):
|
||||
module_present_freebsd(module, load)
|
||||
|
||||
def version_cmp(v1, v2):
|
||||
"""
|
||||
Compare two version strings and returns:
|
||||
|
Loading…
Reference in New Issue
Block a user