From 6d4caef050a1aefbddbdae3ad3d3928e464426f1 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 28 Apr 2023 17:57:29 +0100 Subject: opmode: T5191: replace underscores with hyphens in generated options --- op-mode-definitions/counters.xml.in | 80 +++++++++++----------- .../generate-system-login-user.xml.in | 12 ++-- op-mode-definitions/openvpn.xml.in | 8 +-- op-mode-definitions/reboot.xml.in | 2 +- op-mode-definitions/show-acceleration.xml.in | 2 +- op-mode-definitions/show-interfaces-bonding.xml.in | 12 ++-- op-mode-definitions/show-interfaces-bridge.xml.in | 8 +-- op-mode-definitions/show-interfaces-dummy.xml.in | 8 +-- .../show-interfaces-ethernet.xml.in | 12 ++-- op-mode-definitions/show-interfaces-geneve.xml.in | 8 +-- op-mode-definitions/show-interfaces-input.xml.in | 8 +-- op-mode-definitions/show-interfaces-l2tpv3.xml.in | 8 +-- .../show-interfaces-loopback.xml.in | 8 +-- op-mode-definitions/show-interfaces-pppoe.xml.in | 6 +- .../show-interfaces-pseudo-ethernet.xml.in | 8 +-- op-mode-definitions/show-interfaces-sstpc.xml.in | 6 +- op-mode-definitions/show-interfaces-tunnel.xml.in | 8 +-- .../show-interfaces-virtual-ethernet.xml.in | 8 +-- op-mode-definitions/show-interfaces-vti.xml.in | 8 +-- op-mode-definitions/show-interfaces-vxlan.xml.in | 8 +-- .../show-interfaces-wireguard.xml.in | 6 +- .../show-interfaces-wireless.xml.in | 12 ++-- op-mode-definitions/show-interfaces-wwan.xml.in | 6 +- op-mode-definitions/vpn-ipsec.xml.in | 4 +- python/vyos/opmode.py | 5 ++ 25 files changed, 133 insertions(+), 128 deletions(-) diff --git a/op-mode-definitions/counters.xml.in b/op-mode-definitions/counters.xml.in index 4bf08d201..f563cb9a0 100644 --- a/op-mode-definitions/counters.xml.in +++ b/op-mode-definitions/counters.xml.in @@ -19,7 +19,7 @@ Clear all bonding interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -35,7 +35,7 @@ Clear interface counters for a given bonding interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -48,7 +48,7 @@ Clear all bridge interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -64,7 +64,7 @@ Clear interface counters for a given bridge interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -77,7 +77,7 @@ Clear all dummy interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -93,7 +93,7 @@ Clear interface counters for a given dummy interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -106,7 +106,7 @@ Clear all ethernet interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -122,7 +122,7 @@ Clear interface counters for a given ethernet interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -135,7 +135,7 @@ Clear all GENEVE interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -151,7 +151,7 @@ Clear interface counters for a given GENEVE interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -164,7 +164,7 @@ Clear all Input interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -180,7 +180,7 @@ Clear interface counters for a given Input interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -193,7 +193,7 @@ Clear all L2TPv3 interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -209,7 +209,7 @@ Clear interface counters for a given L2TPv3 interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -222,7 +222,7 @@ Clear all loopback interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -238,7 +238,7 @@ Clear interface counters for a given loopback interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -251,7 +251,7 @@ Clear all MACsec interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -267,7 +267,7 @@ Clear interface counters for a given MACsec interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -280,7 +280,7 @@ Clear all OpenVPN interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -296,7 +296,7 @@ Clear interface counters for a given OpenVPN interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -309,7 +309,7 @@ Clear all PPPoE interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -325,7 +325,7 @@ Clear interface counters for a given PPPoE interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -338,7 +338,7 @@ Clear all Pseudo-Ethernet interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -354,7 +354,7 @@ Clear interface counters for a given Pseudo-Ethernet interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -367,7 +367,7 @@ Clear all SSTP interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -383,7 +383,7 @@ Clear interface counters for a given SSTP interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -396,7 +396,7 @@ Clear all tunnel interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -412,7 +412,7 @@ Clear interface counters for a given tunnel interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -425,7 +425,7 @@ Clear all virtual-ethernet interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -441,7 +441,7 @@ Clear interface counters for a given virtual-ethernet interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -454,7 +454,7 @@ Clear all VTI interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -470,7 +470,7 @@ Clear interface counters for a given VTI interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -483,7 +483,7 @@ Clear all VXLAN interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -499,7 +499,7 @@ Clear interface counters for a given VXLAN interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -512,7 +512,7 @@ Clear all Wireguard interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -528,7 +528,7 @@ Clear interface counters for a given Wireguard interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -541,7 +541,7 @@ Clear all wireless interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -557,7 +557,7 @@ Clear counters for a given wireless interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" @@ -570,7 +570,7 @@ Clear all WWAN interface counters - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_type "$3" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3" @@ -586,7 +586,7 @@ Clear counters for a given WWAN interface - sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf_name "$4" + sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4" diff --git a/op-mode-definitions/generate-system-login-user.xml.in b/op-mode-definitions/generate-system-login-user.xml.in index d0519b6bd..237a13610 100755 --- a/op-mode-definitions/generate-system-login-user.xml.in +++ b/op-mode-definitions/generate-system-login-user.xml.in @@ -35,19 +35,19 @@ Duration of single time interval - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9" The number of digits in the one-time password - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9" --rate-time "${11}" The number of digits in the one-time password - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" --window_size "${13}" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9" --rate-time "${11}" --window-size "${13}" @@ -57,19 +57,19 @@ The number of digits in the one-time password - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --window_size "${9}" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --window-size "${9}" Duration of single time interval - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --window_size "${9}" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "${11}" --window-size "${9}" Duration of single time interval - sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --rate_time "${13}" --window_size "${9}" + sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "${11}" --rate-time "${13}" --window-size "${9}" diff --git a/op-mode-definitions/openvpn.xml.in b/op-mode-definitions/openvpn.xml.in index 94647af02..f205b0026 100644 --- a/op-mode-definitions/openvpn.xml.in +++ b/op-mode-definitions/openvpn.xml.in @@ -37,13 +37,13 @@ Show OpenVPN interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=openvpn + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=openvpn Show detailed OpenVPN interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=openvpn + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=openvpn @@ -54,7 +54,7 @@ - ${vyos_op_scripts_dir}/interfaces.py show --intf_name=$4 + ${vyos_op_scripts_dir}/interfaces.py show --intf-name=$4 @@ -95,7 +95,7 @@ Show summary of specified OpenVPN interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" diff --git a/op-mode-definitions/reboot.xml.in b/op-mode-definitions/reboot.xml.in index 6414742d9..d5a71f561 100644 --- a/op-mode-definitions/reboot.xml.in +++ b/op-mode-definitions/reboot.xml.in @@ -25,7 +25,7 @@ <Minutes> - sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot_in $3 $4 + sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot-in $3 $4 diff --git a/op-mode-definitions/show-acceleration.xml.in b/op-mode-definitions/show-acceleration.xml.in index 6fd3babf5..fccfba5e3 100644 --- a/op-mode-definitions/show-acceleration.xml.in +++ b/op-mode-definitions/show-acceleration.xml.in @@ -21,7 +21,7 @@ Show QAT information for a given acceleration device - + diff --git a/op-mode-definitions/show-interfaces-bonding.xml.in b/op-mode-definitions/show-interfaces-bonding.xml.in index c41e7bd5f..aa224e6cf 100644 --- a/op-mode-definitions/show-interfaces-bonding.xml.in +++ b/op-mode-definitions/show-interfaces-bonding.xml.in @@ -11,13 +11,13 @@ interfaces bonding - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bonding Show summary of the specified bonding interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bonding @@ -38,13 +38,13 @@ interfaces bonding ${COMP_WORDS[3]} vif - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4.$6" --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=bonding Show summary of specified virtual network interface (vif) information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4.$6" --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=bonding @@ -60,13 +60,13 @@ Show Bonding interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=bonding Show detailed bonding interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=bonding + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding diff --git a/op-mode-definitions/show-interfaces-bridge.xml.in b/op-mode-definitions/show-interfaces-bridge.xml.in index 22cd3ee67..dc813682d 100644 --- a/op-mode-definitions/show-interfaces-bridge.xml.in +++ b/op-mode-definitions/show-interfaces-bridge.xml.in @@ -11,13 +11,13 @@ interfaces bridge - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=bridge + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bridge Show summary of the specified bridge interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=bridge + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bridge @@ -25,13 +25,13 @@ Show Bridge interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=bridge + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=bridge Show detailed bridge interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=bridge + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=bridge diff --git a/op-mode-definitions/show-interfaces-dummy.xml.in b/op-mode-definitions/show-interfaces-dummy.xml.in index 958d3483d..b8ec7da91 100644 --- a/op-mode-definitions/show-interfaces-dummy.xml.in +++ b/op-mode-definitions/show-interfaces-dummy.xml.in @@ -11,13 +11,13 @@ interfaces dummy - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=dummy + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=dummy Show summary of the specified dummy interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=dummy + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=dummy @@ -25,13 +25,13 @@ Show Dummy interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=dummy + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=dummy Show detailed dummy interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=dummy + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=dummy diff --git a/op-mode-definitions/show-interfaces-ethernet.xml.in b/op-mode-definitions/show-interfaces-ethernet.xml.in index 81759c2b6..7c12d6084 100644 --- a/op-mode-definitions/show-interfaces-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-ethernet.xml.in @@ -11,13 +11,13 @@ interfaces ethernet - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=ethernet Show summary of the specified ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=ethernet @@ -58,13 +58,13 @@ interfaces ethernet ${COMP_WORDS[3]} vif - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4.$6" --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=ethernet Show summary of specified virtual network interface (vif) information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4.$6" --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=ethernet @@ -80,13 +80,13 @@ Show Ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=ethernet Show detailed ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=ethernet diff --git a/op-mode-definitions/show-interfaces-geneve.xml.in b/op-mode-definitions/show-interfaces-geneve.xml.in index 3cf45878d..d3d188031 100644 --- a/op-mode-definitions/show-interfaces-geneve.xml.in +++ b/op-mode-definitions/show-interfaces-geneve.xml.in @@ -11,13 +11,13 @@ interfaces geneve - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=geneve + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=geneve Show summary of the specified GENEVE interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=geneve + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=geneve @@ -25,13 +25,13 @@ Show GENEVE interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=geneve + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=geneve Show detailed GENEVE interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=geneve + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=geneve diff --git a/op-mode-definitions/show-interfaces-input.xml.in b/op-mode-definitions/show-interfaces-input.xml.in index 5d93dcee6..e5d420056 100644 --- a/op-mode-definitions/show-interfaces-input.xml.in +++ b/op-mode-definitions/show-interfaces-input.xml.in @@ -11,13 +11,13 @@ interfaces input - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=input + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=input Show summary of the specified input interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=input + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=input @@ -25,13 +25,13 @@ Show Input (ifb) interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=input + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=input Show detailed input interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=input + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=input diff --git a/op-mode-definitions/show-interfaces-l2tpv3.xml.in b/op-mode-definitions/show-interfaces-l2tpv3.xml.in index 713e36dac..2d165171c 100644 --- a/op-mode-definitions/show-interfaces-l2tpv3.xml.in +++ b/op-mode-definitions/show-interfaces-l2tpv3.xml.in @@ -11,13 +11,13 @@ interfaces l2tpv3 - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=l2tpv3 + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=l2tpv3 Show summary of the specified L2TPv3 interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=l2tpv3 + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=l2tpv3 @@ -25,13 +25,13 @@ Show L2TPv3 interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=l2tpv3 + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=l2tpv3 Show detailed L2TPv3 interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=l2tpv3 + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=l2tpv3 diff --git a/op-mode-definitions/show-interfaces-loopback.xml.in b/op-mode-definitions/show-interfaces-loopback.xml.in index a24151cc3..d341a6359 100644 --- a/op-mode-definitions/show-interfaces-loopback.xml.in +++ b/op-mode-definitions/show-interfaces-loopback.xml.in @@ -11,13 +11,13 @@ interfaces loopback - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=loopback + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=loopback Show summary of the specified Loopback interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=loopback + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=loopback @@ -25,13 +25,13 @@ Show Loopback interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=loopback + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=loopback Show detailed Loopback interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=loopback + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=loopback diff --git a/op-mode-definitions/show-interfaces-pppoe.xml.in b/op-mode-definitions/show-interfaces-pppoe.xml.in index a34473148..1c6e0b83e 100644 --- a/op-mode-definitions/show-interfaces-pppoe.xml.in +++ b/op-mode-definitions/show-interfaces-pppoe.xml.in @@ -11,7 +11,7 @@ interfaces pppoe - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=pppoe + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pppoe @@ -34,13 +34,13 @@ Show PPPoE interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=pppoe + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=pppoe Show detailed PPPoE interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=pppoe + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=pppoe diff --git a/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in index cb62639ee..4ab2a5fbb 100644 --- a/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in @@ -11,13 +11,13 @@ interfaces pseudo-ethernet - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=pseudo-ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pseudo-ethernet Show summary of the specified pseudo-ethernet/MACvlan interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=pseudo-ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=pseudo-ethernet @@ -25,13 +25,13 @@ Show Pseudo-Ethernet/MACvlan interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=pseudo-ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=pseudo-ethernet Show detailed pseudo-ethernet/MACvlan interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=pseudo-ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=pseudo-ethernet diff --git a/op-mode-definitions/show-interfaces-sstpc.xml.in b/op-mode-definitions/show-interfaces-sstpc.xml.in index a619a9fd2..307276f72 100644 --- a/op-mode-definitions/show-interfaces-sstpc.xml.in +++ b/op-mode-definitions/show-interfaces-sstpc.xml.in @@ -11,7 +11,7 @@ interfaces sstpc - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=sstpc + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=sstpc @@ -34,13 +34,13 @@ Show SSTP client interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=sstpc + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=sstpc Show detailed SSTP client interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=sstpc + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=sstpc diff --git a/op-mode-definitions/show-interfaces-tunnel.xml.in b/op-mode-definitions/show-interfaces-tunnel.xml.in index 10e10e655..b99b0cbb2 100644 --- a/op-mode-definitions/show-interfaces-tunnel.xml.in +++ b/op-mode-definitions/show-interfaces-tunnel.xml.in @@ -11,13 +11,13 @@ interfaces tunnel - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=tunnel + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=tunnel Show summary of the specified tunnel interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=tunnel + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=tunnel @@ -25,13 +25,13 @@ Show Tunnel interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=tunnel + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=tunnel Show detailed tunnel interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=tunnel + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=tunnel diff --git a/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in b/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in index c743492fb..18ae806b7 100644 --- a/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in @@ -11,13 +11,13 @@ interfaces virtual-ethernet - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=virtual-ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=virtual-ethernet Show summary of the specified virtual-ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=virtual-ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=virtual-ethernet @@ -25,13 +25,13 @@ Show virtual-ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=virtual-ethernet + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=virtual-ethernet Show detailed virtual-ethernet interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=virtual-ethernet + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=virtual-ethernet diff --git a/op-mode-definitions/show-interfaces-vti.xml.in b/op-mode-definitions/show-interfaces-vti.xml.in index d532894b7..ae5cfeb9c 100644 --- a/op-mode-definitions/show-interfaces-vti.xml.in +++ b/op-mode-definitions/show-interfaces-vti.xml.in @@ -11,13 +11,13 @@ interfaces vti - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=vti + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vti Show summary of the specified vti interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=vti + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vti @@ -25,13 +25,13 @@ Show VTI interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=vti + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=vti Show detailed vti interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=vti + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=vti diff --git a/op-mode-definitions/show-interfaces-vxlan.xml.in b/op-mode-definitions/show-interfaces-vxlan.xml.in index fde832551..fd729b986 100644 --- a/op-mode-definitions/show-interfaces-vxlan.xml.in +++ b/op-mode-definitions/show-interfaces-vxlan.xml.in @@ -11,13 +11,13 @@ interfaces vxlan - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=vxlan + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vxlan Show summary of the specified VXLAN interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=vxlan + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vxlan @@ -25,13 +25,13 @@ Show VXLAN interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=vxlan + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=vxlan Show detailed VXLAN interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=vxlan + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=vxlan diff --git a/op-mode-definitions/show-interfaces-wireguard.xml.in b/op-mode-definitions/show-interfaces-wireguard.xml.in index d045beafc..bab7f19c8 100644 --- a/op-mode-definitions/show-interfaces-wireguard.xml.in +++ b/op-mode-definitions/show-interfaces-wireguard.xml.in @@ -11,7 +11,7 @@ - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=wireguard + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireguard @@ -49,13 +49,13 @@ Show WireGuard interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=wireguard + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=wireguard Show detailed Wireguard interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=wireguard + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=wireguard diff --git a/op-mode-definitions/show-interfaces-wireless.xml.in b/op-mode-definitions/show-interfaces-wireless.xml.in index f39d402f1..27c0f43db 100644 --- a/op-mode-definitions/show-interfaces-wireless.xml.in +++ b/op-mode-definitions/show-interfaces-wireless.xml.in @@ -8,13 +8,13 @@ Show Wireless (WLAN) interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=wireless Show detailed wireless interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=wireless @@ -31,13 +31,13 @@ - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireless Show summary of the specified wireless interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4" --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=wireless @@ -63,13 +63,13 @@ Show specified virtual network interface (vif) information - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4.$6" --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=wireless Show summary of specified virtual network interface (vif) information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_name="$4.$6" --intf_type=wireless + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=wireless diff --git a/op-mode-definitions/show-interfaces-wwan.xml.in b/op-mode-definitions/show-interfaces-wwan.xml.in index 17d4111a9..2707c0d8e 100644 --- a/op-mode-definitions/show-interfaces-wwan.xml.in +++ b/op-mode-definitions/show-interfaces-wwan.xml.in @@ -12,7 +12,7 @@ - ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=wirelessmodem + ${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wirelessmodem @@ -86,13 +86,13 @@ Show Wireless Modem (WWAN) interface information - ${vyos_op_scripts_dir}/interfaces.py show_summary --intf_type=wirelessmodem + ${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=wirelessmodem Show detailed Wireless Modem (WWAN( interface information - ${vyos_op_scripts_dir}/interfaces.py show --intf_type=wirelessmodem + ${vyos_op_scripts_dir}/interfaces.py show --intf-type=wirelessmodem diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in index 1eb5a3709..c7ba780a3 100644 --- a/op-mode-definitions/vpn-ipsec.xml.in +++ b/op-mode-definitions/vpn-ipsec.xml.in @@ -35,7 +35,7 @@ <x.x.x.x> <h:h:h:h:h:h:h:h> - sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_dst --profile="$5" --tunnel="$7" --nbma_dst="$9" + sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_dst --profile="$5" --tunnel="$7" --nbma-dst="$9" sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_all --profile="$5" --tunnel="$7" @@ -219,7 +219,7 @@ Show detail active IKEv2 RA sessions by connection-id - if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_ra_detail --conn_id="$6"; else echo "IPsec process not running" ; fi + if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_ra_detail --conn-id="$6"; else echo "IPsec process not running" ; fi diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py index d7172a0b5..230a85541 100644 --- a/python/vyos/opmode.py +++ b/python/vyos/opmode.py @@ -209,6 +209,11 @@ def run(module): for opt in type_hints: th = type_hints[opt] + # Function argument names use underscores as separators + # but command-line options should use hyphens + # Without this, we'd get options like "--foo_bar" + opt = re.sub(r'_', '-', opt) + if _get_arg_type(th) == bool: subparser.add_argument(f"--{opt}", action='store_true') else: -- cgit v1.2.3