[routing-manager] new APIs to get state and new CLI commands (#8784)

This commit adds new public OT APIs in `border_routing.h` to get the
current state of `RoutingManager` and to get the current favored
on-link prefix.

This commit also updates CLI `br` commands:
- It moves the CLI `br` implementation into own `cli_br` module.
- It adds `br state` to get the current state
- It changes `br omrprefix`, `br onlinkprefix`, and `br nat64prefix`
  to output both local and favored prefixes when no additional arg
  is provided and allow the use of `local` or `favored` extra arg to
  specify the type.
- It updates the documentation of `br` related commands in the source
  code and also adding `cli/README_BR.md`.
This commit is contained in:
Abtin Keshavarzian
2023-02-27 19:03:29 -08:00
committed by GitHub
parent 2b8779ec0b
commit 2caa934410
16 changed files with 1037 additions and 339 deletions
+1 -1
View File
@@ -3214,7 +3214,7 @@ class OpenThreadTHCI(object):
@watched
def isBorderRoutingEnabled(self):
try:
self.__executeCommand('br omrprefix')
self.__executeCommand('br omrprefix local')
return True
except CommandError:
return False