mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 23:05:11 +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.
|
# Disable linter branch warning. It is expected to have these here.
|
||||||
# pylint: disable=R0912
|
# pylint: disable=R0912
|
||||||
def diagnose_env():
|
def diagnose_env_linux():
|
||||||
"""
|
"""
|
||||||
Run diagnostics in the running environment. Returns `True` when everything
|
Run diagnostics in the running environment. Returns `True` when everything
|
||||||
is ok, otherwise `False`.
|
is ok, otherwise `False`.
|
||||||
@ -1066,3 +1066,14 @@ def diagnose_env():
|
|||||||
logger.removeHandler(fhandler)
|
logger.removeHandler(fhandler)
|
||||||
|
|
||||||
return ret
|
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
|
return text
|
||||||
|
|
||||||
def module_present(module, load=True):
|
def module_present_linux(module, load):
|
||||||
"""
|
"""
|
||||||
Returns whether `module` is present.
|
Returns whether `module` is present.
|
||||||
|
|
||||||
@ -352,6 +352,15 @@ def module_present(module, load=True):
|
|||||||
else:
|
else:
|
||||||
return True
|
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):
|
def version_cmp(v1, v2):
|
||||||
"""
|
"""
|
||||||
Compare two version strings and returns:
|
Compare two version strings and returns:
|
||||||
|
Loading…
Reference in New Issue
Block a user