diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-03-19 12:30:12 +0200 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-03-19 12:30:12 +0200 |
| commit | c82b88fdf49135c953eb965fad767e5bdb5d3910 (patch) | |
| tree | 2827ce83890b2fed0dad828a9479a0b6ad730f45 /src | |
| parent | 42b2376e030f85b602862632b3e8e8534a3a5ef1 (diff) | |
| download | vyos-1x-c82b88fdf49135c953eb965fad767e5bdb5d3910.tar.gz vyos-1x-c82b88fdf49135c953eb965fad767e5bdb5d3910.zip | |
T8395: VPP add op-mode command for 'show mode'
Diffstat (limited to 'src')
| -rwxr-xr-x | src/op_mode/vpp.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/op_mode/vpp.py b/src/op_mode/vpp.py index db9474e91..503e2fccc 100755 --- a/src/op_mode/vpp.py +++ b/src/op_mode/vpp.py @@ -365,6 +365,14 @@ class VPPShow: data = self._get_runtime_raw() return data if raw else self._show_runtime_formatted() + # ----------------------------- + # Interfaces mode + # ----------------------------- + def mode(self, raw: bool): + # VPP does not have API call to get this data + data = self.vpp.cli_cmd('show mode') + return [data.reply] if raw else data.reply + # ----------------------------- # VyOS IPFIX op-mode entries @@ -410,6 +418,13 @@ def show_bridge_details(raw: bool, ifname: typing.Optional[str] = None): def show_runtime(raw: bool): return VPPShow().runtime(raw) +# ----------------------------- +# show mode +# ----------------------------- +@vyos.opmode.verify_cli_exists(['vpp']) +def show_mode(raw: bool): + return VPPShow().mode(raw) + if __name__ == '__main__': try: |
