From 07ecc0c33fb32878cac25ec84f2f3a977588f0dd Mon Sep 17 00:00:00 2001 From: bbabich Date: Sat, 4 Nov 2023 22:23:17 +1100 Subject: op-mode: T5658: add VRF support for "monitor traceroute" --- op-mode-definitions/mtr.xml.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 op-mode-definitions/mtr.xml.in (limited to 'op-mode-definitions/mtr.xml.in') diff --git a/op-mode-definitions/mtr.xml.in b/op-mode-definitions/mtr.xml.in new file mode 100644 index 000000000..acc4ee29d --- /dev/null +++ b/op-mode-definitions/mtr.xml.in @@ -0,0 +1,23 @@ + + + + + Trace network path to node with mtr + + <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/mtr.py ${@:2} + + + + Traceroute options + + + + + ${vyos_op_scripts_dir}/mtr.py ${@:2} + + + + -- cgit v1.2.3 From c0de93d37354ec89f44dde7f1b5a4c8af550a019 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 12 Nov 2023 10:10:01 +0100 Subject: op-mode: T5658: fix "monitor traceroute" completion helper --- op-mode-definitions/monitor-traceroute.xml.in | 30 --------------------------- op-mode-definitions/mtr.xml.in | 26 ++++++++++++++++++++++- src/op_mode/mtr.py | 7 +++++-- 3 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 op-mode-definitions/monitor-traceroute.xml.in (limited to 'op-mode-definitions/mtr.xml.in') diff --git a/op-mode-definitions/monitor-traceroute.xml.in b/op-mode-definitions/monitor-traceroute.xml.in deleted file mode 100644 index 7697228b3..000000000 --- a/op-mode-definitions/monitor-traceroute.xml.in +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Monitor route with mtr - - - - - Traceroute route with mtr - - <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> - - - ${vyos_op_scripts_dir}/mtr.py ${@:3} - - - - mtr options - - - - - ${vyos_op_scripts_dir}/mtr.py ${@:3} - - - - - - diff --git a/op-mode-definitions/mtr.xml.in b/op-mode-definitions/mtr.xml.in index acc4ee29d..8239aec4c 100644 --- a/op-mode-definitions/mtr.xml.in +++ b/op-mode-definitions/mtr.xml.in @@ -1,8 +1,32 @@ + + + + + Monitor Traceroute and ping path to target + + <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/mtr.py ${@:3} + + + + mtr options + + + + + ${vyos_op_scripts_dir}/mtr.py ${@:3} + + + + + - Trace network path to node with mtr + Monitor Traceroute and ping path to target <hostname> <x.x.x.x> <h:h:h:h:h:h:h:h> diff --git a/src/op_mode/mtr.py b/src/op_mode/mtr.py index efb627e51..de139f2fa 100644 --- a/src/op_mode/mtr.py +++ b/src/op_mode/mtr.py @@ -242,8 +242,11 @@ if __name__ == '__main__': if not host: sys.exit("mtr: Missing host") - if host == '--get-options': - args.first() # pop ping + + if host == '--get-options' or host == '--get-options-nested': + if host == '--get-options-nested': + args.first() # pop monitor + args.first() # pop mtr | traceroute args.first() # pop IP usedoptionslist = [] while args: -- cgit v1.2.3