summaryrefslogtreecommitdiff
path: root/src/op_mode/bgp.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-03-07 19:51:18 +0000
committerGitHub <noreply@github.com>2023-03-07 19:51:18 +0000
commit06e810ffc398366f7d4cc00241e0692e6fe81620 (patch)
treea1e2d444b83eadbb8f0e7f43b6493a03c6f90c8a /src/op_mode/bgp.py
parent9f0857c2e7821ea22d5132d6352ee8cbcb64b738 (diff)
parent1e72e1c68a708518526b8e090f5d6482671cbd57 (diff)
downloadvyos-1x-06e810ffc398366f7d4cc00241e0692e6fe81620.tar.gz
vyos-1x-06e810ffc398366f7d4cc00241e0692e6fe81620.zip
Merge pull request #1868 from jestabro/literal
op-mode: T5051: use Literal types to provide op-mode CLI choices and API enums
Diffstat (limited to 'src/op_mode/bgp.py')
-rwxr-xr-xsrc/op_mode/bgp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/bgp.py b/src/op_mode/bgp.py
index 23001a9d7..3f6d45dd7 100755
--- a/src/op_mode/bgp.py
+++ b/src/op_mode/bgp.py
@@ -30,6 +30,7 @@ from vyos.configquery import ConfigTreeQuery
import vyos.opmode
+ArgFamily = typing.Literal['inet', 'inet6']
frr_command_template = Template("""
{% if family %}
@@ -75,7 +76,7 @@ def _verify(func):
@_verify
def show_neighbors(raw: bool,
- family: str,
+ family: ArgFamily,
peer: typing.Optional[str],
vrf: typing.Optional[str]):
kwargs = dict(locals())