diff options
author | John Estabrook <jestabro@vyos.io> | 2023-03-03 11:30:27 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-03-05 19:38:07 -0600 |
commit | 1e72e1c68a708518526b8e090f5d6482671cbd57 (patch) | |
tree | b1b040241ad157ba8cc165b42d47cf8d00fa5fc7 /src/op_mode/bgp.py | |
parent | ae2db32a13d78c5014c7b770f2de28949a13a6c3 (diff) | |
download | vyos-1x-1e72e1c68a708518526b8e090f5d6482671cbd57.tar.gz vyos-1x-1e72e1c68a708518526b8e090f5d6482671cbd57.zip |
op-mode: T5051: use typing.Literal in op-mode scripts
Diffstat (limited to 'src/op_mode/bgp.py')
-rwxr-xr-x | src/op_mode/bgp.py | 3 |
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()) |