diff options
Diffstat (limited to 'op-mode-definitions')
159 files changed, 2634 insertions, 3005 deletions
| diff --git a/op-mode-definitions/clear-interfaces.xml.in b/op-mode-definitions/clear-interfaces.xml.in index de2c3443e..4b4362add 100644 --- a/op-mode-definitions/clear-interfaces.xml.in +++ b/op-mode-definitions/clear-interfaces.xml.in @@ -12,601 +12,267 @@          <children>            <node name="counters">              <properties> -              <help>Clear interface counters for all interfaces</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters</command> -          </node> -          <tagNode name="connection"> -            <properties> -              <help>Bring connection-oriented network interface down and up</help> -              <completionHelp> -                <path>interfaces pppoe</path> -                <path>interfaces sstpc</path> -                <path>interfaces wwan</path> -              </completionHelp> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect --disconnect --interface "$3"</command> -          </tagNode> -          <node name="bonding"> -            <properties> -              <help>Clear Bonding interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all bonding interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="bonding"> -            <properties> -              <help>Clear interface information for a given bonding interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type bonding</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given bonding interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="bridge"> -            <properties> -              <help>Clear Bridge interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all bridge interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="bridge"> -            <properties> -              <help>Clear interface information for a given bridge interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type bridge</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given bridge interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="dummy"> -            <properties> -              <help>Clear Dummy interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all dummy interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="dummy"> -            <properties> -              <help>Clear interface information for a given dummy interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type dummy</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given dummy interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="ethernet"> -            <properties> -              <help>Clear Ethernet interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all ethernet interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="ethernet"> -            <properties> -              <help>Clear interface information for a given ethernet interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type ethernet</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given ethernet interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="geneve"> -            <properties> -              <help>Clear GENEVE interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all GENEVE interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="geneve"> -            <properties> -              <help>Clear interface information for a given GENEVE interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type geneve</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given GENEVE interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="input"> -            <properties> -              <help>Clear Input (ifb) interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all Input interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="input"> -            <properties> -              <help>Clear interface information for a given Input interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type input</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given Input interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="l2tpv3"> -            <properties> -              <help>Clear L2TPv3 interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all L2TPv3 interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="l2tpv3"> -            <properties> -              <help>Clear interface information for a given L2TPv3 interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type l2tpeth</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given L2TPv3 interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="loopback"> -            <properties> -              <help>Clear Loopback interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all loopback interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="loopback"> -            <properties> -              <help>Clear interface information for a given loopback interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type loopback</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given loopback interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="macsec"> -            <properties> -              <help>Clear MACsec interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all MACsec interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="macsec"> -            <properties> -              <help>Clear interface information for a given MACsec interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type macsec</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given MACsec interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="openvpn"> -            <properties> -              <help>Clear OpenVPN interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all OpenVPN interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="openvpn"> -            <properties> -              <help>Clear interface information for a given OpenVPN interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type openvpn</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given OpenVPN interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="pppoe"> -            <properties> -              <help>Clear PPPoE interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all PPPoE interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="pppoe"> -            <properties> -              <help>Clear interface information for a given PPPoE interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type pppoe</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given PPPoE interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="pseudo-ethernet"> -            <properties> -              <help>Clear Pseudo-Ethernet/MACvlan interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all Pseudo-Ethernet interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="pseudo-ethernet"> -            <properties> -              <help>Clear interface information for a given Pseudo-Ethernet interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type pseudo-ethernet</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given Pseudo-Ethernet interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="sstp"> -            <properties> -              <help>Clear SSTP interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all SSTP interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> +              <help>Clear interface counters</help> +            </properties> +            <command>${vyos_op_scripts_dir}/interfaces.py clear_counters</command> +            <children> +              <tagNode name="bonding"> +                <properties> +                  <help>Clear counters for a given bonding interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type bonding</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear bonding interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type bonding</command> +                </standalone> +              </tagNode> +              <tagNode name="bridge"> +                <properties> +                  <help>Clear counters for a given bridge interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type bridge</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear bridge interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type bridge</command> +                </standalone> +              </tagNode> +              <tagNode name="dummy"> +                <properties> +                  <help>Clear counters for a given dummy interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type dummy</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear dummy interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type dummy</command> +                </standalone> +              </tagNode> +              <tagNode name="ethernet"> +                <properties> +                  <help>Clear counters for a given ethernet interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type ethernet</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear ethernet interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type ethernet</command> +                </standalone> +              </tagNode> +              <tagNode name="geneve"> +                <properties> +                  <help>Clear counters for a given GENEVE interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type geneve</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear GENEVE interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type geneve</command> +                </standalone> +              </tagNode> +              <tagNode name="input"> +                <properties> +                  <help>Clear counters for a given Input interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type input</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear input interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type input</command> +                </standalone> +              </tagNode> +              <tagNode name="l2tpv3"> +                <properties> +                  <help>Clear counters for a given L2TPv3 interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type l2tpeth</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear L2TPv3 interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type l2tpeth</command> +                </standalone> +              </tagNode> +              <!-- There's only one loopback in Linux and it's unlikely to change, +                   so we don't need a tag node here. --> +              <node name="loopback"> +                <properties> +                  <help>Clear loopback interface counters</help> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name lo</command>                </node> -            </children> -          </node> -          <tagNode name="sstp"> -            <properties> -              <help>Clear interface information for a given SSTP interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type sstp</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given SSTP interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="tunnel"> -            <properties> -              <help>Clear Tunnel interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all tunnel interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="tunnel"> -            <properties> -              <help>Clear interface information for a given tunnel interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type tunnel</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given tunnel interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="virtual-ethernet"> -            <properties> -              <help>Clear virtual-ethernet interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all virtual-ethernet interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="virtual-ethernet"> -            <properties> -              <help>Clear interface information for a given virtual-ethernet interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type virtual-ethernet</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given virtual-ethernet interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="vti"> -            <properties> -              <help>Clear VTI interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all VTI interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="vti"> -            <properties> -              <help>Clear interface information for a given VTI interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type vti</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given VTI interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="vxlan"> -            <properties> -              <help>Clear VXLAN interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all VXLAN interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="vxlan"> -            <properties> -              <help>Clear interface information for a given VXLAN interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type vxlan</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given VXLAN interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="wireguard"> -            <properties> -              <help>Clear Wireguard interface information</help> -            </properties> -            <children> -              <node name="counters"> -                <properties> -                  <help>Clear all Wireguard interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </node> -            </children> -          </node> -          <tagNode name="wireguard"> -            <properties> -              <help>Clear interface information for a given Wireguard interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type wireguard</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear interface counters for a given Wireguard interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="wireless"> -            <properties> -              <help>Clear Wireless (WLAN) interface information</help> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear all wireless interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </leafNode> -            </children> -          </node> -          <tagNode name="wireless"> -            <properties> -              <help>Clear interface information for a given wireless interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type wireless</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> +              <tagNode name="macsec"> +                <properties> +                  <help>Clear counters for a given MACsec interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type macsec</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear MACsec interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type macsec</command> +                </standalone> +              </tagNode> +              <tagNode name="openvpn"> +                <properties> +                  <help>Clear counters for a given OpenVPN interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type openvpn</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear OpenVPN interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type openvpn</command> +                </standalone> +              </tagNode> +              <tagNode name="pppoe"> +                <properties> +                  <help>Clear counters for a given PPPoE interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type pppoe</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear PPPoE interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type pppoe</command> +                </standalone> +              </tagNode> +              <tagNode name="pseudo-ethernet"> +                <properties> +                  <help>Clear counters for a given pseudo-ethernet interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type pseudo-ethernet</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear pseudo-ethernet interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type pseudo-ethernet</command> +                </standalone> +              </tagNode> +              <tagNode name="sstp"> +                <properties> +                  <help>Clear counters for a given SSTP interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type sstp</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear SSTP interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type sstp</command> +                </standalone> +              </tagNode> +              <tagNode name="tunnel"> +                <properties> +                  <help>Clear counters for a given tunnel interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type tunnel</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear tunnel interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type tunnel</command> +                </standalone> +              </tagNode> +              <tagNode name="virtual-ethernet"> +                <properties> +                  <help>Clear counters for a given virtual-ethernet interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type virtual-ethernet</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear virtual-ethernet interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type virtual-ethernet</command> +                </standalone> +              </tagNode> +              <tagNode name="vti"> +                <properties> +                  <help>Clear counters for a given VTI interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type vti</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear VTI interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type vti</command> +                </standalone> +              </tagNode> +              <tagNode name="vxlan"> +                <properties> +                  <help>Clear counters for a given VXLAN interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type vxlan</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear VXLAN interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type vxlan</command> +                </standalone> +              </tagNode> +              <tagNode name="wireguard"> +                <properties> +                  <help>Clear counters for a given WireGuard interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type wireguard</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear WireGuard interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type wireguard</command> +                </standalone> +              </tagNode> +              <tagNode name="wireless">                  <properties>                    <help>Clear counters for a given wireless interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> -            </children> -          </tagNode> -          <node name="wwan"> -            <properties> -              <help>Clear Wireless Modem (WWAN) interface information</help> -            </properties> -            <children> -              <leafNode name="counters"> -                <properties> -                  <help>Clear all WWAN interface counters</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type "$3"</command> -              </leafNode> -            </children> -          </node> -          <tagNode name="wwan"> -            <properties> -              <help>Clear interface information for a given WWAN interface</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type wwan</script> -              </completionHelp> -            </properties> -            <children> -              <leafNode name="counters"> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type wireless</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear wireless interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type wireless</command> +                </standalone> +              </tagNode> +              <tagNode name="wwan">                  <properties>                    <help>Clear counters for a given WWAN interface</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type wwan</script> +                  </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$4"</command> -              </leafNode> +                <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-name "$5"</command> +                <standalone> +                  <help>Clear wireless wide area network interface counters</help> +                  <command>${vyos_op_scripts_dir}/interfaces.py clear_counters --intf-type wwan</command> +                </standalone> +              </tagNode>              </children> -          </tagNode> +          </node>          </children>        </node>      </children> diff --git a/op-mode-definitions/clear-ip.xml.in b/op-mode-definitions/clear-ip.xml.in index 3c75ed11b..cbbd462d1 100644 --- a/op-mode-definitions/clear-ip.xml.in +++ b/op-mode-definitions/clear-ip.xml.in @@ -7,12 +7,6 @@            <help>Clear Internet Protocol (IP) statistics or status</help>          </properties>          <children> -          <node name="prefix-list"> -            <properties> -              <help>Clear prefix-list statistics or status</help> -            </properties> -            <command>vtysh -c "$*"</command> -          </node>            <tagNode name="prefix-list">              <properties>                <help>Clear prefix-list statistics or status for specified word</help> @@ -20,9 +14,13 @@                  <list><WORD></list>                </completionHelp>              </properties> +            <standalone> +              <help>Clear prefix-list statistics or status</help> +              <command>vtysh -c "$*"</command> +            </standalone>              <command>vtysh -c "$*"</command>              <children> -              <leafNode name="node.tag"> +              <virtualTagNode>                  <properties>                    <help>Clear prefix-list statistics or status for given word|network</help>                    <completionHelp> @@ -30,7 +28,7 @@                    </completionHelp>                  </properties>                  <command>vtysh -c "$*"</command> -              </leafNode> +              </virtualTagNode>              </children>            </tagNode>          </children> diff --git a/op-mode-definitions/clear-ipv6.xml.in b/op-mode-definitions/clear-ipv6.xml.in index c062102fc..bdfc9eab7 100644 --- a/op-mode-definitions/clear-ipv6.xml.in +++ b/op-mode-definitions/clear-ipv6.xml.in @@ -7,12 +7,6 @@            <help>Clear Internet Protocol (IPv6) statistics or status</help>          </properties>          <children> -          <node name="prefix-list"> -            <properties> -              <help>Clear prefix-list statistics or status</help> -            </properties> -            <command>vtysh -c "$*"</command> -          </node>            <tagNode name="prefix-list">              <properties>                <help>Clear prefix-list statistics or status for specified word</help> @@ -20,9 +14,13 @@                  <list>WORD</list>                </completionHelp>              </properties> +            <standalone> +              <help>Clear prefix-list statistics or status</help> +              <command>vtysh -c "$*"</command> +            </standalone>              <command>vtysh -c "$*"</command>              <children> -              <leafNode name="node.tag"> +              <virtualTagNode>                  <properties>                    <help>Clear prefix-list statistics or status for given word|network</help>                    <completionHelp> @@ -30,7 +28,7 @@                    </completionHelp>                  </properties>                  <command>vtysh -c "$*"</command> -              </leafNode> +              </virtualTagNode>              </children>            </tagNode>          </children> diff --git a/op-mode-definitions/clear-log.xml.in b/op-mode-definitions/clear-log.xml.in index 1f4a1aacd..5457ce7d6 100644 --- a/op-mode-definitions/clear-log.xml.in +++ b/op-mode-definitions/clear-log.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Clear contents of current master log file</help>          </properties> -        <command>sudo journalctl --rotate --vacuum-time=1s</command> +        <command>journalctl --rotate --vacuum-time=1s</command>        </leafNode>      </children>    </node> diff --git a/op-mode-definitions/connect.xml.in b/op-mode-definitions/connect.xml.in index 9027056a6..73bfb598a 100644 --- a/op-mode-definitions/connect.xml.in +++ b/op-mode-definitions/connect.xml.in @@ -24,7 +24,7 @@              <path>interfaces wwan</path>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect --interface "$3"</command> +        <command>${vyos_op_scripts_dir}/connect_disconnect.py --connect --interface "$3"</command>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/conntrack-sync.xml.in b/op-mode-definitions/conntrack-sync.xml.in index a66331f27..d52939bed 100644 --- a/op-mode-definitions/conntrack-sync.xml.in +++ b/op-mode-definitions/conntrack-sync.xml.in @@ -11,13 +11,13 @@              <properties>                <help>Reset external cache and request resync with other systems</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py reset_external_cache</command> +            <command>${vyos_op_scripts_dir}/conntrack_sync.py reset_external_cache</command>            </leafNode>            <leafNode name="internal-cache">              <properties>                <help>Reset internal cache and request resync with other systems</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py reset_internal_cache</command> +            <command>${vyos_op_scripts_dir}/conntrack_sync.py reset_internal_cache</command>            </leafNode>          </children>        </node> @@ -29,7 +29,7 @@          <properties>            <help>Restart the connection tracking synchronization service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py restart</command> +        <command>${vyos_op_scripts_dir}/conntrack_sync.py restart</command>        </leafNode>      </children>    </node> @@ -49,19 +49,19 @@                  <properties>                    <help>Show external connection tracking cache entries</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command> +                <command>${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command>                  <children>                    <leafNode name="main">                      <properties>                        <help>Show external main connection tracking cache entries</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command> +                    <command>${vyos_op_scripts_dir}/conntrack_sync.py show_external_cache</command>                    </leafNode>                    <leafNode name="expect">                      <properties>                        <help>Show external expect connection tracking cache entries</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_external_expect</command> +                    <command>${vyos_op_scripts_dir}/conntrack_sync.py show_external_expect</command>                    </leafNode>                  </children>                </node> @@ -69,19 +69,19 @@                  <properties>                    <help>Show internal connection tracking cache entries</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command> +                <command>${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command>                  <children>                    <leafNode name="main">                      <properties>                        <help>Show internal main connection tracking cache entries</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command> +                    <command>${vyos_op_scripts_dir}/conntrack_sync.py show_internal_cache</command>                    </leafNode>                    <leafNode name="expect">                      <properties>                        <help>Show internal expect connection tracking cache entries</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_internal_expect</command> +                    <command>${vyos_op_scripts_dir}/conntrack_sync.py show_internal_expect</command>                    </leafNode>                  </children>                </node> @@ -91,13 +91,13 @@              <properties>                <help>Show connection syncing statistics</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_statistics</command> +            <command>${vyos_op_scripts_dir}/conntrack_sync.py show_statistics</command>            </leafNode>            <leafNode name="status">              <properties>                <help>Show conntrack-sync status</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/conntrack_sync.py show_status</command> +            <command>${vyos_op_scripts_dir}/conntrack_sync.py show_status</command>            </leafNode>          </children>        </node> diff --git a/op-mode-definitions/container.xml.in b/op-mode-definitions/container.xml.in index bb6f97b02..70ab4b6e5 100644 --- a/op-mode-definitions/container.xml.in +++ b/op-mode-definitions/container.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Pull a new image for container</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/container.py add_image --name "${4}"</command> +            <command>${vyos_op_scripts_dir}/container.py add_image --name "${4}"</command>            </tagNode>          </children>        </node> @@ -26,7 +26,7 @@              <path>container name</path>            </completionHelp>          </properties> -        <command>sudo podman exec --interactive --tty "$3" /bin/sh</command> +        <command>podman exec --interactive --tty "$3" /bin/sh</command>        </tagNode>      </children>    </node> @@ -42,10 +42,10 @@                <help>Delete container image</help>                <completionHelp>                  <list>all</list> -                <script>sudo podman image ls -q</script> +                <script>podman image ls -q</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/container.py delete_image --name "${4}"</command> +            <command>${vyos_op_scripts_dir}/container.py delete_image --name "${4}"</command>            </tagNode>          </children>        </node> @@ -70,7 +70,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo podman build --net host --layers --force-rm --tag "$4" $6</command> +                <command>podman build --net host --layers --force-rm --tag "$4" $6</command>                </tagNode>              </children>            </tagNode> @@ -89,7 +89,7 @@                  <path>container name</path>                </completionHelp>              </properties> -            <command>sudo podman logs --follow --names "$4"</command> +            <command>${vyos_op_scripts_dir}/container.py show_log --follow --name "$4"</command>            </tagNode>          </children>        </node> @@ -101,27 +101,27 @@          <properties>            <help>Show containers</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/container.py show_container</command> +        <command>${vyos_op_scripts_dir}/container.py show_container</command>          <children>            <node name="json">              <properties>                <help>Show containers in JSON format</help>              </properties>              <!-- no admin check --> -            <command>sudo ${vyos_op_scripts_dir}/container.py show_container --raw</command> +            <command>${vyos_op_scripts_dir}/container.py show_container --raw</command>            </node>            <node name="image">              <properties>                <help>Show container image</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/container.py show_image</command> +            <command>${vyos_op_scripts_dir}/container.py show_image</command>              <children>                <node name="json">                  <properties>                    <help>Show container image in JSON format</help>                  </properties>                  <!-- no admin check --> -                <command>sudo ${vyos_op_scripts_dir}/container.py show_image --raw</command> +                <command>${vyos_op_scripts_dir}/container.py show_image --raw</command>                </node>              </children>            </node> @@ -132,22 +132,21 @@                  <path>container name</path>                </completionHelp>              </properties> -            <!-- no admin check --> -            <command>sudo podman logs --names "$4"</command> +            <command>${vyos_op_scripts_dir}/container.py show_log --name "$4"</command>            </tagNode>            <node name="network">              <properties>                <help>Show available container networks</help>              </properties>              <!-- no admin check --> -            <command>sudo ${vyos_op_scripts_dir}/container.py show_network</command> +            <command>${vyos_op_scripts_dir}/container.py show_network</command>              <children>                <node name="json">                  <properties>                    <help>Show available container networks in JSON format</help>                  </properties>                  <!-- no admin check --> -                <command>sudo ${vyos_op_scripts_dir}/container.py show_network --raw</command> +                <command>${vyos_op_scripts_dir}/container.py show_network --raw</command>                </node>              </children>            </node> @@ -162,7 +161,7 @@                  <path>container name</path>                </completionHelp>              </properties> -            <command>sudo podman logs --names "$4"</command> +            <command>${vyos_op_scripts_dir}/container.py show_log --name "$4"</command>            </tagNode>          </children>        </node> @@ -177,7 +176,7 @@              <path>container name</path>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/container.py restart --name="$3"</command> +        <command>${vyos_op_scripts_dir}/container.py restart --name="$3"</command>        </tagNode>      </children>    </node> @@ -198,7 +197,7 @@                  <path>container name</path>                </completionHelp>              </properties> -            <command>if cli-shell-api existsActive container name "$4"; then sudo podman pull $(cli-shell-api returnActiveValue container name "$4" image); else echo "Container $4 does not exist"; fi</command> +            <command>if cli-shell-api existsActive container name "$4"; then podman pull $(cli-shell-api returnActiveValue container name "$4" image); else echo "Container $4 does not exist"; fi</command>            </tagNode>          </children>        </node> diff --git a/op-mode-definitions/crypt.xml.in b/op-mode-definitions/crypt.xml.in index 105592a1a..5a17cca12 100644 --- a/op-mode-definitions/crypt.xml.in +++ b/op-mode-definitions/crypt.xml.in @@ -9,19 +9,19 @@          <properties>            <help>Disable config encryption using TPM or recovery key</help>          </properties> -        <command>sudo ${vyos_libexec_dir}/vyos-config-encrypt.py --disable</command> +        <command>${vyos_libexec_dir}/vyos-config-encrypt.py --disable</command>        </node>        <node name="enable">          <properties>            <help>Enable config encryption using TPM</help>          </properties> -        <command>sudo ${vyos_libexec_dir}/vyos-config-encrypt.py --enable</command> +        <command>${vyos_libexec_dir}/vyos-config-encrypt.py --enable</command>        </node>        <node name="load">          <properties>            <help>Load encrypted config volume using TPM or recovery key</help>          </properties> -        <command>sudo ${vyos_libexec_dir}/vyos-config-encrypt.py --load</command> +        <command>${vyos_libexec_dir}/vyos-config-encrypt.py --load</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/date.xml.in b/op-mode-definitions/date.xml.in index 4e62a8335..90bddd7f3 100644 --- a/op-mode-definitions/date.xml.in +++ b/op-mode-definitions/date.xml.in @@ -35,7 +35,7 @@              <list><MMDDhhmm> <MMDDhhmmYY> <MMDDhhmmCCYY> <MMDDhhmmCCYY.ss></list>            </completionHelp>          </properties> -        <command>sudo bash -c "/bin/date '$3' && hwclock --systohc --localtime"</command> +        <command>bash -c "/bin/date '$3' && hwclock --systohc --localtime"</command>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 4ee66a90c..2da3bb5dc 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -171,7 +171,7 @@                  <properties>                    <help>Show DHCPv6 server leases</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/dhcp.py show_server_leases --family inet6</command> +                <command>${vyos_op_scripts_dir}/dhcp.py show_server_leases --family inet6</command>                  <children>                    <tagNode name="pool">                      <properties> @@ -262,13 +262,13 @@              <properties>                <help>Restart DHCP server</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dhcp</command> +            <command>${vyos_op_scripts_dir}/restart.py restart_service --name dhcp</command>            </node>            <node name="relay-agent">              <properties>                <help>Restart DHCP relay-agent</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4</command> +            <command>${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4</command>            </node>          </children>        </node> @@ -281,13 +281,13 @@              <properties>                <help>Restart DHCPv6 server</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dhcpv6</command> +            <command>${vyos_op_scripts_dir}/restart.py restart_service --name dhcpv6</command>            </node>            <node name="relay-agent">              <properties>                <help>Restart DHCPv6 relay-agent</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6</command> +            <command>${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6</command>            </node>          </children>        </node> @@ -310,7 +310,7 @@                  <script>${vyos_completion_dir}/list_interfaces</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/dhcp.py renew_client_lease --family inet --interface "$4"</command> +            <command>${vyos_op_scripts_dir}/dhcp.py renew_client_lease --family inet --interface "$4"</command>            </tagNode>          </children>        </node> @@ -326,7 +326,7 @@                  <script>${vyos_completion_dir}/list_interfaces</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/dhcp.py renew_client_lease --family inet6 --interface "$4"</command> +            <command>${vyos_op_scripts_dir}/dhcp.py renew_client_lease --family inet6 --interface "$4"</command>            </tagNode>          </children>        </node> @@ -349,7 +349,7 @@                  <script>${vyos_completion_dir}/list_interfaces</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/dhcp.py release_client_lease --family inet --interface "$4"</command> +            <command>${vyos_op_scripts_dir}/dhcp.py release_client_lease --family inet --interface "$4"</command>            </tagNode>          </children>        </node> @@ -365,7 +365,7 @@                  <script>${vyos_completion_dir}/list_interfaces</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/dhcp.py release_client_lease --family inet6 --interface "$4"</command> +            <command>${vyos_op_scripts_dir}/dhcp.py release_client_lease --family inet6 --interface "$4"</command>            </tagNode>          </children>        </node> diff --git a/op-mode-definitions/disconnect.xml.in b/op-mode-definitions/disconnect.xml.in index f0523d9b9..7891a6488 100644 --- a/op-mode-definitions/disconnect.xml.in +++ b/op-mode-definitions/disconnect.xml.in @@ -14,7 +14,7 @@              <path>interfaces wwan</path>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --disconnect --interface "$3"</command> +        <command>${vyos_op_scripts_dir}/connect_disconnect.py --disconnect --interface "$3"</command>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/disks.xml.in b/op-mode-definitions/disks.xml.in index 8a1e2c86f..e3ffe8da9 100644 --- a/op-mode-definitions/disks.xml.in +++ b/op-mode-definitions/disks.xml.in @@ -19,7 +19,7 @@                  <properties>                    <help>Format this disk the same as another disk</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/format_disk.py --by-id --target $4 --proto $6</command> +                <command>${vyos_op_scripts_dir}/format_disk.py --by-id --target $4 --proto $6</command>                </tagNode>              </children>            </tagNode> @@ -40,7 +40,7 @@                  <script>${vyos_completion_dir}/list_disks.py --exclude ${COMP_WORDS[2]}</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/format_disk.py --target $3 --proto $5</command> +            <command>${vyos_op_scripts_dir}/format_disk.py --target $3 --proto $5</command>            </tagNode>          </children>        </tagNode> diff --git a/op-mode-definitions/dns-dynamic.xml.in b/op-mode-definitions/dns-dynamic.xml.in index ef0f03988..1a1176835 100644 --- a/op-mode-definitions/dns-dynamic.xml.in +++ b/op-mode-definitions/dns-dynamic.xml.in @@ -16,7 +16,7 @@                  <properties>                    <help>Clear Dynamic DNS information cache (ddclient)</help>                  </properties> -                <command>sudo rm -f /run/ddclient/ddclient.cache</command> +                <command>rm -f /run/ddclient/ddclient.cache</command>                </leafNode>              </children>            </node> @@ -78,7 +78,7 @@                  <properties>                    <help>Show Dynamic DNS status</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/dns.py show_dynamic_status</command> +                <command>${vyos_op_scripts_dir}/dns.py show_dynamic_status</command>                </leafNode>              </children>            </node> @@ -97,7 +97,7 @@              <properties>                <help>Restart Dynamic DNS service</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dns_dynamic</command> +            <command>${vyos_op_scripts_dir}/restart.py restart_service --name dns_dynamic</command>            </node>          </children>        </node> @@ -114,7 +114,7 @@              <properties>                <help>Reset Dynamic DNS information</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/dns.py reset_dynamic</command> +            <command>${vyos_op_scripts_dir}/dns.py reset_dynamic</command>            </node>          </children>        </node> diff --git a/op-mode-definitions/dns-forwarding.xml.in b/op-mode-definitions/dns-forwarding.xml.in index fac3fc345..d25be6009 100644 --- a/op-mode-definitions/dns-forwarding.xml.in +++ b/op-mode-definitions/dns-forwarding.xml.in @@ -54,7 +54,7 @@                  <properties>                    <help>Show DNS Forwarding statistics</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/dns.py show_forwarding_statistics</command> +                <command>${vyos_op_scripts_dir}/dns.py show_forwarding_statistics</command>                </leafNode>              </children>            </node> @@ -73,7 +73,7 @@              <properties>                <help>Restart DNS Forwarding service</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dns_forwarding</command> +            <command>${vyos_op_scripts_dir}/restart.py restart_service --name dns_forwarding</command>            </leafNode>          </children>        </node> @@ -92,13 +92,13 @@              </properties>              <children>                <tagNode name="domain"> -                <command>sudo ${vyos_op_scripts_dir}/dns.py reset_forwarding --domain $5</command> +                <command>${vyos_op_scripts_dir}/dns.py reset_forwarding --domain $5</command>                  <properties>                    <help>Reset DNS Forwarding cache for a domain</help>                  </properties>                </tagNode>                <leafNode name="all"> -                <command>sudo ${vyos_op_scripts_dir}/dns.py reset_forwarding --all</command> +                <command>${vyos_op_scripts_dir}/dns.py reset_forwarding --all</command>                  <properties>                    <help>Reset DNS Forwarding cache for all domains</help>                  </properties> diff --git a/op-mode-definitions/execute-port-scan.xml.in b/op-mode-definitions/execute-port-scan.xml.in index 52cdab5f0..45221cb4c 100644 --- a/op-mode-definitions/execute-port-scan.xml.in +++ b/op-mode-definitions/execute-port-scan.xml.in @@ -16,7 +16,7 @@              </properties>              <command>nmap -p- -T4 --max-retries=1 --host-timeout=30s "$4"</command>              <children> -              <leafNode name="node.tag"> +              <virtualTagNode>                  <properties>                    <help>Port scan options</help>                    <completionHelp> @@ -24,7 +24,7 @@                    </completionHelp>                  </properties>                  <command>${vyos_op_scripts_dir}/execute_port-scan.py "${@:4}"</command> -              </leafNode> +              </virtualTagNode>              </children>            </tagNode>          </children> diff --git a/op-mode-definitions/execute-shell.xml.in b/op-mode-definitions/execute-shell.xml.in index dfdc1e371..241935607 100644 --- a/op-mode-definitions/execute-shell.xml.in +++ b/op-mode-definitions/execute-shell.xml.in @@ -14,7 +14,7 @@                  <path>netns name</path>                </completionHelp>              </properties> -            <command>sudo ip netns exec $4 su - $(whoami)</command> +            <command>ip netns exec $4 su - $(whoami)</command>            </tagNode>            <tagNode name="vrf">              <properties> @@ -23,7 +23,7 @@                  <path>vrf name</path>                </completionHelp>              </properties> -            <command>sudo ip vrf exec $4 su - $(whoami)</command> +            <command>ip vrf exec $4 su - $(whoami)</command>            </tagNode>          </children>        </node> diff --git a/op-mode-definitions/file.xml.in b/op-mode-definitions/file.xml.in index 549b9ad92..23c92f2b3 100644 --- a/op-mode-definitions/file.xml.in +++ b/op-mode-definitions/file.xml.in @@ -7,7 +7,7 @@            <help>Show the contents of a file, a directory or an image</help>            <completionHelp><imagePath/></completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/file.py --show $3</command> +        <command>${vyos_op_scripts_dir}/file.py --show $3</command>        </tagNode>      </children>    </node> @@ -27,7 +27,7 @@                <help>Destination path</help>                <completionHelp><imagePath/></completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/file.py --copy $3 $5 +            <command>${vyos_op_scripts_dir}/file.py --copy $3 $5              </command>            </tagNode>          </children> @@ -44,7 +44,7 @@            <help>Delete a local file, possibly from an image</help>            <completionHelp><imagePath/></completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/file.py --delete $3</command> +        <command>${vyos_op_scripts_dir}/file.py --delete $3</command>        </tagNode>      </children>    </node> @@ -65,7 +65,7 @@                  <script>${vyos_completion_dir}/list_images.py --no-running</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/file.py --clone $4</command> +            <command>${vyos_op_scripts_dir}/file.py --clone $4</command>              <children>                <tagNode name="from">                  <properties> @@ -75,7 +75,7 @@                      <script>${vyos_completion_dir}/list_images.py</script>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/file.py --clone-from $6 $4</command> +                <command>${vyos_op_scripts_dir}/file.py --clone-from $6 $4</command>                </tagNode>              </children>            </tagNode> diff --git a/op-mode-definitions/firewall.xml.in b/op-mode-definitions/firewall.xml.in index 21159eb1b..549935de9 100755 --- a/op-mode-definitions/firewall.xml.in +++ b/op-mode-definitions/firewall.xml.in @@ -7,43 +7,43 @@            <help>Show firewall information</help>          </properties>          <children> -          <tagNode name="group"> +          <node name="group">              <properties>                <help>Show firewall group</help> -              <completionHelp> -                <path>firewall group address-group</path> -                <path>firewall group network-group</path> -                <path>firewall group port-group</path> -                <path>firewall group domain-group</path> -                <path>firewall group dynamic-group address-group</path> -                <path>firewall group dynamic-group ipv6-address-group</path> -                <path>firewall group interface-group</path> -                <path>firewall group ipv6-address-group</path> -                <path>firewall group ipv6-network-group</path> -                <path>firewall group mac-group</path> -                <path>firewall group network-group</path> -                <path>firewall group port-group</path> -                <path>firewall group remote-group</path> -              </completionHelp>              </properties>              <children> -              <leafNode name="detail"> +              <virtualTagNode>                  <properties> -                  <help>Show list view of firewall groups</help> +                  <help>Show firewall group</help>                    <completionHelp> -                    <path>firewall group detail</path> +                    <path>firewall group address-group</path> +                    <path>firewall group network-group</path> +                    <path>firewall group port-group</path> +                    <path>firewall group domain-group</path> +                    <path>firewall group dynamic-group address-group</path> +                    <path>firewall group dynamic-group ipv6-address-group</path> +                    <path>firewall group interface-group</path> +                    <path>firewall group ipv6-address-group</path> +                    <path>firewall group ipv6-network-group</path> +                    <path>firewall group mac-group</path> +                    <path>firewall group network-group</path> +                    <path>firewall group port-group</path> +                    <path>firewall group remote-group</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_group --name $4 --detail $5</command> -              </leafNode> -            </children> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_group --name $4</command> -          </tagNode> -          <node name="group"> -            <properties> -              <help>Show firewall group</help> -            </properties> -            <children> +                <children> +                  <leafNode name="detail"> +                    <properties> +                      <help>Show list view of firewall groups</help> +                      <completionHelp> +                        <path>firewall group detail</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4 --detail $5</command> +                  </leafNode> +                </children> +                <command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4</command> +              </virtualTagNode>                <leafNode name="detail">                  <properties>                    <help>Show list view of firewall group</help> @@ -51,10 +51,10 @@                      <path>firewall group detail</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_group --detail $4</command> +                <command>${vyos_op_scripts_dir}/firewall.py --action show_group --detail $4</command>                </leafNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_group</command> +            <command>${vyos_op_scripts_dir}/firewall.py --action show_group</command>            </node>            <node name="bridge">              <properties> @@ -78,7 +78,7 @@                              <path>firewall bridge forward filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -95,13 +95,13 @@                                  <path>firewall bridge forward filter detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -122,7 +122,7 @@                              <path>firewall bridge input filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -139,13 +139,13 @@                                  <path>firewall bridge input filter detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -166,7 +166,7 @@                              <path>firewall bridge output filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -183,13 +183,13 @@                                  <path>firewall bridge output filter detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -210,7 +210,7 @@                              <path>firewall bridge prerouting filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -227,13 +227,13 @@                                  <path>firewall bridge prerouting filter detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -252,7 +252,7 @@                          <path>firewall bridge name detail</path>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                    </leafNode>                    <tagNode name="rule">                      <properties> @@ -269,16 +269,16 @@                              <path>firewall bridge name ${COMP_WORDS[4]} rule detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                        </leafNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command> +            <command>${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command>            </node>            <node name="ipv6">              <properties> @@ -302,7 +302,7 @@                              <path>firewall ipv6 forward filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -319,13 +319,13 @@                                  <path>firewall ipv6 forward filter rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -346,7 +346,7 @@                              <path>firewall ipv6 input filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -363,13 +363,13 @@                                  <path>firewall ipv6 input filter rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -390,7 +390,7 @@                              <path>firewall ipv6 output filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -407,13 +407,13 @@                                  <path>firewall ipv6 output filter rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -434,7 +434,7 @@                              <path>firewall ipv6 prerouting raw detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -451,13 +451,13 @@                                  <path>firewall ipv6 prerouting raw rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -476,7 +476,7 @@                          <path>firewall ipv6 name detail</path>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                    </leafNode>                    <tagNode name="rule">                      <properties> @@ -493,16 +493,16 @@                              <path>firewall ipv6 name ${COMP_WORDS[4]} rule detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                        </leafNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command> +            <command>${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command>            </node>            <node name="ipv4">              <properties> @@ -526,7 +526,7 @@                              <path>firewall ipv4 forward filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -543,13 +543,13 @@                                  <path>firewall ipv4 forward filter rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -570,7 +570,7 @@                              <path>firewall ipv4 input filter detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -587,13 +587,13 @@                                  <path>firewall ipv4 input filter rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -614,7 +614,7 @@                              <path>firewall ipv4 input output detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -631,13 +631,13 @@                                  <path>firewall ipv4 input output rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -658,7 +658,7 @@                              <path>firewall ipv4 prerouting raw detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                        </leafNode>                        <tagNode name="rule">                          <properties> @@ -675,13 +675,13 @@                                  <path>firewall ipv4 prerouting raw rule detail</path>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                            <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                            </leafNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                    </node>                  </children>                </node> @@ -700,7 +700,7 @@                          <path>firewall ipv4 name detail</path>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --detail $6</command>                    </leafNode>                    <tagNode name="rule">                      <properties> @@ -717,16 +717,16 @@                              <path>firewall ipv4 name ${COMP_WORDS[4]} rule detail</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> +                        <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command>                        </leafNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command> +                    <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command> +                <command>${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5</command>                </tagNode>              </children> -          <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command> +          <command>${vyos_op_scripts_dir}/firewall.py --action show_family --family $3</command>            </node>            <node name="statistics">              <properties> @@ -740,16 +740,16 @@                      <path>firewall statistics detail</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_statistics --detail $4</command> +                <command>${vyos_op_scripts_dir}/firewall.py --action show_statistics --detail $4</command>                </leafNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_statistics</command> +            <command>${vyos_op_scripts_dir}/firewall.py --action show_statistics</command>            </node>            <leafNode name="summary">              <properties>                <help>Show summary of firewall application</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_summary</command> +            <command>${vyos_op_scripts_dir}/firewall.py --action show_summary</command>            </leafNode>            <node name="zone-policy">              <properties> @@ -763,13 +763,13 @@                      <path>firewall zone</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/zone.py show --zone $5</command> +                <command>${vyos_op_scripts_dir}/zone.py show --zone $5</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/zone.py show</command> +            <command>${vyos_op_scripts_dir}/zone.py show</command>            </node>          </children> -        <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show_all</command> +        <command>${vyos_op_scripts_dir}/firewall.py --action show_all</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/flow-accounting-op.xml.in b/op-mode-definitions/flow-accounting-op.xml.in index 46dc77d05..01686f0aa 100644 --- a/op-mode-definitions/flow-accounting-op.xml.in +++ b/op-mode-definitions/flow-accounting-op.xml.in @@ -57,7 +57,7 @@          <properties>            <help>Restart (net)flow accounting process</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/flow_accounting_op.py --action restart</command> +        <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action restart</command>        </leafNode>      </children>    </node> diff --git a/op-mode-definitions/force-arp.xml.in b/op-mode-definitions/force-arp.xml.in index 05aa04e6b..368a08ac4 100644 --- a/op-mode-definitions/force-arp.xml.in +++ b/op-mode-definitions/force-arp.xml.in @@ -27,13 +27,13 @@                      <properties>                        <help>Send gratuitous ARP reply for specified address</help>                      </properties> -                    <command>sudo /usr/bin/arping -I $5 -c 1 -A $7</command> +                    <command>/usr/bin/arping -I $5 -c 1 -A $7</command>                      <children>                        <tagNode name="count">                          <properties>                            <help>Send specified number of ARP replies</help>                          </properties> -                        <command>sudo /usr/bin/arping -I $5 -c $9 -A $7</command> +                        <command>/usr/bin/arping -I $5 -c $9 -A $7</command>                        </tagNode>                      </children>                    </tagNode> @@ -58,13 +58,13 @@                      <properties>                        <help>Send gratuitous ARP request for specified address</help>                      </properties> -                    <command>sudo /usr/bin/arping -I $5 -c 1 -U $7</command> +                    <command>/usr/bin/arping -I $5 -c 1 -U $7</command>                      <children>                        <tagNode name="count">                          <properties>                            <help>Send specified number of ARP requests</help>                          </properties> -                        <command>sudo /usr/bin/arping -I $5 -c $9 -U $7</command> +                        <command>/usr/bin/arping -I $5 -c $9 -U $7</command>                        </tagNode>                      </children>                    </tagNode> @@ -89,7 +89,7 @@                      <properties>                        <help>Send ARP for DAD detection for specified address</help>                      </properties> -                    <command>sudo /usr/bin/arping -I $5 -c 1 -D $7</command> +                    <command>/usr/bin/arping -I $5 -c 1 -D $7</command>                    </tagNode>                  </children>                </tagNode> diff --git a/op-mode-definitions/force-root-partition-auto-resize.xml.in b/op-mode-definitions/force-root-partition-auto-resize.xml.in index f84c073b8..dc58a331d 100644 --- a/op-mode-definitions/force-root-partition-auto-resize.xml.in +++ b/op-mode-definitions/force-root-partition-auto-resize.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Resize the VyOS partition</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/force_root-partition-auto-resize.sh</command> +        <command>${vyos_op_scripts_dir}/force_root-partition-auto-resize.sh</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/generate-ipsec-debug-archive.xml.in b/op-mode-definitions/generate-ipsec-debug-archive.xml.in index a9ce113d1..dcbed0c42 100644 --- a/op-mode-definitions/generate-ipsec-debug-archive.xml.in +++ b/op-mode-definitions/generate-ipsec-debug-archive.xml.in @@ -8,7 +8,7 @@              <properties>                <help>Generate IPSec debug-archive</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/generate_ipsec_debug_archive.py</command> +            <command>${vyos_op_scripts_dir}/generate_ipsec_debug_archive.py</command>            </node>          </children>        </node> diff --git a/op-mode-definitions/generate-ipsec-profile.xml.in b/op-mode-definitions/generate-ipsec-profile.xml.in index afa299da2..b7203d7d1 100644 --- a/op-mode-definitions/generate-ipsec-profile.xml.in +++ b/op-mode-definitions/generate-ipsec-profile.xml.in @@ -28,7 +28,7 @@                          <script>${vyos_completion_dir}/list_local_ips.sh --both</script>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7"</command> +                    <command>${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7"</command>                      <children>                        <tagNode name="name">                          <properties> @@ -37,7 +37,7 @@                              <list><name></list>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --name "$9"</command> +                        <command>${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --name "$9"</command>                          <children>                            <tagNode name="profile">                              <properties> @@ -46,7 +46,7 @@                                  <list><name></list>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --name "$9" --profile "${11}"</command> +                            <command>${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --name "$9" --profile "${11}"</command>                            </tagNode>                          </children>                        </tagNode> @@ -57,7 +57,7 @@                              <list><name></list>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --profile "$9"</command> +                        <command>${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --profile "$9"</command>                          <children>                            <tagNode name="name">                              <properties> @@ -66,7 +66,7 @@                                  <list><name></list>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --profile "$9" --name "${11}"</command> +                            <command>${vyos_op_scripts_dir}/ikev2_profile_generator.py --os ios --connection "$5" --remote "$7" --profile "$9" --name "${11}"</command>                            </tagNode>                          </children>                        </tagNode> diff --git a/op-mode-definitions/generate-openconnect-user-key.xml.in b/op-mode-definitions/generate-openconnect-user-key.xml.in index 80cdfb3d7..8a75b09dc 100644 --- a/op-mode-definitions/generate-openconnect-user-key.xml.in +++ b/op-mode-definitions/generate-openconnect-user-key.xml.in @@ -24,19 +24,19 @@                      <properties>                        <help>HOTP time-based token</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits 6</command> +                    <command>${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits 6</command>                      <children>                        <tagNode name="interval">                          <properties>                            <help>Duration of single time interval</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits 6</command> +                        <command>${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits 6</command>                          <children>                            <tagNode name="digits">                              <properties>                                <help>The number of digits in the one-time password</help>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits "${10}"</command> +                            <command>${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "$8" --digits "${10}"</command>                            </tagNode>                          </children>                        </tagNode> @@ -44,13 +44,13 @@                          <properties>                            <help>The number of digits in the one-time password</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits "$8"</command> +                        <command>${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval 30 --digits "$8"</command>                          <children>                            <tagNode name="interval">                              <properties>                                <help>Duration of single time interval</help>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "${10}" --digits $8</command> +                            <command>${vyos_op_scripts_dir}/generate_openconnect_otp_key.py --username "$4" --interval "${10}" --digits $8</command>                            </tagNode>                          </children>                        </tagNode> diff --git a/op-mode-definitions/generate-openvpn-config-client.xml.in b/op-mode-definitions/generate-openvpn-config-client.xml.in index fc8bfa346..351742f1e 100644 --- a/op-mode-definitions/generate-openvpn-config-client.xml.in +++ b/op-mode-definitions/generate-openvpn-config-client.xml.in @@ -40,10 +40,10 @@                              <properties>                                <help>Certificate key used by client</help>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9" --key "${11}"</command> +                            <command>${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9" --key "${11}"</command>                            </tagNode>                          </children> -                        <command>sudo ${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9"</command> +                        <command>${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9"</command>                        </tagNode>                      </children>                    </tagNode> diff --git a/op-mode-definitions/generate-ssh-server-key.xml.in b/op-mode-definitions/generate-ssh-server-key.xml.in index ecea3e5d1..86bb1b1bd 100644 --- a/op-mode-definitions/generate-ssh-server-key.xml.in +++ b/op-mode-definitions/generate-ssh-server-key.xml.in @@ -14,7 +14,7 @@              <properties>                <help>Re-generate SSH host keys and restart SSH server</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/generate_ssh_server_key.py</command> +            <command>${vyos_op_scripts_dir}/generate_ssh_server_key.py</command>            </node>            <tagNode name="client-key">              <properties> diff --git a/op-mode-definitions/generate-system-login-user.xml.in b/op-mode-definitions/generate-system-login-user.xml.in index 6f65c12b3..b93cb8beb 100644 --- a/op-mode-definitions/generate-system-login-user.xml.in +++ b/op-mode-definitions/generate-system-login-user.xml.in @@ -29,25 +29,25 @@                          <properties>                            <help>HOTP time-based token</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5"</command> +                        <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5"</command>                          <children>                            <tagNode name="rate-limit">                              <properties>                                <help>Duration of single time interval</help>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9"</command> +                            <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9"</command>                              <children>                                <tagNode name="rate-time">                                  <properties>                                    <help>The number of digits in the one-time password</help>                                  </properties> -                                <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" </command> +                                <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" </command>                                  <children>                                    <tagNode name="window-size">                                      <properties>                                        <help>The number of digits in the one-time password</help>                                      </properties> -                                    <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" --window_size "${13}"</command> +                                    <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "$9" --rate_time "${11}" --window_size "${13}"</command>                                    </tagNode>                                  </children>                                </tagNode> @@ -57,19 +57,19 @@                              <properties>                                <help>The number of digits in the one-time password</help>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --window_size "${9}"</command> +                            <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --window_size "${9}"</command>                              <children>                                <tagNode name="rate-limit">                                  <properties>                                    <help>Duration of single time interval</help>                                  </properties> -                                <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --window_size "${9}"</command> +                                <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --window_size "${9}"</command>                                  <children>                                    <tagNode name="rate-time">                                      <properties>                                        <help>Duration of single time interval</help>                                      </properties> -                                    <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --rate_time "${13}" --window_size "${9}"</command> +                                    <command>${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate_limit "${11}" --rate_time "${13}" --window_size "${9}"</command>                                    </tagNode>                                  </children>                                </tagNode> diff --git a/op-mode-definitions/generate-wireguard.xml.in b/op-mode-definitions/generate-wireguard.xml.in index 5f2463d1a..0375e6324 100644 --- a/op-mode-definitions/generate-wireguard.xml.in +++ b/op-mode-definitions/generate-wireguard.xml.in @@ -31,7 +31,7 @@                          <list><hostname></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8"</command> +                    <command>${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8"</command>                      <children>                        <tagNode name="address">                          <properties> @@ -40,7 +40,7 @@                              <list><x.x.x.x> <h:h:h:h:h:h:h:h></list>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8" --address "${10}"</command> +                        <command>${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8" --address "${10}"</command>                          <children>                            <tagNode name="address">                              <properties> @@ -49,7 +49,7 @@                                  <list><x.x.x.x> <h:h:h:h:h:h:h:h></list>                                </completionHelp>                              </properties> -                            <command>sudo ${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8" --address "${10}" --address "${12}"</command> +                            <command>${vyos_op_scripts_dir}/wireguard_client.py --name "$4" --interface "$6" --server "$8" --address "${10}" --address "${12}"</command>                            </tagNode>                          </children>                        </tagNode> diff --git a/op-mode-definitions/generate_tech-support_archive.xml.in b/op-mode-definitions/generate_tech-support_archive.xml.in index fc664eb90..939b3dec4 100644 --- a/op-mode-definitions/generate_tech-support_archive.xml.in +++ b/op-mode-definitions/generate_tech-support_archive.xml.in @@ -7,20 +7,31 @@            <help>Generate tech support info</help>          </properties>          <children> -          <node name="archive"> +          <tagNode name="archive">              <properties> -              <help>Generate tech support archive</help> +              <help>Generate tech support archive to defined location</help> +              <completionHelp> +                <list> <file> <scp://user:passwd@host> <ftp://user:passwd@host></list> +              </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/tech_support.py show --raw | gzip> $4.json.gz</command> -          </node> -          <tagNode name="archive"> +            <command>${vyos_op_scripts_dir}/generate_tech-support_archive.py $4</command> +            <standalone> +              <help>Generate tech support archive</help> +              <command>${vyos_op_scripts_dir}/generate_tech-support_archive.py</command> +            </standalone> +          </tagNode> +          <tagNode name="machine-readable-archive">              <properties>                <help>Generate tech support archive to defined location</help>                <completionHelp>                  <list> <file> </list>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/tech_support.py show --raw | gzip > $4.json.gz</command> +            <command>${vyos_op_scripts_dir}/tech_support.py show --raw | gzip > $4.json.gz</command> +            <standalone> +              <help>Generate a machine-readable tech support archive</help> +              <command>${vyos_op_scripts_dir}/tech_support.py show --raw | gzip> $4.json.gz</command> +            </standalone>            </tagNode>          </children>        </node> diff --git a/op-mode-definitions/geoip.xml.in b/op-mode-definitions/geoip.xml.in index c1b6e87b9..66ebfccca 100644 --- a/op-mode-definitions/geoip.xml.in +++ b/op-mode-definitions/geoip.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Update GeoIP database and firewall sets</help>          </properties> -        <command>sudo ${vyos_libexec_dir}/geoip-update.py --force</command> +        <command>${vyos_libexec_dir}/geoip-update.py --force</command>        </leafNode>      </children>    </node> diff --git a/op-mode-definitions/igmp-proxy.xml.in b/op-mode-definitions/igmp-proxy.xml.in index d6ad7ed7e..699d94b3b 100644 --- a/op-mode-definitions/igmp-proxy.xml.in +++ b/op-mode-definitions/igmp-proxy.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart the IGMP proxy process</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name igmp_proxy</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name igmp_proxy</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/include/bgp/advertised-routes.xml.i b/op-mode-definitions/include/bgp/advertised-routes.xml.i new file mode 100644 index 000000000..cc3f1f9b5 --- /dev/null +++ b/op-mode-definitions/include/bgp/advertised-routes.xml.i @@ -0,0 +1,12 @@ +<!-- included start from bgp/advertised-routes.xml.i --> +<node name="advertised-routes"> +  <properties> +    <help>Show routes advertised to a BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  <children> +    #include <include/vtysh-generic-detail-wide.xml.i> +    #include <include/vtysh-generic-wide.xml.i> +  </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/afi-common.xml.i b/op-mode-definitions/include/bgp/afi-common.xml.i index acf20d950..e5a72f3b1 100644 --- a/op-mode-definitions/include/bgp/afi-common.xml.i +++ b/op-mode-definitions/include/bgp/afi-common.xml.i @@ -1,28 +1,4 @@  <!-- included start from bgp/afi-common.xml.i --> -<tagNode name="community"> -  <properties> -    <help>Community number where AA and NN are (0-65535)</help> -    <completionHelp> -      <list>AA:NN</list> -    </completionHelp> -  </properties> -  <children> -    #include <include/bgp/exact-match.xml.i> -  </children> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode> -<tagNode name="large-community"> -  <properties> -    <help>Display routes matching the large-communities</help> -    <completionHelp> -      <list>AA:BB:CC</list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -  <children> -    #include <include/bgp/exact-match.xml.i> -  </children> -</tagNode>  <tagNode name="large-community-list">    <properties>      <help>Display routes matching the large-community-list</help> diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i index 820d507fd..86cd27517 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i @@ -4,6 +4,18 @@      <help>Display routes matching the community</help>    </properties>    <children> +    <virtualTagNode> +      <properties> +        <help>Community number where AA and NN are (0-65535)</help> +        <completionHelp> +          <list>AA:NN</list> +        </completionHelp> +      </properties> +      <children> +        #include <include/bgp/exact-match.xml.i> +      </children> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      <leafNode name="accept-own">        <properties>          <help>Should accept local VPN route if exported and imported into different VRF (well-known community)</help> @@ -142,13 +154,21 @@      <help>Show BGP routes matching the specified large-communities</help>    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  <children> +    <virtualTagNode> +      <properties> +        <help>Display routes matching the large-communities</help> +        <completionHelp> +          <list>AA:BB:CC</list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +      <children> +        #include <include/bgp/exact-match.xml.i> +      </children> +    </virtualTagNode> +  </children>  </node> -<leafNode name="neighbors"> -  <properties> -    <help>Detailed information on TCP and BGP neighbor connections</help> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</leafNode>  <tagNode name="neighbors">    <properties>      <help>Show BGP information for specified neighbor</help> @@ -156,63 +176,20 @@        <script>vtysh -c "$(IFS=$' '; echo "${COMP_WORDS[@]:0:${#COMP_WORDS[@]}-2} summary")" |  awk '/^[0-9a-f]/ {print $1}'</script>      </completionHelp>    </properties> +  <standalone> +    <help>Detailed information on TCP and BGP neighbor connections</help> +    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  </standalone>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> -    <leafNode name="advertised-routes"> -      <properties> -        <help>Show routes advertised to a BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <leafNode name="dampened-routes"> -      <properties> -        <help>Show dampened routes received from BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <leafNode name="flap-statistics"> -      <properties> -        <help>Show flap statistics of the routes learned from BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <leafNode name="prefix-counts"> -      <properties> -        <help>Show detailed prefix count information for BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <node name="received"> -      <properties> -        <help>Show information received from BGP neighbor</help> -      </properties> -      <children> -        <leafNode name="prefix-filter"> -          <properties> -            <help>Show prefixlist filter</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode> -      </children> -    </node> -    <leafNode name="filtered-routes"> -      <properties> -        <help>Show filtered routes from BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <leafNode name="received-routes"> -      <properties> -        <help>Show received routes from BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    <leafNode name="routes"> -      <properties> -        <help>Show routes learned from BGP neighbor</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> +    #include <include/bgp/advertised-routes.xml.i> +    #include <include/bgp/dampened-routes.xml.i> +    #include <include/bgp/filtered-routes.xml.i> +    #include <include/bgp/flap-statistics.xml.i> +    #include <include/bgp/prefix-counts.xml.i> +    #include <include/bgp/received.xml.i> +    #include <include/bgp/received-routes.xml.i> +    #include <include/bgp/routes.xml.i>    </children>  </tagNode>  <tagNode name="prefix-list"> diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-flowspec.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-flowspec.xml.i index 34228fdd1..996e2bd3d 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-flowspec.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-flowspec.xml.i @@ -1,16 +1,4 @@  <!-- included start from bgp/afi-ipv4-ipv6-flowspec.xml.i --> -<tagNode name="flowspec"> -  <properties> -    <help>Network in the BGP routing table to display</help> -    <completionHelp> -      <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -    </completionHelp> -  </properties> -  <children> -    #include <include/bgp/prefix-bestpath-multipath.xml.i> -  </children> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="flowspec">    <properties>      <help>Flowspec Address Family modifier</help> @@ -19,6 +7,18 @@      #include <include/bgp/afi-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-common.xml.i>      #include <include/vtysh-generic-detail.xml.i> +    <virtualTagNode> +      <properties> +        <help>Network in the BGP routing table to display</help> +        <completionHelp> +          <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +        </completionHelp> +      </properties> +      <children> +        #include <include/bgp/prefix-bestpath-multipath.xml.i> +      </children> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i index bb95ce3f5..493207f5e 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i @@ -8,7 +8,7 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> -    <tagNode name=""> +    <virtualTagNode>        <properties>          <help>Show IP routes of specified prefix</help>          <completionHelp> @@ -16,7 +16,7 @@          </completionHelp>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </tagNode> +    </virtualTagNode>    </children>  </tagNode>  <!-- included end --> diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn.xml.i index a9fb6e255..f106b8725 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn.xml.i @@ -1,16 +1,4 @@  <!-- included start from bgp/afi-ipv4-ipv6-vpn.xml.i --> -<tagNode name="vpn"> -  <properties> -    <help>Network in the BGP routing table to display</help> -    <completionHelp> -      <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -    </completionHelp> -  </properties> -  <children> -    #include <include/bgp/prefix-bestpath-multipath.xml.i> -  </children> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="vpn">    <properties>      <help>VPN Address Family modifier</help> @@ -19,6 +7,18 @@      #include <include/bgp/afi-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i> +    <virtualTagNode> +      <properties> +        <help>Network in the BGP routing table to display</help> +        <completionHelp> +          <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +        </completionHelp> +      </properties> +      <children> +        #include <include/bgp/prefix-bestpath-multipath.xml.i> +      </children> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> diff --git a/op-mode-definitions/include/bgp/dampened-routes.xml.i b/op-mode-definitions/include/bgp/dampened-routes.xml.i new file mode 100644 index 000000000..073ca3325 --- /dev/null +++ b/op-mode-definitions/include/bgp/dampened-routes.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp/dampened-routes.xml.i --> +<leafNode name="dampened-routes"> +  <properties> +    <help>Show dampened routes received from BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</leafNode> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/filtered-routes.xml.i b/op-mode-definitions/include/bgp/filtered-routes.xml.i new file mode 100644 index 000000000..a33e8f28f --- /dev/null +++ b/op-mode-definitions/include/bgp/filtered-routes.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp/filtered-routes.xml.i --> +<leafNode name="filtered-routes"> +  <properties> +    <help>Show filtered routes from BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</leafNode> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/flap-statistics.xml.i b/op-mode-definitions/include/bgp/flap-statistics.xml.i new file mode 100644 index 000000000..93ac110e0 --- /dev/null +++ b/op-mode-definitions/include/bgp/flap-statistics.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp/flap-statistics.xml.i --> +<leafNode name="flap-statistics"> +  <properties> +    <help>Show flap statistics of the routes learned from BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</leafNode> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/next-hop.xml.i b/op-mode-definitions/include/bgp/next-hop.xml.i index 517a44888..23f07e135 100644 --- a/op-mode-definitions/include/bgp/next-hop.xml.i +++ b/op-mode-definitions/include/bgp/next-hop.xml.i @@ -5,19 +5,19 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> +    <virtualTagNode> +      <properties> +        <help>IPv4/IPv6 nexthop address</help> +        <completionHelp> +          <list><x.x.x.x> <h:h:h:h:h:h:h:h></list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +      <children> +        #include <include/vtysh-generic-detail.xml.i> +      </children> +    </virtualTagNode>      #include <include/vtysh-generic-detail.xml.i>    </children>  </node> -<tagNode name="nexthop"> -  <properties> -    <help>IPv4/IPv6 nexthop address</help> -    <completionHelp> -      <list><x.x.x.x> <h:h:h:h:h:h:h:h></list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -  <children> -    #include <include/vtysh-generic-detail.xml.i> -  </children> -</tagNode>  <!-- included end --> diff --git a/op-mode-definitions/include/bgp/prefix-counts.xml.i b/op-mode-definitions/include/bgp/prefix-counts.xml.i new file mode 100644 index 000000000..a7131ebeb --- /dev/null +++ b/op-mode-definitions/include/bgp/prefix-counts.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp/prefix-counts.xml.i --> +<leafNode name="prefix-counts"> +  <properties> +    <help>Show detailed prefix count information</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</leafNode> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/received-routes.xml.i b/op-mode-definitions/include/bgp/received-routes.xml.i new file mode 100644 index 000000000..55bed7c77 --- /dev/null +++ b/op-mode-definitions/include/bgp/received-routes.xml.i @@ -0,0 +1,12 @@ +<!-- included start from bgp/received-routes.xml.i --> +<node name="received-routes"> +  <properties> +    <help>Show received routes from a BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  <children> +    #include <include/vtysh-generic-detail-wide.xml.i> +    #include <include/vtysh-generic-wide.xml.i> +  </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/received.xml.i b/op-mode-definitions/include/bgp/received.xml.i new file mode 100644 index 000000000..bb8dc6981 --- /dev/null +++ b/op-mode-definitions/include/bgp/received.xml.i @@ -0,0 +1,16 @@ +<!-- included start from bgp/received.xml.i --> +<node name="received"> +  <properties> +    <help>Show information received from BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  <children> +    <leafNode name="prefix-filter"> +      <properties> +        <help>Show prefixlist filter</help> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </leafNode> +  </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/routes.xml.i b/op-mode-definitions/include/bgp/routes.xml.i new file mode 100644 index 000000000..248e8fc5c --- /dev/null +++ b/op-mode-definitions/include/bgp/routes.xml.i @@ -0,0 +1,8 @@ +<!-- included start from bgp/routes.xml.i --> +<leafNode name="routes"> +  <properties> +    <help>Show routes learned from BGP neighbor</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</leafNode> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/show-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-bgp-common.xml.i index d888bc3b0..0e488d65f 100644 --- a/op-mode-definitions/include/bgp/show-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-bgp-common.xml.i @@ -1,23 +1,23 @@  <!-- included start from bgp/show-bgp-common.xml.i -->  #include <include/bgp/afi-common.xml.i>  #include <include/bgp/afi-ipv4-ipv6-common.xml.i> -<tagNode name="ipv4"> -  <properties> -    <help>Network in the BGP routing table to display</help> -    <completionHelp> -      <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -    </completionHelp> -  </properties> -  <children> -    #include <include/bgp/prefix-bestpath-multipath.xml.i> -  </children> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="ipv4">    <properties>      <help>IPv4 Address Family</help>    </properties>    <children> +    <virtualTagNode> +      <properties> +        <help>Network in the BGP routing table to display</help> +        <completionHelp> +          <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +        </completionHelp> +      </properties> +      <children> +        #include <include/bgp/prefix-bestpath-multipath.xml.i> +      </children> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/bgp/afi-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-flowspec.xml.i> @@ -25,23 +25,23 @@    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> -<tagNode name="ipv6"> -  <properties> -    <help>Network in the BGP routing table to display</help> -    <completionHelp> -      <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -    </completionHelp> -  </properties> -  <children> -    #include <include/bgp/prefix-bestpath-multipath.xml.i> -  </children> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="ipv6">    <properties>      <help>IPv6 Address Family</help>    </properties>    <children> +    <virtualTagNode> +      <properties> +        <help>Network in the BGP routing table to display</help> +          <completionHelp> +          <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +        </completionHelp> +        </properties> +        <children> +          #include <include/bgp/prefix-bestpath-multipath.xml.i> +        </children> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/bgp/afi-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-common.xml.i>      #include <include/bgp/afi-ipv4-ipv6-vpn.xml.i> @@ -53,21 +53,21 @@      <help>Layer 2 Virtual Private Network</help>    </properties>    <children> -    <tagNode name="evpn"> -      <properties> -        <help>Network in the BGP routing table to display</help> -        <completionHelp> -          <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </tagNode>      <node name="evpn">        <properties>          <help>Ethernet Virtual Private Network</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> +        <virtualTagNode> +          <properties> +            <help>Network in the BGP routing table to display</help> +            <completionHelp> +              <list><x.x.x.x> <x.x.x.x/x> <h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +            </completionHelp> +          </properties> +          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +        </virtualTagNode>          #include <include/bgp/afi-common.xml.i>          <node name="all">            <properties> @@ -128,18 +128,8 @@            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>            <children> -            <leafNode name="advertised-routes"> -              <properties> -                <help>Show routes advertised to a BGP neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> -            <leafNode name="routes"> -              <properties> -                <help>Show routes learned from BGP neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> +            #include <include/bgp/advertised-routes.xml.i> +            #include <include/bgp/routes.xml.i>            </children>          </tagNode>          <leafNode name="next-hops"> @@ -198,13 +188,20 @@              #include <include/vni-tagnode-all.xml.i>            </children>          </node> -        #include <include/vni-tagnode.xml.i> -        <leafNode name="vni"> +        <tagNode name="vni">            <properties> -            <help>VXLAN network identifier (VNI)</help> +            <help>VXLAN network identifier (VNI) number</help> +            <completionHelp> +              <list><1-16777215></list> +              <script>${vyos_completion_dir}/list_vni.sh</script> +            </completionHelp>            </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode> +         <standalone> +           <help>VXLAN network identifier (VNI)</help> +           <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +         </standalone> +         <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> +        </tagNode>        </children>      </node>    </children> diff --git a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i index db9021f3e..bb62fd1bb 100644 --- a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i @@ -37,18 +37,21 @@        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <leafNode name="cidr-only"> +        <virtualTagNode>            <properties> -            <help>Display only routes with non-natural netmasks</help> +            <help>Show BGP information for specified IP address or prefix</help> +            <completionHelp> +              <list><x.x.x.x> <x.x.x.x/x></list> +            </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode> -        <node name="community"> +        </virtualTagNode> +        <leafNode name="cidr-only">            <properties> -            <help>Show BGP routes matching the communities</help> +            <help>Display only routes with non-natural netmasks</help>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </node> +        </leafNode>          <tagNode name="community">            <properties>              <help>Display routes matching the specified communities</help> @@ -56,6 +59,10 @@                <list><AA:NN> local-AS no-advertise no-export</list>              </completionHelp>            </properties> +          <standalone> +            <help>Show BGP routes matching the communities</help> +            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +          </standalone>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode>          <tagNode name="community-list"> @@ -81,36 +88,14 @@            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>            <children> -            <leafNode name="advertised-routes"> -              <properties> -                <help>Show routes advertised to a BGP neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> -            <leafNode name="prefix-counts"> -              <properties> -                <help>Show detailed prefix count information</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> -            <leafNode name="filtered-routes"> -              <properties> -                <help>Show the filtered routes from neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> -            <leafNode name="received-routes"> -              <properties> -                <help>Show the received routes from neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> -            <leafNode name="routes"> -              <properties> -                <help>Show routes learned from neighbor</help> -              </properties> -              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            </leafNode> +            #include <include/bgp/advertised-routes.xml.i> +            #include <include/bgp/dampened-routes.xml.i> +            #include <include/bgp/filtered-routes.xml.i> +            #include <include/bgp/flap-statistics.xml.i> +            #include <include/bgp/prefix-counts.xml.i> +            #include <include/bgp/received.xml.i> +            #include <include/bgp/received-routes.xml.i> +            #include <include/bgp/routes.xml.i>            </children>          </tagNode>          <leafNode name="paths"> @@ -145,15 +130,6 @@          </leafNode>        </children>      </node> -    <tagNode name="unicast"> -      <properties> -        <help>Show BGP information for specified IP address or prefix</help> -        <completionHelp> -          <list><x.x.x.x> <x.x.x.x/x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </tagNode>    </children>  </node>  <leafNode name="large-community-info"> diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 493a56633..cda46736d 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -4,19 +4,19 @@      <help>Show IS-IS link state database</help>    </properties>    <children> +    <virtualTagNode> +      <properties> +        <help>Show IS-IS link state database PDU</help> +        <completionHelp> +          <list>lsp-id detail</list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/vtysh-generic-detail.xml.i>    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> -<tagNode name="database"> -  <properties> -    <help>Show IS-IS link state database PDU</help> -    <completionHelp> -      <list>lsp-id detail</list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="fast-reroute">    <properties>      <help>Show IS-IS fast reroute/loop free alternate (lfa) information</help> @@ -59,10 +59,10 @@    </properties>    <children>      #include <include/vtysh-generic-detail.xml.i> +    #include <include/vtysh-generic-interface-virtualTagNode.xml.i>    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> -#include <include/vtysh-generic-interface-tagNode.xml.i>  <node name="mpls">    <properties>      <help>Show MPLS information</help> @@ -82,13 +82,19 @@        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>      </leafNode> -    <leafNode name="interface"> +    <tagNode name="interface">        <properties> -        <help>Show interface information</help> +        <help>Show information about specific interface</help> +        <completionHelp> +          <script>${vyos_completion_dir}/list_interfaces</script> +        </completionHelp>        </properties> +      <standalone> +        <help>Show interface information</help> +        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +      </standalone>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </leafNode> -    #include <include/vtysh-generic-interface-tagNode.xml.i> +    </tagNode>    </children>  </node>  <node name="neighbor"> @@ -96,19 +102,19 @@      <help>Show IS-IS neighbor adjacencies</help>    </properties>    <children> +    <virtualTagNode> +      <properties> +        <help>Show specific IS-IS neighbor adjacency </help> +        <completionHelp> +          <list>system-id</list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/vtysh-generic-detail.xml.i>    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> -<tagNode name="neighbor"> -  <properties> -    <help>Show specific IS-IS neighbor adjacency </help> -    <completionHelp> -      <list>system-id</list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="route">    <properties>      <help>Show IS-IS routing table</help> @@ -180,4 +186,4 @@    </children>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>  </node> -<!-- included end -->
\ No newline at end of file +<!-- included end --> diff --git a/op-mode-definitions/include/ospf/common.xml.i b/op-mode-definitions/include/ospf/common.xml.i index 684073cc5..1ffe246e4 100644 --- a/op-mode-definitions/include/ospf/common.xml.i +++ b/op-mode-definitions/include/ospf/common.xml.i @@ -17,106 +17,86 @@        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF ASBR summary database for given address of advertised router</help> +            <help>Show IPv4 OSPF ASBR summary database information of given address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF ASBR summary database for given address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="asbr-summary"> -      <properties> -        <help>Show IPv4 OSPF ASBR summary database information of given address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF ASBR summary database of given address for given advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show summary of self-originate IPv4 OSPF ASBR database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF ASBR summary database of given address for given advertised router</help> +            <help>Show IPv4 OSPF ASBR summary database for given address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show summary of self-originate IPv4 OSPF ASBR database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="external">        <properties>          <help>Show IPv4 OSPF external database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF external database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF external database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF external database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="external"> -      <properties> -        <help>Show IPv4 OSPF external database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF external database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF external database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF external database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF external database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF external database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <leafNode name="max-age">        <properties>          <help>Show IPv4 OSPF max-age database</help> @@ -129,318 +109,258 @@        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF network database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF network database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF network database for given address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="network"> -      <properties> -        <help>Show IPv4 OSPF network database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF network database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF network database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF network database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF network database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF network database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="nssa-external">        <properties>          <help>Show IPv4 OSPF NSSA external database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF NSSA external database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF NSSA external database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF NSSA external database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="nssa-external"> -      <properties> -        <help>Show IPv4 OSPF NSSA external database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF NSSA external database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF NSSA external database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF NSSA external database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF NSSA external database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF NSSA external database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="opaque-area">        <properties>          <help>Show IPv4 OSPF opaque-area database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF opaque-area database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF opaque-area database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF opaque-area database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="opaque-area"> -      <properties> -        <help>Show IPv4 OSPF opaque-area database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF opaque-area database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF opaque-area database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF opaque-area database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF opaque-area database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF opaque-area database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="opaque-as">        <properties>          <help>Show IPv4 OSPF opaque-as database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF opaque-as database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF opaque-as database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF opaque-as database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="opaque-as"> -      <properties> -        <help>Show IPv4 OSPF opaque-as database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF opaque-as database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF opaque-as database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF opaque-as database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF opaque-as database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF opaque-as database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="opaque-link">        <properties>          <help>Show IPv4 OSPF opaque-link database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF opaque-link database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF opaque-link database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF opaque-link database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="opaque-link"> -      <properties> -        <help>Show IPv4 OSPF opaque-link database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF opaque-link database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF opaque-link database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF opaque-link database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF opaque-link database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF opaque-link database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <node name="router">        <properties>          <help>Show IPv4 OSPF router database</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF router database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF router database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF router database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="router"> -      <properties> -        <help>Show IPv4 OSPF router database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF router database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF router database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF router database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF router database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF router database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>      <leafNode name="self-originate">        <properties>          <help>Show IPv4 OSPF self-originate database</help> @@ -453,63 +373,59 @@        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        <tagNode name="adv-router"> +        <virtualTagNode>            <properties> -            <help>Show IPv4 OSPF summary database for specified IP address of advertised router</help> +            <help>Show IPv4 OSPF summary database information of specified IP address</help>              <completionHelp> -             <list><x.x.x.x></list> +              <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </tagNode> -        <node name="adv-router"> -          <properties> -            <help>Show IPv4 OSPF summary database for specified IP address of advertised router</help> -          </properties> -        </node> -      </children> -    </node> -    <tagNode name="summary"> -      <properties> -        <help>Show IPv4 OSPF summary database information of specified IP address</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        <node name="adv-router"> -          <properties> -            <help>Show advertising router link states</help> -          </properties> -        </node> +          <children> +            <tagNode name="adv-router"> +              <properties> +                <help>Show IPv4 OSPF summary database of specified IP address for specified advertised router</help> +                <completionHelp> +                 <list><x.x.x.x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </tagNode> +            <leafNode name="self-originate"> +              <properties> +                <help>Show self-originate IPv4 OSPF summary database</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </leafNode> +          </children> +        </virtualTagNode>          <tagNode name="adv-router">            <properties> -            <help>Show IPv4 OSPF summary database of specified IP address for specified advertised router</help> +            <help>Show IPv4 OSPF summary database for specified IP address of advertised router</help>              <completionHelp>               <list><x.x.x.x></list>              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>          </tagNode> -        <leafNode name="self-originate"> -          <properties> -            <help>Show self-originate IPv4 OSPF summary database</help> -          </properties> -          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </leafNode>        </children> -    </tagNode> +    </node>    </children>  </node>  #include <include/ospf/graceful-restart.xml.i> -<node name="interface"> +<tagNode name="interface">    <properties> -    <help>Show IPv4 OSPF interface information</help> +    <help>Show information about specific interface</help> +    <completionHelp> +      <script>${vyos_completion_dir}/list_interfaces</script> +    </completionHelp>    </properties> +  <standalone> +    <help>Show IPv4 OSPF interface information</help> +    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  </standalone>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</node> -#include <include/vtysh-generic-interface-tagNode.xml.i> +</tagNode>  <node name="mpls">    <properties>      <help>Show MPLS information</help> @@ -524,19 +440,19 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> +    <virtualTagNode> +      <properties> +        <help>Show IPv4 OSPF neighbor information for specified IP address or interface</help> +        <completionHelp> +          <list><x.x.x.x></list> +          <script>${vyos_completion_dir}/list_interfaces</script> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/frr-detail.xml.i>    </children>  </node> -<tagNode name="neighbor"> -  <properties> -    <help>Show IPv4 OSPF neighbor information for specified IP address or interface</help> -    <completionHelp> -      <list><x.x.x.x></list> -      <script>${vyos_completion_dir}/list_interfaces</script> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <node name="route">    <properties>      <help>Show IPv4 OSPF route information</help> diff --git a/op-mode-definitions/include/ospfv3/border-routers.xml.i b/op-mode-definitions/include/ospfv3/border-routers.xml.i index e8827a2c4..4abd89e6b 100644 --- a/op-mode-definitions/include/ospfv3/border-routers.xml.i +++ b/op-mode-definitions/include/ospfv3/border-routers.xml.i @@ -5,16 +5,16 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> +    <virtualTagNode> +      <properties> +        <help>Border router ID</help> +        <completionHelp> +          <list><x.x.x.x></list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +    </virtualTagNode>      #include <include/frr-detail.xml.i>    </children>  </node> -<tagNode name="border-routers"> -  <properties> -    <help>Border router ID</help> -    <completionHelp> -      <list><x.x.x.x></list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -</tagNode>  <!-- included end --> diff --git a/op-mode-definitions/include/ospfv3/database.xml.i b/op-mode-definitions/include/ospfv3/database.xml.i index fdc45f184..d4e7ab695 100644 --- a/op-mode-definitions/include/ospfv3/database.xml.i +++ b/op-mode-definitions/include/ospfv3/database.xml.i @@ -21,7 +21,7 @@          <help>Search by Any Link state Type</help>        </properties>        <children> -        <tagNode name="any"> +        <virtualTagNode>            <properties>              <help>Search by Link state ID</help>              <completionHelp> @@ -32,31 +32,32 @@              #include <include/frr-detail.xml.i>              #include <include/ospfv3/dump.xml.i>              #include <include/ospfv3/internal.xml.i> +            #include <include/ospfv3/adv-router-id-node-tag.xml.i>            </children> -        </tagNode> +        </virtualTagNode>        </children>      </node> -    <tagNode name="any"> -      <properties> -        <help>Search by Link state ID</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <command>vtysh -c "show ipv6 ospf6 database * $6"</command> -      <children> -        #include <include/frr-detail.xml.i> -        #include <include/ospfv3/dump.xml.i> -        #include <include/ospfv3/internal.xml.i> -        #include <include/ospfv3/adv-router-id-node-tag.xml.i> -      </children> -    </tagNode>      <node name="as-external">        <properties>          <help>Show AS-External LSAs</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> +        <virtualTagNode> +          <properties> +            <help>Search by Advertising Router IDs</help> +            <completionHelp> +              <list><x.x.x.x></list> +            </completionHelp> +          </properties> +          <children> +            #include <include/frr-detail.xml.i> +            #include <include/ospfv3/dump.xml.i> +            #include <include/ospfv3/internal.xml.i> +            #include <include/ospfv3/self-originated.xml.i> +            #include <include/ospfv3/adv-router-id-node-tag.xml.i> +          </children> +        </virtualTagNode>          #include <include/ospfv3/adv-router.xml.i>          <tagNode name="any">            <properties> @@ -79,21 +80,6 @@          #include <include/ospfv3/self-originated.xml.i>        </children>      </node> -    <tagNode name="as-external"> -      <properties> -        <help>Search by Advertising Router IDs</help> -        <completionHelp> -          <list><x.x.x.x></list> -        </completionHelp> -      </properties> -      <children> -        #include <include/frr-detail.xml.i> -        #include <include/ospfv3/dump.xml.i> -        #include <include/ospfv3/internal.xml.i> -        #include <include/ospfv3/self-originated.xml.i> -        #include <include/ospfv3/adv-router-id-node-tag.xml.i> -      </children> -    </tagNode>      #include <include/frr-detail.xml.i>      #include <include/ospfv3/internal.xml.i>      #include <include/ospfv3/linkstate-id.xml.i> @@ -188,7 +174,7 @@          #include <include/ospfv3/self-originated.xml.i>        </children>      </node> -    <node name="node.tag"> +    <virtualTagNode>        <properties>          <help>Show LSAs</help>        </properties> @@ -202,7 +188,7 @@          #include <include/ospfv3/linkstate-id-node-tag.xml.i>          #include <include/ospfv3/self-originated.xml.i>        </children> -    </node> +    </virtualTagNode>      <node name="router">        <properties>          <help>Show router LSAs</help> diff --git a/op-mode-definitions/include/ospfv3/interface.xml.i b/op-mode-definitions/include/ospfv3/interface.xml.i index 45d5dbd45..a918651cf 100644 --- a/op-mode-definitions/include/ospfv3/interface.xml.i +++ b/op-mode-definitions/include/ospfv3/interface.xml.i @@ -5,71 +5,71 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> -    <node name="prefix"> +    <virtualTagNode>        <properties> -        <help>Show connected prefixes to advertise</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        #include <include/frr-detail.xml.i> -      </children> -    </node> -    <tagNode name="prefix"> -      <properties> -        <help>Show interface prefix route specific information</help> +        <help>Specific insterface to examine</help>          <completionHelp> -          <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +          <script>${vyos_completion_dir}/list_interfaces</script>          </completionHelp>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        #include <include/frr-detail.xml.i> -        <node name="match"> +        <node name="prefix">            <properties> -            <help>Matched interface prefix information</help> +            <help>Show connected prefixes to advertise</help>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +          <children> +            <virtualTagNode> +              <properties> +                <help>Show interface prefix route specific information</help> +                <completionHelp> +                  <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +                </completionHelp> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +              <children> +                #include <include/frr-detail.xml.i> +                <node name="match"> +                  <properties> +                    <help>Matched interface prefix information</help> +                  </properties> +                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                </node> +              </children> +            </virtualTagNode> +            #include <include/frr-detail.xml.i> +          </children>          </node>        </children> -    </tagNode> -  </children> -</node> -<tagNode name="interface"> -  <properties> -    <help>Specific insterface to examine</help> -    <completionHelp> -      <script>${vyos_completion_dir}/list_interfaces</script> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -  <children> +    </virtualTagNode>      <node name="prefix">        <properties>          <help>Show connected prefixes to advertise</help>        </properties>        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>        <children> -        #include <include/frr-detail.xml.i> -      </children> -    </node> -    <tagNode name="prefix"> -      <properties> -        <help>Show interface prefix route specific information</help> -        <completionHelp> -          <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -        </completionHelp> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        #include <include/frr-detail.xml.i> -        <node name="match"> +        <virtualTagNode>            <properties> -            <help>Matched interface prefix information</help> +            <help>Show interface prefix route specific information</help> +            <completionHelp> +              <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +            </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </node> +          <children> +            #include <include/frr-detail.xml.i> +            <node name="match"> +              <properties> +                <help>Matched interface prefix information</help> +              </properties> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </node> +          </children> +        </virtualTagNode> +        #include <include/frr-detail.xml.i>        </children> -    </tagNode> +    </node>    </children> -</tagNode> +</node>  <!-- included end --> diff --git a/op-mode-definitions/include/ospfv3/linkstate-id-node-tag.xml.i b/op-mode-definitions/include/ospfv3/linkstate-id-node-tag.xml.i index 66674e754..b5aed4c0a 100644 --- a/op-mode-definitions/include/ospfv3/linkstate-id-node-tag.xml.i +++ b/op-mode-definitions/include/ospfv3/linkstate-id-node-tag.xml.i @@ -1,5 +1,5 @@  <!-- included start from ospfv3/linkstate-id-node-tag.xml.i --> -<node name="node.tag"> +<virtualTagNode>    <properties>      <help>Search by Link state ID</help>      <completionHelp> @@ -13,5 +13,5 @@      #include <include/ospfv3/internal.xml.i>      #include <include/ospfv3/self-originated.xml.i>    </children> -</node> +</virtualTagNode>  <!-- included end --> diff --git a/op-mode-definitions/include/ospfv3/linkstate.xml.i b/op-mode-definitions/include/ospfv3/linkstate.xml.i index 030dc7923..3a08d748f 100644 --- a/op-mode-definitions/include/ospfv3/linkstate.xml.i +++ b/op-mode-definitions/include/ospfv3/linkstate.xml.i @@ -13,7 +13,7 @@          </completionHelp>        </properties>        <children> -        <node name="node.tag"> +        <virtualTagNode>            <properties>              <help>Specify Link state ID as IPv4 address notation</help>              <completionHelp> @@ -21,7 +21,7 @@              </completionHelp>            </properties>            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        </node> +        </virtualTagNode>        </children>      </tagNode>      <tagNode name="router"> diff --git a/op-mode-definitions/include/ospfv3/route.xml.i b/op-mode-definitions/include/ospfv3/route.xml.i index a5b97cd05..0128bac1b 100644 --- a/op-mode-definitions/include/ospfv3/route.xml.i +++ b/op-mode-definitions/include/ospfv3/route.xml.i @@ -5,6 +5,32 @@    </properties>    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>    <children> +    <virtualTagNode> +      <properties> +        <help>Show specified route/prefix information</help> +        <completionHelp> +          <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +        </completionHelp> +      </properties> +      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +      <children> +        <node name="longer"> +          <properties> +            <help>Show routes longer than specified prefix</help> +          </properties> +          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +        </node> +        <node name="match"> +          <properties> +            <help>Show routes matching specified prefix</help> +          </properties> +          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +          <children> +            #include <include/frr-detail.xml.i> +          </children> +        </node> +      </children> +    </virtualTagNode>      <node name="external-1">        <properties>          <help>Show Type-1 External route information</help> @@ -50,30 +76,4 @@      </node>    </children>  </node> -<tagNode name="route"> -  <properties> -    <help>Show specified route/prefix information</help> -    <completionHelp> -      <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -    </completionHelp> -  </properties> -  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -  <children> -    <node name="longer"> -      <properties> -        <help>Show routes longer than specified prefix</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -    </node> -    <node name="match"> -      <properties> -        <help>Show routes matching specified prefix</help> -      </properties> -      <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -      <children> -        #include <include/frr-detail.xml.i> -      </children> -    </node> -  </children> -</tagNode>  <!-- included end --> diff --git a/op-mode-definitions/include/rpki/vrf.xml.i b/op-mode-definitions/include/rpki/vrf.xml.i new file mode 100644 index 000000000..5b6518fee --- /dev/null +++ b/op-mode-definitions/include/rpki/vrf.xml.i @@ -0,0 +1,11 @@ +<!-- include start from rpki/vrf.xml.i --> +<tagNode name="vrf"> +  <properties> +    <help>Virtual Routing and Forwarding (VRF)</help> +    <completionHelp> +      <path>vrf name</path> +    </completionHelp> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</tagNode> +<!-- include end --> diff --git a/op-mode-definitions/include/show-route-table.xml.i b/op-mode-definitions/include/show-route-table.xml.i index c3cf82a86..7c0f574c8 100644 --- a/op-mode-definitions/include/show-route-table.xml.i +++ b/op-mode-definitions/include/show-route-table.xml.i @@ -1,12 +1,7 @@  <!-- included start from show-route-table.xml.i --> -<node name="table"> -  <properties> -    <help>Table to display</help> -  </properties> -</node>  <tagNode name="table">    <properties> -    <help>The table number to display</help> +    <help>Show routes in specific routing table</help>      <completionHelp>        <list>all</list>        <path>protocols static table</path> diff --git a/op-mode-definitions/include/show-route-tag.xml.i b/op-mode-definitions/include/show-route-tag.xml.i index 8bfa0ae4e..c7279e82e 100644 --- a/op-mode-definitions/include/show-route-tag.xml.i +++ b/op-mode-definitions/include/show-route-tag.xml.i @@ -1,12 +1,7 @@  <!-- included start from show-route-tag.xml.i --> -<node name="tag"> -  <properties> -    <help>Show only routes with tag</help> -  </properties> -</node>  <tagNode name="tag">    <properties> -    <help>Tag value</help> +    <help>Show route with given tag</help>      <completionHelp>        <list><1-4294967295></list>      </completionHelp> diff --git a/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i b/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i new file mode 100644 index 000000000..98ce09948 --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i @@ -0,0 +1,11 @@ +<!-- included start from vtysh-generic-detail-wide.xml.i --> +<node name="detail"> +  <properties> +    <help>Detailed information</help> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +  <children> +    #include <include/vtysh-generic-wide.xml.i> +  </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/vtysh-generic-interface-virtualTagNode.xml b/op-mode-definitions/include/vtysh-generic-interface-virtualTagNode.xml new file mode 100644 index 000000000..1dfcfc75e --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-interface-virtualTagNode.xml @@ -0,0 +1,11 @@ +<!-- included start from vtysh-generic-interface-virtualTagNode.xml.i --> +<virtualTagNode> +  <properties> +    <help>Show information about specific interface</help> +    <completionHelp> +      <script>${vyos_completion_dir}/list_interfaces</script> +    </completionHelp> +  </properties> +  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +</virtualTagNode> +<!-- included end --> diff --git a/op-mode-definitions/install-mok.xml.in b/op-mode-definitions/install-mok.xml.in index c7e62349a..ab8e5d3db 100644 --- a/op-mode-definitions/install-mok.xml.in +++ b/op-mode-definitions/install-mok.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Install Secure Boot MOK (Machine Owner Key)</help>          </properties> -        <command>if test -f /var/lib/shim-signed/mok/vyos-dev-2025-shim.der; then sudo mokutil --ignore-keyring --import /var/lib/shim-signed/mok/vyos-dev-2025-shim.der; else echo "Secure Boot Machine Owner Key not found"; fi</command> +        <command>${vyos_op_scripts_dir}/install_mok.sh</command>        </leafNode>      </children>    </node> diff --git a/op-mode-definitions/ipv4-route.xml.in b/op-mode-definitions/ipv4-route.xml.in index 17a0a4ad9..41a4b62ba 100644 --- a/op-mode-definitions/ipv4-route.xml.in +++ b/op-mode-definitions/ipv4-route.xml.in @@ -39,7 +39,7 @@                      <list><x.x.x.x></list>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/neighbor.py reset --family inet --address "$5"</command> +                <command>${vyos_op_scripts_dir}/neighbor.py reset --family inet --address "$5"</command>                </tagNode>                <tagNode name="interface">                  <properties> @@ -48,13 +48,13 @@                      <script>${vyos_completion_dir}/list_interfaces</script>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/neighbor.py reset --family inet --interface "$5"</command> +                <command>${vyos_op_scripts_dir}/neighbor.py reset --family inet --interface "$5"</command>                </tagNode>                <node name="table">                  <properties>                    <help>Flush the ARP cache completely</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/neighbor.py reset --family inet</command> +                <command>${vyos_op_scripts_dir}/neighbor.py reset --family inet</command>                </node>              </children>            </node> @@ -63,12 +63,6 @@                <help>Reset IP route</help>              </properties>              <children> -              <leafNode name= "cache"> -                <properties> -                  <help>Flush the kernel route cache</help> -                </properties> -                <command>sudo ip route flush cache</command> -              </leafNode>                <tagNode name="cache">                  <properties>                    <help>Flush the kernel route cache for a given route</help> @@ -76,7 +70,11 @@                      <list><x.x.x.x> <x.x.x.x/x></list>                    </completionHelp>                  </properties> -                <command>sudo ip route flush cache "$5"</command> +                <standalone> +                  <help>Flush the kernel route cache</help> +                  <command>ip route flush cache</command> +                </standalone> +                <command>ip route flush cache "$5"</command>                </tagNode>              </children>            </node> diff --git a/op-mode-definitions/ipv6-route.xml.in b/op-mode-definitions/ipv6-route.xml.in index 5ed0b9dba..7ea5a13f6 100644 --- a/op-mode-definitions/ipv6-route.xml.in +++ b/op-mode-definitions/ipv6-route.xml.in @@ -65,7 +65,7 @@                      <list><h:h:h:h:h:h:h:h></list>                    </completionHelp>                  </properties> -                <command>sudo ip -f inet6 neigh flush to "$5"</command> +                <command>ip -f inet6 neigh flush to "$5"</command>                </tagNode>                <tagNode name="interface">                  <properties> @@ -74,7 +74,7 @@                      <script>${vyos_completion_dir}/list_interfaces</script>                    </completionHelp>                  </properties> -                <command>sudo ip -f inet6 neigh flush dev "$5"</command> +                <command>ip -f inet6 neigh flush dev "$5"</command>                </tagNode>              </children>            </node> @@ -83,12 +83,6 @@                <help>Reset IPv6 route</help>              </properties>              <children> -              <leafNode name= "cache"> -                <properties> -                  <help>Flush the kernel IPv6 route cache</help> -                </properties> -                <command>sudo ip -f inet6 route flush cache</command> -              </leafNode>                <tagNode name="cache">                  <properties>                    <help>Flush the kernel IPv6 route cache for a given route</help> @@ -96,7 +90,11 @@                      <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list>                    </completionHelp>                  </properties> -                <command>sudo ip -f inet6 route flush cache "$5"</command> +                <standalone> +                  <help>Flush the kernel IPv6 route cache</help> +                  <command>ip -f inet6 route flush cache</command> +                </standalone> +                <command>ip -f inet6 route flush cache "$5"</command>                </tagNode>              </children>            </node> diff --git a/op-mode-definitions/load-balancing_haproxy.xml.in b/op-mode-definitions/load-balancing_haproxy.xml.in index 8de7ae97f..8692a7367 100644 --- a/op-mode-definitions/load-balancing_haproxy.xml.in +++ b/op-mode-definitions/load-balancing_haproxy.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart haproxy service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name haproxy</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name haproxy</command>        </node>      </children>    </node> @@ -16,7 +16,7 @@          <properties>            <help>Show load-balancing haproxy</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/load-balancing_haproxy.py show</command> +        <command>${vyos_op_scripts_dir}/load-balancing_haproxy.py show</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/load-balancing_wan.xml.in b/op-mode-definitions/load-balancing_wan.xml.in index 91c57c1f4..652b01eda 100644 --- a/op-mode-definitions/load-balancing_wan.xml.in +++ b/op-mode-definitions/load-balancing_wan.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart Wide Area Network (WAN) load-balancing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name load-balancing_wan</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name load-balancing_wan</command>        </node>      </children>    </node> @@ -34,4 +34,4 @@        </node>      </children>    </node> -</interfaceDefinition>
\ No newline at end of file +</interfaceDefinition> diff --git a/op-mode-definitions/mdns-reflector.xml.in b/op-mode-definitions/mdns-reflector.xml.in index 115b2858c..6fe412334 100644 --- a/op-mode-definitions/mdns-reflector.xml.in +++ b/op-mode-definitions/mdns-reflector.xml.in @@ -53,7 +53,7 @@              <properties>                <help>Restart mDNS repeater service</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name mdns_repeater</command> +            <command>${vyos_op_scripts_dir}/restart.py restart_service --name mdns_repeater</command>            </node>          </children>        </node> diff --git a/op-mode-definitions/monitor-bridge.xml.in b/op-mode-definitions/monitor-bridge.xml.in index a43fa6dd9..ae98ec3ea 100644 --- a/op-mode-definitions/monitor-bridge.xml.in +++ b/op-mode-definitions/monitor-bridge.xml.in @@ -6,22 +6,22 @@          <properties>            <help>Monitor bridge database changes</help>          </properties> -        <command>sudo bridge monitor all</command> +        <command>bridge monitor all</command>          <children>            <node name="link"> -            <command>sudo bridge monitor link</command> +            <command>bridge monitor link</command>              <properties>                <help>Monitor bridge database generated connection interface changes</help>              </properties>            </node>            <node name="fdb"> -            <command>sudo bridge monitor fdb</command> +            <command>bridge monitor fdb</command>              <properties>                <help>Monitor the forwarding database changes generated by the bridge database</help>              </properties>            </node>            <node name="mdb"> -            <command>sudo bridge monitor mdb</command> +            <command>bridge monitor mdb</command>              <properties>                <help>Monitor the multicast database changes generated by the bridge database</help>              </properties> diff --git a/op-mode-definitions/monitor-command.xml.in b/op-mode-definitions/monitor-command.xml.in index 31c68f029..ba242386e 100644 --- a/op-mode-definitions/monitor-command.xml.in +++ b/op-mode-definitions/monitor-command.xml.in @@ -2,26 +2,31 @@  <interfaceDefinition>    <node name="monitor">      <children> -      <tagNode name="command"> +      <node name="command">          <properties> -          <help>Monitor operational mode command (refreshes every 2 seconds)</help> +          <help>Monitor operational mode command output</help>          </properties> -        <command>watch --no-title ${vyos_op_scripts_dir}/vyos-op-cmd-wrapper.sh ${@:3}</command> -      </tagNode> -      <node name="command">          <children> +          <virtualTagNode> +            <properties> +              <help>Monitor operational mode command (refreshes every 2 seconds)</help> +            </properties> +            <command>watch --no-title ${vyos_op_scripts_dir}/vyos-op-cmd-wrapper.sh ${@:3}</command> +          </virtualTagNode>            <node name="diff">              <properties>                <help>Show differences during each run</help>              </properties> +            <children> +              <virtualTagNode> +                <properties> +                  <help>Monitor operational mode command (refreshes every 2 seconds)</help> +                </properties> +                <command>watch --no-title --differences ${vyos_op_scripts_dir}/vyos-op-cmd-wrapper.sh ${@:4}</command> +              </virtualTagNode> +            </children>            </node> -          <tagNode name="diff"> -            <properties> -              <help>Monitor operational mode command (refreshes every 2 seconds)</help> -            </properties> -            <command>watch --no-title --differences ${vyos_op_scripts_dir}/vyos-op-cmd-wrapper.sh ${@:4}</command> -          </tagNode> -        </children> +       </children>        </node>      </children>    </node> diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in index 91e1c93ef..721460be5 100644 --- a/op-mode-definitions/monitor-log.xml.in +++ b/op-mode-definitions/monitor-log.xml.in @@ -21,7 +21,7 @@              <properties>                <help>Monitor last lines of certbot log</help>              </properties> -            <command>if sudo test -f /var/log/letsencrypt/letsencrypt.log; then sudo tail --follow=name /var/log/letsencrypt/letsencrypt.log; else echo "Cerbot log does not exist"; fi</command> +            <command>if test -f /var/log/letsencrypt/letsencrypt.log; then tail --follow=name /var/log/letsencrypt/letsencrypt.log; else echo "Cerbot log does not exist"; fi</command>            </leafNode>            <leafNode name="conntrack-sync">              <properties> @@ -107,6 +107,12 @@              </properties>              <command>journalctl --no-hostname --boot --follow --unit frr.service</command>            </leafNode> +          <leafNode name="haproxy"> +            <properties> +              <help>Monitor last lines of HAProxy log</help> +            </properties> +            <command>journalctl --no-hostname --boot --follow --unit haproxy.service</command> +          </leafNode>            <leafNode name="ipoe-server">              <properties>                <help>Monitor last lines of IP over Ethernet server log</help> @@ -125,12 +131,6 @@              </properties>              <command>journalctl --no-hostname --boot --follow --unit ndppd.service</command>            </leafNode> -          <leafNode name="nhrp"> -            <properties> -              <help>Monitor last lines of Next Hop Resolution Protocol log</help> -            </properties> -            <command>journalctl --no-hostname --boot --follow --unit opennhrp.service</command> -          </leafNode>            <leafNode name="ntp">              <properties>                <help>Monitor last lines of Network Time Protocol log</help> diff --git a/op-mode-definitions/monitor-ndp.xml.in b/op-mode-definitions/monitor-ndp.xml.in index 3b08f3d73..a40c4f25c 100644 --- a/op-mode-definitions/monitor-ndp.xml.in +++ b/op-mode-definitions/monitor-ndp.xml.in @@ -6,10 +6,10 @@          <properties>            <help>Monitor Neighbor Discovery Protocol (NDP) information</help>          </properties> -        <command>sudo ndptool monitor</command> +        <command>ndptool monitor</command>          <children>            <tagNode name="interface"> -            <command>sudo ndptool monitor --ifname=$4</command> +            <command>ndptool monitor --ifname=$4</command>              <properties>                <help>Monitor Neighbor Discovery Protocol on specified interface</help>                <completionHelp> @@ -18,7 +18,7 @@              </properties>              <children>                <tagNode name="type"> -                <command>sudo ndptool monitor --ifname=$4 --msg-type=$6</command> +                <command>ndptool monitor --ifname=$4 --msg-type=$6</command>                  <properties>                    <help>Monitor specific Neighbor Discovery Protocol type</help>                    <completionHelp> @@ -29,7 +29,7 @@              </children>            </tagNode>            <tagNode name="type"> -            <command>sudo ndptool monitor --msg-type=$4</command> +            <command>ndptool monitor --msg-type=$4</command>              <properties>                <help>Monitor specific Neighbor Discovery Protocol type</help>                <completionHelp> diff --git a/op-mode-definitions/monitor-protocol.xml.in b/op-mode-definitions/monitor-protocol.xml.in index f05a1945f..fec30c8a5 100644 --- a/op-mode-definitions/monitor-protocol.xml.in +++ b/op-mode-definitions/monitor-protocol.xml.in @@ -35,12 +35,6 @@                      </properties>                      <command>vtysh -c "no debug bgp ${@:5}"</command>                    </node> -                  <node name="bestpath"> -                    <properties> -                      <help>Disable BGP allow best path debugging</help> -                    </properties> -                    <command>vtysh -c "no debug bgp ${@:5}"</command> -                  </node>                    <tagNode name="bestpath">                      <properties>                        <help>Disable BGP bestpath IPv4 IPv6</help> @@ -48,6 +42,10 @@                          <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list>                        </completionHelp>                      </properties> +                    <standalone> +                      <help>Disable BGP allow best path debugging</help> +                      <command>vtysh -c "no debug bgp ${@:5}"</command> +                    </standalone>                      <command>vtysh -c "no debug bgp ${@:5}"</command>                    </tagNode>                    <node name="flowspec"> @@ -155,12 +153,6 @@                      </properties>                      <command>vtysh -c "debug bgp ${@:5}"</command>                    </node> -                  <node name="bestpath"> -                    <properties> -                      <help>Enable BGP allow best path debugging</help> -                    </properties> -                    <command>vtysh -c "debug bgp ${@:5}"</command> -                  </node>                    <tagNode name="bestpath">                      <properties>                        <help>Debug bestpath IPv4 IPv6</help> @@ -168,6 +160,10 @@                          <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list>                        </completionHelp>                      </properties> +                    <standalone> +                      <help>Enable BGP allow best path debugging</help> +                      <command>vtysh -c "debug bgp ${@:5}"</command> +                    </standalone>                      <command>vtysh -c "debug bgp ${@:5}"</command>                    </tagNode>                    <node name="flowspec"> diff --git a/op-mode-definitions/mtr.xml.in b/op-mode-definitions/mtr.xml.in index 66729e2bc..ac146d520 100644 --- a/op-mode-definitions/mtr.xml.in +++ b/op-mode-definitions/mtr.xml.in @@ -11,7 +11,7 @@          </properties>          <command>${vyos_op_scripts_dir}/mtr.py ${@:3}</command>          <children> -          <leafNode name="node.tag"> +          <virtualTagNode>              <properties>                <help>Traceroute options</help>                <completionHelp> @@ -19,7 +19,7 @@                </completionHelp>              </properties>              <command>${vyos_op_scripts_dir}/mtr.py ${@:3}</command> -          </leafNode> +          </virtualTagNode>          </children>        </tagNode>      </children> @@ -33,7 +33,7 @@      </properties>      <command>${vyos_op_scripts_dir}/mtr.py ${@:2}</command>      <children> -      <leafNode name="node.tag"> +      <virtualTagNode>          <properties>            <help>mtr options</help>            <completionHelp> @@ -41,7 +41,7 @@            </completionHelp>          </properties>          <command>${vyos_op_scripts_dir}/mtr.py ${@:2}</command> -      </leafNode> +      </virtualTagNode>      </children>    </tagNode>  </interfaceDefinition> diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in index 13e7fd81d..bdf6324b2 100644 --- a/op-mode-definitions/nat.xml.in +++ b/op-mode-definitions/nat.xml.in @@ -24,7 +24,7 @@                          <list><x.x.x.x></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --external-address "$6"</command> +                    <command>${vyos_op_scripts_dir}/cgnat.py show_allocation --external-address "$6"</command>                    </tagNode>                    <tagNode name="internal-address">                      <properties> @@ -33,10 +33,10 @@                          <list><x.x.x.x></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --internal-address "$6"</command> +                    <command>${vyos_op_scripts_dir}/cgnat.py show_allocation --internal-address "$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation</command> +                <command>${vyos_op_scripts_dir}/cgnat.py show_allocation</command>                </node>              </children>            </node> @@ -49,13 +49,13 @@                  <properties>                    <help>Show configured source NAT rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet</command>                </node>                <node name="statistics">                  <properties>                    <help>Show statistics for configured source NAT rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet</command>                </node>                <node name="translations">                  <properties> @@ -69,10 +69,10 @@                          <list><x.x.x.x></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet --address "$6"</command> +                    <command>${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet --address "$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet</command>                </node>              </children>            </node> @@ -85,13 +85,13 @@                  <properties>                    <help>Show configured destination NAT rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet</command>                </node>                <node name="statistics">                  <properties>                    <help>Show statistics for configured destination NAT rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet</command>                </node>                <node name="translations">                  <properties> @@ -105,10 +105,10 @@                          <list><x.x.x.x></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet --address "$6"</command> +                    <command>${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet --address "$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet</command> +                <command>${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/nat66.xml.in b/op-mode-definitions/nat66.xml.in index 4df20d847..435e041a3 100644 --- a/op-mode-definitions/nat66.xml.in +++ b/op-mode-definitions/nat66.xml.in @@ -16,13 +16,13 @@                  <properties>                    <help>Show configured source NAT66 rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet6</command>                </node>                <node name="statistics">                  <properties>                    <help>Show statistics for configured source NAT66 rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet6</command>                </node>                <node name="translations">                  <properties> @@ -36,10 +36,10 @@                          <list><h:h:h:h:h:h:h:h></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet6 --address "$6"</command> +                    <command>${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet6 --address "$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet6</command>                </node>              </children>            </node> @@ -52,13 +52,13 @@                  <properties>                    <help>Show configured destination NAT66 rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet6</command>                </node>                <node name="statistics">                  <properties>                    <help>Show statistics for configured destination NAT66 rules</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet6</command>                </node>                <node name="translations">                  <properties> @@ -72,10 +72,10 @@                          <list><h:h:h:h:h:h:h:h></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet6 --address "$6"</command> +                    <command>${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet6 --address "$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet6</command> +                <command>${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet6</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/ntp.xml.in b/op-mode-definitions/ntp.xml.in index 565a5edb5..208df8259 100644 --- a/op-mode-definitions/ntp.xml.in +++ b/op-mode-definitions/ntp.xml.in @@ -6,25 +6,25 @@          <properties>            <help>Show peer status of NTP daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/ntp.py show_sourcestats</command> +        <command>${vyos_op_scripts_dir}/ntp.py show_sourcestats</command>          <children>            <node name="activity">              <properties>                <help>Report the number of servers and peers that are online and offline</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/ntp.py show_activity</command> +            <command>${vyos_op_scripts_dir}/ntp.py show_activity</command>            </node>            <node name="sources">              <properties>                <help>Show information about the current time sources being accessed</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/ntp.py show_sources</command> +            <command>${vyos_op_scripts_dir}/ntp.py show_sources</command>            </node>            <node name="system">              <properties>                <help>Show parameters about the system clock performance</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/ntp.py show_tracking</command> +            <command>${vyos_op_scripts_dir}/ntp.py show_tracking</command>            </node>          </children>        </node> @@ -49,10 +49,10 @@                      <path>vrf name</path>                    </completionHelp>                  </properties> -                <command>sudo ip vrf exec $5 chronyc makestep</command> +                <command>ip vrf exec $5 chronyc makestep</command>                </tagNode>              </children> -            <command>sudo chronyc makestep</command> +            <command>chronyc makestep</command>            </node>          </children>        </node> diff --git a/op-mode-definitions/openconnect.xml.in b/op-mode-definitions/openconnect.xml.in index 88e1f9f15..e2c94bacb 100644 --- a/op-mode-definitions/openconnect.xml.in +++ b/op-mode-definitions/openconnect.xml.in @@ -17,7 +17,7 @@              <properties>                <help>Show OpenConnect configured user settings</help>                <completionHelp> -                <script>sudo ${vyos_completion_dir}/list_openconnect_users.py</script> +                <script>${vyos_completion_dir}/list_openconnect_users.py</script>                </completionHelp>              </properties>              <children> diff --git a/op-mode-definitions/openvpn.xml.in b/op-mode-definitions/openvpn.xml.in index f205b0026..692eef836 100644 --- a/op-mode-definitions/openvpn.xml.in +++ b/op-mode-definitions/openvpn.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Reset specified OpenVPN client</help>                <completionHelp> -                <script>sudo ${vyos_completion_dir}/list_openvpn_clients.py --all</script> +                <script>${vyos_completion_dir}/list_openvpn_clients.py --all</script>                </completionHelp>              </properties>              <command>echo kill $4 | socat - UNIX-CONNECT:/run/openvpn/openvpn-mgmt-intf > /dev/null</command> @@ -20,10 +20,10 @@              <properties>                <help>Reset OpenVPN process on interface</help>                <completionHelp> -                <script>sudo ${vyos_completion_dir}/list_interfaces --type openvpn</script> +                <script>${vyos_completion_dir}/list_interfaces --type openvpn</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/openvpn.py reset --interface $4</command> +            <command>${vyos_op_scripts_dir}/openvpn.py reset --interface $4</command>            </tagNode>          </children>        </node> @@ -39,91 +39,84 @@              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=openvpn</command>              <children> +              <leafNode name="client"> +                <properties> +                  <help>Show tunnel status for OpenVPN client interfaces</help> +                </properties> +                <command>${vyos_op_scripts_dir}/openvpn.py show --mode client</command> +              </leafNode> +              <leafNode name="server"> +                <properties> +                  <help>Show tunnel status for OpenVPN server interfaces</help> +                </properties> +                <command>${vyos_op_scripts_dir}/openvpn.py show --mode server</command> +              </leafNode> +              <leafNode name="site-to-site"> +                <properties> +                  <help>Show tunnel status for OpenVPN site-to-site interfaces</help> +                </properties> +                <command>${vyos_op_scripts_dir}/openvpn.py show --mode site_to_site</command> +              </leafNode>                <leafNode name="detail">                  <properties>                    <help>Show detailed OpenVPN interface information</help>                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=openvpn</command>                </leafNode> -            </children> -          </node> -          <tagNode name="openvpn"> -            <properties> -              <help>Show OpenVPN interface information</help> -              <completionHelp> -                <script>sudo ${vyos_completion_dir}/list_interfaces --type openvpn</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name=$4</command> -            <children> -              <tagNode name="user"> +              <virtualTagNode>                  <properties> -                  <help>Show OpenVPN interface users</help> +                  <help>Show OpenVPN interface information</help>                    <completionHelp> -                    <script>sudo ${vyos_completion_dir}/list_openvpn_users.py --interface ${COMP_WORDS[3]}</script> +                    <script>${vyos_completion_dir}/list_interfaces --type openvpn</script>                    </completionHelp>                  </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name=$4</command>                  <children> -                  <node name="mfa"> +                  <tagNode name="user">                      <properties> -                      <help>Show multi-factor authentication information</help> +                      <help>Show OpenVPN interface users</help> +                      <completionHelp> +                        <script>${vyos_completion_dir}/list_openvpn_users.py --interface ${COMP_WORDS[3]}</script> +                      </completionHelp>                      </properties>                      <children> -                      <leafNode name="secret"> -                        <properties> -                          <help>Show multi-factor authentication secret</help> -                        </properties> -                        <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=secret</command> -                      </leafNode> -                      <leafNode name="uri"> -                        <properties> -                          <help>Show multi-factor authentication otpauth uri</help> -                        </properties> -                        <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=uri</command> -                      </leafNode> -                      <leafNode name="qrcode"> +                      <node name="mfa">                          <properties> -                          <help>Show multi-factor authentication QR code</help> +                          <help>Show multi-factor authentication information</help>                          </properties> -                        <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=qrcode</command> -                      </leafNode> +                        <children> +                          <leafNode name="secret"> +                            <properties> +                              <help>Show multi-factor authentication secret</help> +                            </properties> +                            <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=secret</command> +                          </leafNode> +                          <leafNode name="uri"> +                            <properties> +                              <help>Show multi-factor authentication otpauth uri</help> +                            </properties> +                            <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=uri</command> +                          </leafNode> +                          <leafNode name="qrcode"> +                            <properties> +                              <help>Show multi-factor authentication QR code</help> +                            </properties> +                            <command>${vyos_op_scripts_dir}/show_openvpn_mfa.py --user="$6" --intf="$4" --action=qrcode</command> +                          </leafNode> +                        </children> +                      </node>                      </children> -                  </node> +                  </tagNode> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of specified OpenVPN interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4"</command> +                  </leafNode>                  </children> -              </tagNode> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of specified OpenVPN interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4"</command> -              </leafNode> +              </virtualTagNode>              </children> -          </tagNode> -        </children> -      </node> -      <node name="openvpn"> -        <properties> -          <help>Show OpenVPN information</help> -        </properties> -        <children> -          <leafNode name="client"> -            <properties> -              <help>Show tunnel status for OpenVPN client interfaces</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/openvpn.py show --mode client</command> -          </leafNode> -          <leafNode name="server"> -            <properties> -              <help>Show tunnel status for OpenVPN server interfaces</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/openvpn.py show --mode server</command> -          </leafNode> -          <leafNode name="site-to-site"> -            <properties> -              <help>Show tunnel status for OpenVPN site-to-site interfaces</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/openvpn.py show --mode site_to_site</command> -          </leafNode> +          </node>          </children>        </node>      </children> diff --git a/op-mode-definitions/ping.xml.in b/op-mode-definitions/ping.xml.in index 4c25a59ab..fd50398ba 100644 --- a/op-mode-definitions/ping.xml.in +++ b/op-mode-definitions/ping.xml.in @@ -9,7 +9,7 @@      </properties>      <command>${vyos_op_scripts_dir}/ping.py ${@:2}</command>      <children> -      <leafNode name="node.tag"> +      <virtualTagNode>          <properties>            <help>Ping options</help>            <completionHelp> @@ -17,7 +17,7 @@            </completionHelp>          </properties>          <command>${vyos_op_scripts_dir}/ping.py ${@:2}</command> -      </leafNode> +      </virtualTagNode>      </children>    </tagNode>  </interfaceDefinition> diff --git a/op-mode-definitions/pki.xml.in b/op-mode-definitions/pki.xml.in index 866f482bf..29b08dacb 100644 --- a/op-mode-definitions/pki.xml.in +++ b/op-mode-definitions/pki.xml.in @@ -27,7 +27,7 @@                          <list><filename></list>                        </completionHelp>                      </properties> -                    <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ca --name "$7" --sign "$5" --file</command> +                    <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ca --name "$7" --sign "$5" --file</command>                    </tagNode>                    <tagNode name="install">                      <properties> @@ -48,7 +48,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ca --name "$5" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ca --name "$5" --file</command>                </tagNode>                <tagNode name="install">                  <properties> @@ -79,7 +79,7 @@                          <list><filename></list>                        </completionHelp>                      </properties> -                    <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$6" --self-sign --file</command> +                    <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$6" --self-sign --file</command>                    </tagNode>                    <tagNode name="install">                      <properties> @@ -108,7 +108,7 @@                          <list><filename></list>                        </completionHelp>                      </properties> -                    <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$7" --sign "$5" --file</command> +                    <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$7" --sign "$5" --file</command>                    </tagNode>                    <tagNode name="install">                      <properties> @@ -129,7 +129,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$5" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type certificate --name "$5" --file</command>                </tagNode>                <tagNode name="install">                  <properties> @@ -158,7 +158,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type crl --name "$4" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type crl --name "$4" --file</command>                </tagNode>                <leafNode name="install">                  <properties> @@ -181,7 +181,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type dh --name "$5" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type dh --name "$5" --file</command>                </tagNode>                <tagNode name="install">                  <properties> @@ -207,7 +207,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type key-pair --name "$5" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type key-pair --name "$5" --file</command>                </tagNode>                <tagNode name="install">                  <properties> @@ -238,7 +238,7 @@                          <list><filename></list>                        </completionHelp>                      </properties> -                    <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type openvpn --name "$6" --file</command> +                    <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type openvpn --name "$6" --file</command>                    </tagNode>                    <tagNode name="install">                      <properties> @@ -266,7 +266,7 @@                      <list><filename></list>                    </completionHelp>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ssh --name "$5" --file</command> +                <command>${vyos_op_scripts_dir}/pki.py generate_pki --pki-type ssh --name "$5" --file</command>                </tagNode>                <tagNode name="install">                  <properties> @@ -371,13 +371,13 @@                  <properties>                    <help>Path to CA certificate file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type ca --name "$4" --filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type ca --name "$4" --filename "$6"</command>                </tagNode>                <tagNode name="key-file">                  <properties>                    <help>Path to private key file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type ca --name "$4" --key-filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type ca --name "$4" --key-filename "$6"</command>                </tagNode>              </children>            </tagNode> @@ -393,13 +393,13 @@                  <properties>                    <help>Path to certificate file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type certificate --name "$4" --filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type certificate --name "$4" --filename "$6"</command>                </tagNode>                <tagNode name="key-file">                  <properties>                    <help>Path to private key file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type certificate --name "$4" --key-filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type certificate --name "$4" --key-filename "$6"</command>                </tagNode>              </children>            </tagNode> @@ -415,7 +415,7 @@                  <properties>                    <help>Path to CRL file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type crl --name "$4" --filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type crl --name "$4" --filename "$6"</command>                </tagNode>              </children>            </tagNode> @@ -431,7 +431,7 @@                  <properties>                    <help>Path to DH parameters file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type dh --name "$4" --filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type dh --name "$4" --filename "$6"</command>                </tagNode>              </children>            </tagNode> @@ -447,13 +447,13 @@                  <properties>                    <help>Path to public key file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type key-pair --name "$4" --filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type key-pair --name "$4" --filename "$6"</command>                </tagNode>                <tagNode name="private-file">                  <properties>                    <help>Path to private key file</help>                  </properties> -                <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type key-pair --name "$4" --key-filename "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type key-pair --name "$4" --key-filename "$6"</command>                </tagNode>              </children>            </tagNode> @@ -474,7 +474,7 @@                      <properties>                        <help>Path to shared secret key file</help>                      </properties> -                    <command>sudo -E ${vyos_op_scripts_dir}/pki.py import_pki --pki-type openvpn --name "$5" --filename "$7"</command> +                    <command>${vyos_op_scripts_dir}/pki.py import_pki --pki-type openvpn --name "$5" --filename "$7"</command>                    </tagNode>                  </children>                </tagNode> @@ -490,14 +490,8 @@          <properties>            <help>Show PKI x509 certificates</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/pki.py show_all</command> +        <command>${vyos_op_scripts_dir}/pki.py show_all</command>          <children> -          <leafNode name="ca"> -            <properties> -              <help>Show x509 CA certificates</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate_authority</command> -          </leafNode>            <tagNode name="ca">              <properties>                <help>Show x509 CA certificate by name</help> @@ -505,22 +499,20 @@                  <path>pki ca</path>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate_authority --name "$4"</command> +            <standalone> +              <help>Show x509 CA certificates</help> +              <command>${vyos_op_scripts_dir}/pki.py show_certificate_authority</command> +            </standalone> +            <command>${vyos_op_scripts_dir}/pki.py show_certificate_authority --name "$4"</command>              <children>                <leafNode name="pem">                  <properties>                    <help>Show x509 CA certificate in PEM format</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate_authority --name "$4" --pem</command> +                <command>${vyos_op_scripts_dir}/pki.py show_certificate_authority --name "$4" --pem</command>                </leafNode>              </children>            </tagNode> -          <leafNode name="certificate"> -            <properties> -              <help>Show x509 certificates</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate</command> -          </leafNode>            <tagNode name="certificate">              <properties>                <help>Show x509 certificate by name</help> @@ -528,13 +520,17 @@                  <path>pki certificate</path>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate --name "$4"</command> +            <standalone> +              <help>Show x509 certificates</help> +              <command>${vyos_op_scripts_dir}/pki.py show_certificate</command> +            </standalone> +            <command>${vyos_op_scripts_dir}/pki.py show_certificate --name "$4"</command>              <children>                <leafNode name="pem">                  <properties>                    <help>Show x509 certificate in PEM format</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate --name "$4" --pem</command> +                <command>${vyos_op_scripts_dir}/pki.py show_certificate --name "$4" --pem</command>                </leafNode>                <tagNode name="fingerprint">                  <properties> @@ -543,16 +539,10 @@                      <list>sha256 sha384 sha512</list>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/pki.py show_certificate --name "$4" --fingerprint "$6"</command> +                <command>${vyos_op_scripts_dir}/pki.py show_certificate --name "$4" --fingerprint "$6"</command>                </tagNode>              </children>            </tagNode> -          <leafNode name="crl"> -            <properties> -              <help>Show x509 certificate revocation lists</help> -            </properties> -            <command>${vyos_op_scripts_dir}/pki.py show_crl</command> -          </leafNode>            <tagNode name="crl">              <properties>                <help>Show x509 certificate revocation lists by CA name</help> @@ -560,6 +550,10 @@                  <path>pki ca</path>                </completionHelp>              </properties> +            <standalone> +              <help>Show x509 certificate revocation lists</help> +              <command>${vyos_op_scripts_dir}/pki.py show_crl</command> +            </standalone>              <command>${vyos_op_scripts_dir}/pki.py show_crl --name "$4"</command>              <children>                <leafNode name="pem"> @@ -576,12 +570,20 @@    </node>    <node name="renew">      <children> -      <leafNode name="certbot"> +      <node name="certbot">          <properties> -          <help>Start manual certbot renewal</help> +          <help>Manual certbot renewal</help>          </properties> -        <command>sudo systemctl start certbot.service</command> -      </leafNode> +        <command>${vyos_op_scripts_dir}/pki.py renew_certbot</command> +        <children> +          <leafNode name="force"> +            <properties> +              <help>Force manual certbot renewal</help> +            </properties> +            <command>${vyos_op_scripts_dir}/pki.py renew_certbot --force</command> +          </leafNode> +        </children> +      </node>      </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/policy-route.xml.in b/op-mode-definitions/policy-route.xml.in index bd4a61dc9..e733d976c 100644 --- a/op-mode-definitions/policy-route.xml.in +++ b/op-mode-definitions/policy-route.xml.in @@ -84,12 +84,6 @@            <help>Show policy information</help>          </properties>          <children> -          <node name="route6"> -            <properties> -              <help>Show IPv6 policy chain</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show_all --ipv6</command> -          </node>            <tagNode name="route6">              <properties>                <help>Show IPv6 policy chains</help> @@ -97,6 +91,10 @@                  <path>policy route6</path>                </completionHelp>              </properties> +            <standalone> +              <help>Show IPv6 policy chain</help> +              <command>${vyos_op_scripts_dir}/policy_route.py --action show_all --ipv6</command> +            </standalone>              <children>                <tagNode name="rule">                  <properties> @@ -105,17 +103,11 @@                      <path>policy route6 ${COMP_WORDS[4]} rule</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --rule $6 --ipv6</command> +                <command>${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --rule $6 --ipv6</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --ipv6</command> +            <command>${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --ipv6</command>            </tagNode> -          <node name="route"> -            <properties> -              <help>Show IPv4 policy chain</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show_all</command> -          </node>            <tagNode name="route">              <properties>                <help>Show IPv4 policy chains</help> @@ -123,6 +115,10 @@                  <path>policy route</path>                </completionHelp>              </properties> +            <standalone> +              <help>Show IPv4 policy chains</help> +              <command>${vyos_op_scripts_dir}/policy_route.py --action show_all</command> +            </standalone>              <children>                <tagNode name="rule">                  <properties> @@ -131,10 +127,10 @@                      <path>policy route ${COMP_WORDS[4]} rule</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --rule $6</command> +                <command>${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --rule $6</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show --name $4</command> +            <command>${vyos_op_scripts_dir}/policy_route.py --action show --name $4</command>            </tagNode>          </children>        </node> diff --git a/op-mode-definitions/poweroff.xml.in b/op-mode-definitions/poweroff.xml.in index b4163bcb9..e023e80be 100644 --- a/op-mode-definitions/poweroff.xml.in +++ b/op-mode-definitions/poweroff.xml.in @@ -4,19 +4,19 @@      <properties>        <help>Poweroff the system</help>      </properties> -    <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --poweroff</command> +    <command>${vyos_op_scripts_dir}/powerctrl.py --poweroff</command>      <children>        <leafNode name="now">          <properties>            <help>Poweroff the system without confirmation</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff</command>        </leafNode>        <leafNode name="cancel">          <properties>            <help>Cancel a pending poweroff</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --cancel</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --cancel</command>        </leafNode>        <tagNode name="in">          <properties> @@ -25,7 +25,7 @@              <list><Minutes></list>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $4</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $4</command>        </tagNode>        <tagNode name="at">          <properties> @@ -34,7 +34,7 @@              <list><HH:MM></list>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3</command>          <children>            <tagNode name="date">              <properties> @@ -43,7 +43,7 @@                  <list><DDMMYYYY> <DD/MM/YYYY> <DD.MM.YYYY> <DD:MM:YYYY></list>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $5</command> +            <command>${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $5</command>            </tagNode>          </children>        </tagNode> diff --git a/op-mode-definitions/raid.xml.in b/op-mode-definitions/raid.xml.in index 85fbf4566..0733b637d 100644 --- a/op-mode-definitions/raid.xml.in +++ b/op-mode-definitions/raid.xml.in @@ -19,7 +19,7 @@                  <properties>                    <help>Add a member to a RAID set</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --by-id --member $6</command> +                <command>${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --by-id --member $6</command>                </tagNode>              </children>            </node> @@ -27,7 +27,7 @@              <properties>                <help>Add a member to a RAID set</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --member $5</command> +            <command>${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --member $5</command>            </tagNode>          </children>        </tagNode> @@ -52,7 +52,7 @@                  <properties>                    <help>Delete a member from a RAID set</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --by-id --member $6</command> +                <command>${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --by-id --member $6</command>                </tagNode>              </children>            </node> @@ -60,7 +60,7 @@              <properties>                <help>Delete a member from a RAID set</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --member $5</command> +            <command>${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --member $5</command>            </tagNode>          </children>        </tagNode> diff --git a/op-mode-definitions/reboot.xml.in b/op-mode-definitions/reboot.xml.in index d5a71f561..1fa79da7e 100644 --- a/op-mode-definitions/reboot.xml.in +++ b/op-mode-definitions/reboot.xml.in @@ -4,19 +4,19 @@      <properties>        <help>Reboot the system</help>      </properties> -    <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --reboot</command> +    <command>${vyos_op_scripts_dir}/powerctrl.py --reboot</command>      <children>        <leafNode name="now">          <properties>            <help>Reboot the system without confirmation</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --reboot</command>        </leafNode>        <leafNode name="cancel">          <properties>            <help>Cancel a pending reboot</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --cancel</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --cancel</command>        </leafNode>        <tagNode name="in">          <properties> @@ -25,7 +25,7 @@              <list><Minutes></list>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot-in $3 $4</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --reboot-in $3 $4</command>        </tagNode>        <tagNode name="at">          <properties> @@ -34,7 +34,7 @@              <list><HH:MM></list>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3</command> +        <command>${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3</command>          <children>            <tagNode name="date">              <properties> @@ -43,7 +43,7 @@                  <list><DD/MM/YYYY> <DD.MM.YYYY> <DD:MM:YYYY></list>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3 $5</command> +            <command>${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3 $5</command>            </tagNode>          </children>        </tagNode> diff --git a/op-mode-definitions/reset-bgp.xml.in b/op-mode-definitions/reset-bgp.xml.in index a1d42d4a3..3d73fd417 100644 --- a/op-mode-definitions/reset-bgp.xml.in +++ b/op-mode-definitions/reset-bgp.xml.in @@ -7,6 +7,18 @@            <help>Border Gateway Protocol (BGP) information</help>          </properties>          <children> +          <virtualTagNode> +            <properties> +              <help>BGP IPv4/IPv6 neighbor to clear</help> +              <completionHelp> +                <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both</script> +              </completionHelp> +            </properties> +            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            <children> +              #include <include/bgp/reset-bgp-neighbor-options.xml.i> +            </children> +          </virtualTagNode>            <leafNode name="all">              <properties>                <help>Clear all peers</help> @@ -37,20 +49,20 @@                </leafNode>                #include <include/bgp/reset-bgp-afi-common.xml.i>                #include <include/bgp/reset-bgp-peer-group.xml.i> +              <virtualTagNode> +                <properties> +                  <help>IPv4 neighbor to clear</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <children> +                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                </children> +              </virtualTagNode>              </children>            </node> -          <tagNode name="ipv4"> -            <properties> -              <help>IPv4 neighbor to clear</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            <children> -              #include <include/bgp/reset-bgp-neighbor-options.xml.i> -            </children> -          </tagNode>            <node name="ipv6">              <properties>                <help>IPv6 Address Family</help> @@ -64,20 +76,20 @@                </leafNode>                #include <include/bgp/reset-bgp-afi-common.xml.i>                #include <include/bgp/reset-bgp-peer-group.xml.i> +              <virtualTagNode> +                <properties> +                  <help>IPv6 neighbor to clear</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv6</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <children> +                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                </children> +              </virtualTagNode>              </children>            </node> -          <tagNode name="ipv6"> -            <properties> -              <help>IPv6 neighbor to clear</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv6</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            <children> -              #include <include/bgp/reset-bgp-neighbor-options.xml.i> -            </children> -          </tagNode>            <node name="l2vpn">              <properties>                <help>Layer 2 Virtual Private Network Address Family</help> @@ -96,20 +108,20 @@                    </leafNode>                    #include <include/bgp/reset-bgp-afi-common.xml.i>                    #include <include/bgp/reset-bgp-peer-group.xml.i> +                  <virtualTagNode> +                    <properties> +                      <help>BGP IPv4/IPv6 neighbor to clear</help> +                      <completionHelp> +                        <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both</script> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                    <children> +                      #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                    </children> +                  </virtualTagNode>                  </children>                </node> -              <tagNode name="evpn"> -                <properties> -                  <help>BGP IPv4/IPv6 neighbor to clear</help> -                  <completionHelp> -                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both</script> -                  </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -                <children> -                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> -                </children> -              </tagNode>              </children>            </node>            <tagNode name="vrf"> @@ -120,7 +132,7 @@                </completionHelp>              </properties>              <children> -              <node name="node.tag"> +              <virtualTagNode>                  <properties>                    <help>IPv4/IPv6 neighbor to clear</help>                    <completionHelp> @@ -131,7 +143,7 @@                  <children>                    #include <include/bgp/reset-bgp-neighbor-options.xml.i>                  </children> -              </node> +              </virtualTagNode>                <leafNode name="all">                  <properties>                    <help>Clear all peers</help> @@ -162,20 +174,20 @@                    </leafNode>                    #include <include/bgp/reset-bgp-afi-common.xml.i>                    #include <include/bgp/reset-bgp-peer-group-vrf.xml.i> +                  <virtualTagNode> +                    <properties> +                      <help>IPv4 neighbor to clear</help> +                      <completionHelp> +                        <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4 --vrf ${COMP_WORDS[3]}</script> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                    <children> +                      #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                    </children> +                  </virtualTagNode>                  </children>                </node> -              <tagNode name="ipv4"> -                <properties> -                  <help>IPv4 neighbor to clear</help> -                  <completionHelp> -                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4 --vrf ${COMP_WORDS[3]}</script> -                  </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -                <children> -                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> -                </children> -              </tagNode>                <node name="ipv6">                  <properties>                    <help>IPv6 Address Family</help> @@ -189,20 +201,20 @@                    </leafNode>                    #include <include/bgp/reset-bgp-afi-common.xml.i>                    #include <include/bgp/reset-bgp-peer-group-vrf.xml.i> +                  <virtualTagNode> +                    <properties> +                      <help>IPv6 neighbor to clear</help> +                      <completionHelp> +                        <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv6 --vrf ${COMP_WORDS[3]}</script> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                    <children> +                      #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                    </children> +                  </virtualTagNode>                  </children>                </node> -              <tagNode name="ipv6"> -                <properties> -                  <help>IPv6 neighbor to clear</help> -                  <completionHelp> -                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv6 --vrf ${COMP_WORDS[3]}</script> -                  </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -                <children> -                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> -                </children> -              </tagNode>                <node name="l2vpn">                  <properties>                    <help>Layer 2 Virtual Private Network Address Family</help> @@ -221,38 +233,26 @@                        </leafNode>                        #include <include/bgp/reset-bgp-afi-common.xml.i>                        #include <include/bgp/reset-bgp-peer-group-vrf.xml.i> +                      <virtualTagNode> +                        <properties> +                          <help>BGP IPv4/IPv6 neighbor to clear</help> +                          <completionHelp> +                            <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both --vrf ${COMP_WORDS[3]}</script> +                          </completionHelp> +                        </properties> +                        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                        <children> +                          #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                        </children> +                      </virtualTagNode>                      </children>                    </node> -                  <tagNode name="evpn"> -                    <properties> -                      <help>BGP IPv4/IPv6 neighbor to clear</help> -                      <completionHelp> -                        <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both --vrf ${COMP_WORDS[3]}</script> -                      </completionHelp> -                    </properties> -                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -                    <children> -                      #include <include/bgp/reset-bgp-neighbor-options.xml.i> -                    </children> -                  </tagNode>                  </children>                </node>              </children>            </tagNode>          </children>        </node> -      <tagNode name="bgp"> -        <properties> -          <help>BGP IPv4/IPv6 neighbor to clear</help> -          <completionHelp> -            <script>${vyos_completion_dir}/list_bgp_neighbors.sh --both</script> -          </completionHelp> -        </properties> -        <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -        <children> -          #include <include/bgp/reset-bgp-neighbor-options.xml.i> -        </children> -      </tagNode>      </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/reset-connection.xml.in b/op-mode-definitions/reset-connection.xml.in new file mode 100644 index 000000000..e41d8ed20 --- /dev/null +++ b/op-mode-definitions/reset-connection.xml.in @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<interfaceDefinition> +  <node name="reset"> +    <children> +      <tagNode name="connection"> +        <properties> +          <help>Bring connection-oriented network interface down and up</help> +          <completionHelp> +            <path>interfaces pppoe</path> +            <path>interfaces sstpc</path> +            <path>interfaces wwan</path> +          </completionHelp> +        </properties> +        <command>${vyos_op_scripts_dir}/connect_disconnect.py --connect --disconnect --interface "$3"</command> +      </tagNode> +    </children> +  </node> +</interfaceDefinition> diff --git a/op-mode-definitions/reset-conntrack.xml.in b/op-mode-definitions/reset-conntrack.xml.in index 9c8265f77..e180b47a8 100644 --- a/op-mode-definitions/reset-conntrack.xml.in +++ b/op-mode-definitions/reset-conntrack.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Reset all currently tracked connections</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/clear_conntrack.py</command> +        <command>${vyos_op_scripts_dir}/clear_conntrack.py</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/reset-ip-bgp.xml.in b/op-mode-definitions/reset-ip-bgp.xml.in index 34a4503d9..9201865dc 100644 --- a/op-mode-definitions/reset-ip-bgp.xml.in +++ b/op-mode-definitions/reset-ip-bgp.xml.in @@ -9,28 +9,38 @@                <help>Border Gateway Protocol (BGP) information</help>              </properties>              <children> +              <virtualTagNode> +                <properties> +                  <help>BGP IPv4/IPv6 neighbor to clear</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <children> +                  #include <include/bgp/reset-bgp-neighbor-options.xml.i> +                </children> +              </virtualTagNode>                <leafNode name="all">                  <properties>                    <help>Clear all BGP peering sessions</help>                  </properties>                  <command>vtysh -c "clear bgp ipv4 *"</command>                </leafNode> -              <node name="dampening"> -                <properties> -                  <help>Clear BGP route flap dampening information</help> -                </properties> -                <command>vtysh -c "clear ip bgp dampening"</command> -              </node>                <tagNode name="dampening">                  <properties> -                  <help>Clear BGP route flap dampening information for given host|network address</help> +                  <help>Clear BGP route flap dampening information for given host ornetwork address</help>                    <completionHelp>                      <list><x.x.x.x> <x.x.x.x/x></list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Clear BGP route flap dampening information</help> +                  <command>vtysh -c "clear ip bgp dampening"</command> +                </standalone>                  <command>vtysh -c "clear ip bgp dampening $5"</command>                  <children> -                  <leafNode name="node.tag"> +                  <virtualTagNode>                      <properties>                        <help>Clear BGP route flap dampening information for given network address</help>                        <completionHelp> @@ -38,7 +48,7 @@                        </completionHelp>                      </properties>                      <command>vtysh -c "clear ip bgp dampening $5 $6"</command> -                  </leafNode> +                  </virtualTagNode>                  </children>                </tagNode>                #include <include/bgp/reset-bgp-afi-common.xml.i> @@ -57,7 +67,7 @@                      </properties>                      <command>vtysh -c "clear bgp vrf $5 *"</command>                    </leafNode> -                  <leafNode name="node.tag"> +                  <virtualTagNode>                      <properties>                        <help>Clear BGP neighbor IP address</help>                        <completionHelp> @@ -65,24 +75,12 @@                        </completionHelp>                      </properties>                      <command>vtysh -c "clear bgp vrf $5 $6"</command> -                  </leafNode> +                  </virtualTagNode>                  </children>                </tagNode>              </children>            </node> -          <tagNode name="bgp"> -            <properties> -              <help>BGP IPv4/IPv6 neighbor to clear</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_bgp_neighbors.sh --ipv4</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            <children> -              #include <include/bgp/reset-bgp-neighbor-options.xml.i> -            </children> -          </tagNode> -        </children> +       </children>        </node>      </children>    </node> diff --git a/op-mode-definitions/clear-session.xml.in b/op-mode-definitions/reset-session.xml.in index bfafe6312..a1e8739c5 100644 --- a/op-mode-definitions/clear-session.xml.in +++ b/op-mode-definitions/reset-session.xml.in @@ -1,6 +1,6 @@  <?xml version="1.0"?>  <interfaceDefinition> -  <node name="clear"> +  <node name="reset">      <children>        <tagNode name="session">          <properties> @@ -9,7 +9,7 @@              <script>who | awk '{print $2}'</script>            </completionHelp>          </properties> -        <command>sudo pkill -9 -t $3</command> +        <command>pkill -9 -t $3</command>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/reset-vpn.xml.in b/op-mode-definitions/reset-vpn.xml.in index 8de95d1cc..336fb1e02 100644 --- a/op-mode-definitions/reset-vpn.xml.in +++ b/op-mode-definitions/reset-vpn.xml.in @@ -16,19 +16,19 @@                  <properties>                    <help>Reset all L2TP server VPN sessions</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp"</command>                </node>                <tagNode name="interface">                  <properties>                    <help>Reset specified interface on L2TP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp" --interface="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp" --interface="$5"</command>                </tagNode>                <tagNode name="user">                  <properties>                    <help>Reset specified user on L2TP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp" --username="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="l2tp" --username="$5"</command>                </tagNode>              </children>            </node> @@ -41,19 +41,19 @@                  <properties>                    <help>Reset all PPTP server VPN sessions</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp"</command>                </node>                <tagNode name="interface">                  <properties>                    <help>Reset specified interface on PPTP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp" --interface="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp" --interface="$5"</command>                </tagNode>                <tagNode name="user">                  <properties>                    <help>Reset specified user on PPTP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp" --username="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="pptp" --username="$5"</command>                </tagNode>              </children>            </node> @@ -66,19 +66,19 @@                  <properties>                    <help>Reset all SSTP server VPN sessions</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp"</command>                </node>                <tagNode name="interface">                  <properties>                    <help>Reset specified interface on SSTP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp" --interface="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp" --interface="$5"</command>                </tagNode>                <tagNode name="user">                  <properties>                    <help>Reset specified user on SSTP VPN server</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp" --username="$5"</command> +                <command>${vyos_op_scripts_dir}/reset_vpn.py reset_conn --protocol="sstp" --username="$5"</command>                </tagNode>              </children>            </node> diff --git a/op-mode-definitions/reset-wireguard.xml.in b/op-mode-definitions/reset-wireguard.xml.in index c2243f519..cb575c8c6 100644 --- a/op-mode-definitions/reset-wireguard.xml.in +++ b/op-mode-definitions/reset-wireguard.xml.in @@ -14,7 +14,7 @@                  <path>interfaces wireguard</path>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/reset_wireguard.py reset_peer --interface="$4"</command> +            <command>${vyos_op_scripts_dir}/reset_wireguard.py reset_peer --interface="$4"</command>              <children>                <tagNode name="peer">                  <properties> @@ -23,7 +23,7 @@                      <path>interfaces wireguard ${COMP_WORDS[3]} peer</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/reset_wireguard.py reset_peer --interface="$4" --peer="$6"</command> +                <command>${vyos_op_scripts_dir}/reset_wireguard.py reset_peer --interface="$4" --peer="$6"</command>                </tagNode>              </children>            </tagNode> diff --git a/op-mode-definitions/restart-frr.xml.in b/op-mode-definitions/restart-frr.xml.in index 4772e8dd2..950007a50 100644 --- a/op-mode-definitions/restart-frr.xml.in +++ b/op-mode-definitions/restart-frr.xml.in @@ -6,85 +6,85 @@          <properties>            <help>Restart all routing daemons</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart</command>        </leafNode>        <leafNode name="zebra">          <properties>            <help>Restart Routing Information Base (RIB) IP manager daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon zebra</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon zebra</command>        </leafNode>        <leafNode name="static">          <properties>            <help>Restart static routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon staticd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon staticd</command>        </leafNode>        <leafNode name="bgp">          <properties>            <help>Restart Border Gateway Protocol (BGP) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bgpd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bgpd</command>        </leafNode>        <leafNode name="ospf">          <properties>            <help>Restart Open Shortest Path First (OSPF) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospfd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospfd</command>        </leafNode>        <leafNode name="ospfv3">          <properties>            <help>Restart IPv6 Open Shortest Path First (OSPFv3) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospf6d</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospf6d</command>        </leafNode>        <leafNode name="rip">          <properties>            <help>Restart Routing Information Protocol (RIP) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripd</command>        </leafNode>        <leafNode name="ripng">          <properties>            <help>Restart IPv6 Routing Information Protocol (RIPng) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripngd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripngd</command>        </leafNode>        <leafNode name="isis">          <properties>            <help>Restart Intermediate System to Intermediate System (IS-IS) routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon isisd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon isisd</command>        </leafNode>        <leafNode name="openfabric">          <properties>            <help>Restart OpenFabric routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon fabricd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon fabricd</command>        </leafNode>        <leafNode name="pim6">          <properties>            <help>Restart IPv6 Protocol Independent Multicast (PIM) daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon pim6d</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon pim6d</command>        </leafNode>        <leafNode name="ldp">          <properties>            <help>Restart Label Distribution Protocol (LDP) daemon used by MPLS</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ldpd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ldpd</command>        </leafNode>        <leafNode name="babel">          <properties>            <help>Restart Babel routing daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon babeld</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon babeld</command>        </leafNode>        <leafNode name="bfd">          <properties>            <help>Restart Bidirectional Forwarding Detection (BFD) daemon</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bfdd</command> +        <command>${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bfdd</command>        </leafNode>      </children>    </node> diff --git a/op-mode-definitions/restart-ntp.xml.in b/op-mode-definitions/restart-ntp.xml.in index 961fae252..8713dd147 100644 --- a/op-mode-definitions/restart-ntp.xml.in +++ b/op-mode-definitions/restart-ntp.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart NTP service</help>          </properties> -        <command>if cli-shell-api existsActive service ntp; then sudo systemctl restart chrony.service; else echo "Service NTP not configured"; fi</command> +        <command>if cli-shell-api existsActive service ntp; then systemctl restart chrony.service; else echo "Service NTP not configured"; fi</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/restart-router-advert.xml.in b/op-mode-definitions/restart-router-advert.xml.in index 9eea3dfc4..82cde9892 100644 --- a/op-mode-definitions/restart-router-advert.xml.in +++ b/op-mode-definitions/restart-router-advert.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart IPv6 Router Advertisement service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name router_advert</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name router_advert</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/restart-serial.xml.in b/op-mode-definitions/restart-serial.xml.in index 4d8a03633..27618b2f4 100644 --- a/op-mode-definitions/restart-serial.xml.in +++ b/op-mode-definitions/restart-serial.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Restart serial console service for login TTYs</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/serial.py restart_console</command> +            <command>${vyos_op_scripts_dir}/serial.py restart_console</command>              <children>                <tagNode name="device">                  <properties> @@ -20,7 +20,7 @@                      <script>${vyos_completion_dir}/list_login_ttys.py</script>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/serial.py restart_console --device-name "$5"</command> +                <command>${vyos_op_scripts_dir}/serial.py restart_console --device-name "$5"</command>                </tagNode>              </children>            </node> diff --git a/op-mode-definitions/restart-snmp.xml.in b/op-mode-definitions/restart-snmp.xml.in index e9c43de01..0c1f1a2b7 100644 --- a/op-mode-definitions/restart-snmp.xml.in +++ b/op-mode-definitions/restart-snmp.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart SNMP service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name snmp</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name snmp</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/restart-ssh.xml.in b/op-mode-definitions/restart-ssh.xml.in index 914586df8..daa046dd7 100644 --- a/op-mode-definitions/restart-ssh.xml.in +++ b/op-mode-definitions/restart-ssh.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Restart SSH service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name ssh --vrf "*"</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name ssh --vrf "*"</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/rpki.xml.in b/op-mode-definitions/rpki.xml.in index 9e0f83e20..4753cfb93 100644 --- a/op-mode-definitions/rpki.xml.in +++ b/op-mode-definitions/rpki.xml.in @@ -15,19 +15,28 @@                 </completionHelp>               </properties>               <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +             <children> +             #include <include/rpki/vrf.xml.i> +             </children>            </tagNode> -          <leafNode name="cache-connection"> +          <node name="cache-connection">              <properties>                <help>Show RPKI cache connections</help>              </properties> -            <command>vtysh -c "show rpki cache-connection"</command> -          </leafNode> -          <leafNode name="cache-server"> +            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +             <children> +             #include <include/rpki/vrf.xml.i> +             </children> +          </node> +          <node name="cache-server">               <properties>                 <help>Show RPKI cache servers information</help>               </properties> -             <command>vtysh -c "show rpki cache-server"</command> -          </leafNode> +             <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +             <children> +             #include <include/rpki/vrf.xml.i> +             </children> +          </node>            <tagNode name="prefix">               <properties>                 <help>Lookup IP prefix and optionally ASN in prefix table</help> @@ -45,27 +54,53 @@                    </completionHelp>                  </properties>                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $(echo $@ | sed -e "s/as-number //g")</command> +                <children> +                  <tagNode name="vrf"> +                    <properties> +                      <help>Virtual Routing and Forwarding (VRF)</help> +                      <completionHelp> +                        <path>vrf name</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $(echo $@ | sed -e "s/as-number //g")</command> +                  </tagNode> +                </children>                </tagNode> +              #include <include/rpki/vrf.xml.i>               </children>            </tagNode> -          <leafNode name="prefix-table"> +          <node name="prefix-table">               <properties>                 <help>Show RPKI-validated prefixes</help>               </properties> -             <command>vtysh -c "show rpki prefix-table"</command> -          </leafNode> +             <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +             <children> +             #include <include/rpki/vrf.xml.i> +             </children> +          </node>          </children>        </node>      </children>    </node>    <node name="reset">      <children> -      <leafNode name="rpki"> +      <node name="rpki">          <properties>            <help>Reset RPKI</help>          </properties>          <command>vtysh -c "rpki reset"</command> -      </leafNode> +        <children> +          <tagNode name="vrf"> +            <properties> +              <help>Reset RPKI in VRF</help> +              <completionHelp> +                <path>vrf name</path> +              </completionHelp> +            </properties> +            <command>vtysh -c "rpki reset vrf $4"</command> +          </tagNode> +        </children> +      </node>      </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/sflow.xml.in b/op-mode-definitions/sflow.xml.in index 9f02dacda..003550304 100644 --- a/op-mode-definitions/sflow.xml.in +++ b/op-mode-definitions/sflow.xml.in @@ -7,8 +7,7 @@          <properties>            <help>Show sFlow statistics</help>          </properties> -        <!-- requires sudo, do not remove it --> -        <command>sudo ${vyos_op_scripts_dir}/sflow.py show</command> +        <command>${vyos_op_scripts_dir}/sflow.py show</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/show-acceleration.xml.in b/op-mode-definitions/show-acceleration.xml.in index fccfba5e3..3f47bb1cd 100644 --- a/op-mode-definitions/show-acceleration.xml.in +++ b/op-mode-definitions/show-acceleration.xml.in @@ -29,13 +29,13 @@                          <properties>                            <help>Intel QAT flows</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/show_acceleration.py --flow --dev $6</command> +                        <command>${vyos_op_scripts_dir}/show_acceleration.py --flow --dev $6</command>                        </node>                        <node name="config">                          <properties>                            <help>Intel QAT configuration</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/show_acceleration.py --conf --dev $6</command> +                        <command>${vyos_op_scripts_dir}/show_acceleration.py --conf --dev $6</command>                        </node>                      </children>                    </tagNode> @@ -43,16 +43,16 @@                      <properties>                        <help>Intel QAT status</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/show_acceleration.py --status</command> +                    <command>${vyos_op_scripts_dir}/show_acceleration.py --status</command>                    </node>                    <node name="interrupts">                      <properties>                        <help>Intel QAT interrupts</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/show_acceleration.py --interrupts</command> +                    <command>${vyos_op_scripts_dir}/show_acceleration.py --interrupts</command>                    </node>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/show_acceleration.py --hw</command> +                <command>${vyos_op_scripts_dir}/show_acceleration.py --hw</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/show-babel.xml.in b/op-mode-definitions/show-babel.xml.in index 0a1f1b262..8b841eeac 100644 --- a/op-mode-definitions/show-babel.xml.in +++ b/op-mode-definitions/show-babel.xml.in @@ -13,12 +13,6 @@              </properties>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>            </leafNode> -          <leafNode name="neighbor"> -            <properties> -              <help>Show Babel neighbor information</help> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -          </leafNode>            <tagNode name="neighbor">              <properties>                <help>Show Babel neighbor information for specified interface</help> @@ -27,6 +21,10 @@                </completionHelp>              </properties>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            <standalone> +              <help>Show Babel neighbor information</help> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </standalone>            </tagNode>            <leafNode name="route">              <properties> diff --git a/op-mode-definitions/show-bfd.xml.in b/op-mode-definitions/show-bfd.xml.in index 87d672e04..02863975b 100644 --- a/op-mode-definitions/show-bfd.xml.in +++ b/op-mode-definitions/show-bfd.xml.in @@ -7,11 +7,6 @@            <help>Show Bidirectional Forwarding Detection (BFD)</help>          </properties>          <children> -          <node name="peer"> -            <properties> -              <help>Show all Bidirectional Forwarding Detection (BFD) peer status</help> -            </properties> -          </node>            <tagNode name="peer">              <properties>                <help>Show Bidirectional Forwarding Detection (BFD) peer status</help> diff --git a/op-mode-definitions/show-bgp.xml.in b/op-mode-definitions/show-bgp.xml.in index 8b1992432..ee232fa04 100644 --- a/op-mode-definitions/show-bgp.xml.in +++ b/op-mode-definitions/show-bgp.xml.in @@ -78,12 +78,6 @@                </node>              </children>            </tagNode> -          <leafNode name="vrf"> -            <properties> -              <help>Show BGP VRF information</help> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -          </leafNode>            <tagNode name="vrf">              <properties>                <help>Show BGP VRF related information</help> @@ -93,6 +87,10 @@                </completionHelp>              </properties>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            <standalone> +              <help>Show BGP VRF information</help> +              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +            </standalone>              <children>                #include <include/bgp/show-bgp-common.xml.i>                #include <include/bgp/martian-next-hop.xml.i> diff --git a/op-mode-definitions/show-bridge.xml.in b/op-mode-definitions/show-bridge.xml.in index 40fadac8b..c9558c315 100644 --- a/op-mode-definitions/show-bridge.xml.in +++ b/op-mode-definitions/show-bridge.xml.in @@ -6,7 +6,57 @@          <properties>            <help>Show bridging information</help>          </properties> +        <command>${vyos_op_scripts_dir}/bridge.py show</command>          <children> +          <virtualTagNode> +            <properties> +              <help>Show bridge information for a given bridge interface</help> +              <completionHelp> +                <script>${vyos_completion_dir}/list_interfaces --type bridge</script> +              </completionHelp> +            </properties> +            <command>bridge -c link show | grep "master $3"</command> +            <children> +              <node name="spanning-tree"> +                <properties> +                  <help>View Spanning Tree info for specified bridges</help> +                </properties> +                <command>${vyos_op_scripts_dir}/stp.py show_stp --ifname=$3</command> +                <children> +                  <leafNode name="detail"> +                    <properties> +                      <help>Show detailed Spanning Tree info for specified bridge</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/stp.py show_stp --ifname=$3 --detail</command> +                  </leafNode> +                </children> +              </node> +              <leafNode name="mdb"> +                <properties> +                  <help>Displays the multicast group database for the bridge</help> +                </properties> +                <command>${vyos_op_scripts_dir}/bridge.py show_mdb --interface=$3</command> +              </leafNode> +              <leafNode name="fdb"> +                <properties> +                  <help>Show the forwarding database of the bridge</help> +                </properties> +                <command>${vyos_op_scripts_dir}/bridge.py show_fdb --interface=$3</command> +              </leafNode> +              <leafNode name="detail"> +                <properties> +                  <help>Display bridge interface details</help> +                </properties> +                <command>${vyos_op_scripts_dir}/bridge.py show_detail --interface=$3</command> +              </leafNode> +              <leafNode name="nexthop-group"> +                <properties> +                  <help>Display bridge interface nexthop-group</help> +                </properties> +                <command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop-group --interface=$3</command> +              </leafNode> +            </children> +          </virtualTagNode>            <node name="spanning-tree">              <properties>                <help>View Spanning Tree info for all bridges</help> @@ -43,61 +93,6 @@            </leafNode>          </children>        </node> -      <leafNode name="bridge"> -        <properties> -          <help>Show bridging information</help> -        </properties> -        <command>${vyos_op_scripts_dir}/bridge.py show</command> -      </leafNode> -      <tagNode name="bridge"> -        <properties> -          <help>Show bridge information for a given bridge interface</help> -          <completionHelp> -            <script>${vyos_completion_dir}/list_interfaces --type bridge</script> -          </completionHelp> -        </properties> -        <command>bridge -c link show | grep "master $3"</command> -        <children> -          <node name="spanning-tree"> -            <properties> -              <help>View Spanning Tree info for specified bridges</help> -            </properties> -            <command>${vyos_op_scripts_dir}/stp.py show_stp --ifname=$3</command> -            <children> -              <leafNode name="detail"> -                <properties> -                  <help>Show detailed Spanning Tree info for specified bridge</help> -                </properties> -                <command>${vyos_op_scripts_dir}/stp.py show_stp --ifname=$3 --detail</command> -              </leafNode> -            </children> -          </node> -          <leafNode name="mdb"> -            <properties> -              <help>Displays the multicast group database for the bridge</help> -            </properties> -            <command>${vyos_op_scripts_dir}/bridge.py show_mdb --interface=$3</command> -          </leafNode> -          <leafNode name="fdb"> -            <properties> -              <help>Show the forwarding database of the bridge</help> -            </properties> -            <command>${vyos_op_scripts_dir}/bridge.py show_fdb --interface=$3</command> -          </leafNode> -          <leafNode name="detail"> -            <properties> -              <help>Display bridge interface details</help> -            </properties> -            <command>${vyos_op_scripts_dir}/bridge.py show_detail --interface=$3</command> -          </leafNode> -          <leafNode name="nexthop-group"> -            <properties> -              <help>Display bridge interface nexthop-group</help> -            </properties> -            <command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop-group --interface=$3</command> -          </leafNode> -        </children> -      </tagNode>      </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/show-conntrack.xml.in b/op-mode-definitions/show-conntrack.xml.in index 4cdcffcdb..6212af4eb 100644 --- a/op-mode-definitions/show-conntrack.xml.in +++ b/op-mode-definitions/show-conntrack.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Show conntrack statistics</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/conntrack.py show_statistics</command> +            <command>${vyos_op_scripts_dir}/conntrack.py show_statistics</command>            </node>            <node name="table">              <properties> @@ -22,13 +22,13 @@                  <properties>                    <help>Show conntrack entries for IPv4 protocol</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/conntrack.py show --family inet</command> +                <command>${vyos_op_scripts_dir}/conntrack.py show --family inet</command>                </node>                <node name="ipv6">                  <properties>                    <help>Show conntrack entries for IPv6 protocol</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/conntrack.py show --family inet6</command> +                <command>${vyos_op_scripts_dir}/conntrack.py show --family inet6</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/show-environment.xml.in b/op-mode-definitions/show-environment.xml.in index 95b658785..7cc9fe822 100644 --- a/op-mode-definitions/show-environment.xml.in +++ b/op-mode-definitions/show-environment.xml.in @@ -12,7 +12,7 @@                <help>Show hardware monitoring results</help>              </properties>              <!-- Linux always adds "hypervisor" to CPU flags --> -	    <command>if ! grep -q hypervisor /proc/cpuinfo; then ${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_sensors.py; else echo "VyOS running under hypervisor, no sensors available"; fi</command> +	    <command>if ! grep -q hypervisor /proc/cpuinfo; then ${vyos_op_scripts_dir}/show_sensors.py; else echo "VyOS running under hypervisor, no sensors available"; fi</command>            </leafNode>          </children>        </node> diff --git a/op-mode-definitions/show-evpn.xml.in b/op-mode-definitions/show-evpn.xml.in index 3c1e5c7d6..885e0e615 100644 --- a/op-mode-definitions/show-evpn.xml.in +++ b/op-mode-definitions/show-evpn.xml.in @@ -11,30 +11,30 @@              <properties>                <help>Access VLANs</help>              </properties> -            <children> -              #include <include/frr-detail.xml.i> -            </children> -            <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> -          </node> -          <tagNode name="access-vlan"> -            <properties> -              <help>Access VLANs interface name</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --bridgeable --no-vlan-subinterfaces</script> -              </completionHelp> -            </properties> -            <children> -              <node name="node.tag"> +	        <children> +              <virtualTagNode>                  <properties> -                  <help>VLAN ID</help> +                  <help>Access VLANs interface name</help>                    <completionHelp> -                    <list><1-4094></list> +                    <script>${vyos_completion_dir}/list_interfaces --bridgeable --no-vlan-subinterfaces</script>                    </completionHelp>                  </properties> -                <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> -              </node> +                <children> +                  <virtualTagNode> +                    <properties> +                      <help>VLAN ID</help> +                      <completionHelp> +                        <list><1-4094></list> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> +                  </virtualTagNode> +                </children> +              </virtualTagNode> +              #include <include/frr-detail.xml.i>              </children> -          </tagNode> +            <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> +          </node>            <node name="arp-cache">              <properties>                <help>ARP and ND cache</help> @@ -43,22 +43,22 @@                #include <include/vni-tagnode-all.xml.i>              </children>            </node> -          <tagNode name="es"> -            <properties> -              <help>Show ESI information for specified ESI</help> -              <completionHelp> -                <list><esi></list> -                <script>${vyos_completion_dir}/list_esi.sh</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> -          </tagNode>            <node name="es">              <properties>                <help>Show ESI information</help>              </properties>              <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>              <children> +              <virtualTagNode> +                <properties> +                  <help>Show ESI information for specified ESI</help> +                  <completionHelp> +                    <list><esi></list> +                    <script>${vyos_completion_dir}/list_esi.sh</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> +              </virtualTagNode>                <leafNode name="detail">                  <properties>                    <help>Show ESI details</help> @@ -106,13 +106,22 @@                #include <include/vni-tagnode-all.xml.i>              </children>            </node> -          #include <include/vni-tagnode.xml.i>            <node name="vni">              <properties>                <help>Show VNI information</help>              </properties>              <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> -            <children> +	    <children> +              <virtualTagNode> +                <properties> +                  <help>VXLAN network identifier (VNI) number</help> +                  <completionHelp> +                    <list><1-16777215></list> +                    <script>${vyos_completion_dir}/list_vni.sh</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command> +              </virtualTagNode>                <leafNode name="detail">                  <properties>                    <help>Show VNI details</help> diff --git a/op-mode-definitions/show-hardware.xml.in b/op-mode-definitions/show-hardware.xml.in index 21079765a..84e46a22b 100644 --- a/op-mode-definitions/show-hardware.xml.in +++ b/op-mode-definitions/show-hardware.xml.in @@ -31,7 +31,7 @@              <properties>                <help>Show system DMI details</help>              </properties> -            <command>sudo dmidecode</command> +            <command>dmidecode</command>            </node>            <node name="mem">              <properties> @@ -62,7 +62,7 @@                  <properties>                    <help>Show NVMe device information</help>                  </properties> -                <command>sudo nvme list</command> +                <command>nvme list</command>                </leafNode>                <node name="scsi">                  <properties> @@ -85,7 +85,7 @@                      <script>ls /dev | egrep '([hsv]d[a-z]|nvme[0-9]+n[0-9])$'</script>                    </completionHelp>                  </properties> -                <command>sudo smartctl -a "/dev/$5" | sed 1,3d</command> +                <command>smartctl -a "/dev/$5" | sed 1,3d</command>                </tagNode>              </children>            </node> diff --git a/op-mode-definitions/show-history.xml.in b/op-mode-definitions/show-history.xml.in index 7fb286264..1781fa267 100644 --- a/op-mode-definitions/show-history.xml.in +++ b/op-mode-definitions/show-history.xml.in @@ -14,18 +14,17 @@              </properties>              <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history 20</command>            </leafNode> +          <virtualTagNode> +            <properties> +              <help>Show last N commands in history</help> +              <completionHelp> +                <list><NUMBER></list> +              </completionHelp> +            </properties> +            <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history $3</command> +          </virtualTagNode>          </children>        </node> - -      <tagNode name="history"> -        <properties> -          <help>Show last N commands in history</help> -          <completionHelp> -            <list><NUMBER></list> -          </completionHelp> -        </properties> -        <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history $3</command> -      </tagNode> -    </children> +   </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/show-interfaces-bonding.xml.in b/op-mode-definitions/show-interfaces-bonding.xml.in index 0abb7cd5a..58f754ad6 100644 --- a/op-mode-definitions/show-interfaces-bonding.xml.in +++ b/op-mode-definitions/show-interfaces-bonding.xml.in @@ -4,26 +4,17 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="bonding"> +          <node name="bonding">              <properties> -              <help>Show specified Bonding interface information</help> -              <completionHelp> -                <path>interfaces bonding</path> -              </completionHelp> +              <help>Show specified bonding interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bonding</command>              <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified bonding interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bonding</command> -              </leafNode>                <leafNode name="detail">                  <properties> -                  <help>Show detailed interface information</help> +                  <help>Show detailed bonding interface information</help>                  </properties> -                <command>if [ -f "/proc/net/bonding/$4" ]; then sudo cat "/proc/net/bonding/$4"; else echo "Interface $4 does not exist!"; fi</command> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding</command>                </leafNode>                <node name="lacp">                  <properties> @@ -34,13 +25,7 @@                      <properties>                        <help>Show LACP details</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail --interface="$4" </command> -                  </leafNode> -                  <leafNode name="neighbors"> -                    <properties> -                      <help>Show LACP Neighbors</help> -                    </properties> -                    <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_neighbors --interface="$4"</command> +                    <command>${vyos_op_scripts_dir}/bonding.py show_lacp_detail</command>                    </leafNode>                  </children>                </node> @@ -48,59 +33,73 @@                  <properties>                    <help>Show specified bonding interface information</help>                  </properties> -                <command>${vyos_op_scripts_dir}/show-bond.py --interface "$4"</command> +                <command>${vyos_op_scripts_dir}/show-bond.py --slaves</command>                </leafNode> -              <tagNode name="vif"> +              <virtualTagNode>                  <properties> -                  <help>Show specified virtual network interface (vif) information</help>                    <completionHelp> -                    <path>interfaces bonding ${COMP_WORDS[3]} vif</path> +                    <path>interfaces bonding</path>                    </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=bonding</command> +	        </properties> +	        <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bonding</command>                  <children>                    <leafNode name="brief">                      <properties> -                      <help>Show summary of specified virtual network interface (vif) information</help> +                      <help>Show summary of the specified bonding interface information</help>                      </properties> -                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=bonding</command> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bonding</command>                    </leafNode> -                </children> -              </tagNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="bonding"> -            <properties> -              <help>Show Bonding interface information</help> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=bonding</command> -            <children> -              <leafNode name="detail"> -                <properties> -                  <help>Show detailed bonding interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding</command> -              </leafNode> -              <node name="lacp"> -                <properties> -                  <help>Show LACP related info</help> -                </properties> -                <children>                    <leafNode name="detail">                      <properties> -                      <help>Show LACP details</help> +                      <help>Show detailed interface information</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail</command> +                    <command>${vyos_op_scripts_dir}/show_bonding_detail.sh "$4"</command>                    </leafNode> +                  <node name="lacp"> +                    <properties> +                      <help>Show LACP related info</help> +                    </properties> +                    <children> +                      <leafNode name="detail"> +                        <properties> +                          <help>Show LACP details</help> +                        </properties> +                        <command>${vyos_op_scripts_dir}/bonding.py show_lacp_detail --interface="$4" </command> +                      </leafNode> +                      <leafNode name="neighbors"> +                        <properties> +                          <help>Show LACP Neighbors</help> +                        </properties> +                        <command>${vyos_op_scripts_dir}/bonding.py show_lacp_neighbors --interface="$4"</command> +                      </leafNode> +                    </children> +                  </node> +                  <leafNode name="slaves"> +                    <properties> +                      <help>Show specified bonding interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show-bond.py --interface "$4"</command> +                  </leafNode> +                  <tagNode name="vif"> +                    <properties> +                      <help>Show specified virtual network interface (vif) information</help> +                      <completionHelp> +                        <path>interfaces bonding ${COMP_WORDS[3]} vif</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=bonding</command> +                    <children> +                      <leafNode name="brief"> +                        <properties> +                          <help>Show summary of specified virtual network interface (vif) information</help> +                        </properties> +                        <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=bonding</command> +                      </leafNode> +                    </children> +                  </tagNode> +                  #include <include/show-interface-type-event-log.xml.i>                  </children> -              </node> -              <leafNode name="slaves"> -                <properties> -                  <help>Show specified bonding interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/show-bond.py --slaves</command> -              </leafNode> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-bridge.xml.in b/op-mode-definitions/show-interfaces-bridge.xml.in index 998dacd38..f79b7bd7f 100644 --- a/op-mode-definitions/show-interfaces-bridge.xml.in +++ b/op-mode-definitions/show-interfaces-bridge.xml.in @@ -4,27 +4,9 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="bridge"> +         <node name="bridge">              <properties> -              <help>Show specified Bridge interface information</help> -              <completionHelp> -                <path>interfaces bridge</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bridge</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified bridge interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bridge</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="bridge"> -            <properties> -              <help>Show Bridge interface information</help> +              <help>Show bridge interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=bridge</command>              <children> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bridge</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified bridge interface information</help> +                  <completionHelp> +                    <path>interfaces bridge</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=bridge</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified bridge interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=bridge</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-dummy.xml.in b/op-mode-definitions/show-interfaces-dummy.xml.in index 18f21e97e..fdffeb96b 100644 --- a/op-mode-definitions/show-interfaces-dummy.xml.in +++ b/op-mode-definitions/show-interfaces-dummy.xml.in @@ -4,27 +4,9 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="dummy"> +         <node name="dummy">              <properties> -              <help>Show specified Dummy interface information</help> -              <completionHelp> -                <path>interfaces dummy</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=dummy</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified dummy interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=dummy</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="dummy"> -            <properties> -              <help>Show Dummy interface information</help> +              <help>Show dummy interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=dummy</command>              <children> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=dummy</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified dummy interface information</help> +                  <completionHelp> +                    <path>interfaces dummy</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=dummy</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified dummy interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=dummy</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-ethernet.xml.in b/op-mode-definitions/show-interfaces-ethernet.xml.in index 8a23455bf..c6e9a2ec2 100644 --- a/op-mode-definitions/show-interfaces-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-ethernet.xml.in @@ -4,85 +4,84 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="ethernet"> +          <node name="ethernet">              <properties>                <help>Show specified Ethernet interface information</help> -              <completionHelp> -                <path>interfaces ethernet</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=ethernet</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified ethernet interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=ethernet</command> -              </leafNode> -              <leafNode name="identify"> +           </properties> +            <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=ethernet</command> +	    <children> +              <leafNode name="detail">                  <properties> -                  <help>Visually identify specified ethernet interface</help> +                  <help>Show detailed ethernet interface information</help>                  </properties> -                <command>echo "Blinking interface $4 for 30 seconds."; ethtool --identify "$4" 30</command> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=ethernet</command>                </leafNode> -              <node name="physical"> -                <properties> -                  <help>Show physical device information for specified ethernet interface</help> -                </properties> -                <command>ethtool "$4"; ethtool --show-ring "$4"; ethtool --driver "$4"</command> +              <virtualTagNode> +	        <properties> +		  <completionHelp> +                    <path>interfaces ethernet</path> +                  </completionHelp> +	        </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=ethernet</command>                  <children> -                  <leafNode name="offload"> +                  <leafNode name="brief">                      <properties> -                      <help>Show physical device offloading capabilities</help> +                      <help>Show summary of the specified ethernet interface information</help>                      </properties> -                    <command>ethtool --show-features "$4" | sed -e 1d -e '/fixed/d' -e 's/^\t*//g' -e 's/://' | column -t -s' '</command> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=ethernet</command>                    </leafNode> -                </children> -              </node> -              <leafNode name="statistics"> -                <properties> -                  <help>Show physical device statistics for specified ethernet interface</help> -                </properties> -                <command>ethtool --statistics "$4"</command> -              </leafNode> -              <leafNode name="transceiver"> -                <properties> -                  <help>Show transceiver information from modules (e.g SFP+, QSFP)</help> -                </properties> -                <command>ethtool --module-info "$4"</command> -              </leafNode> -              <tagNode name="vif"> -                <properties> -                  <help>Show specified virtual network interface (vif) information</help> -                  <completionHelp> -                    <path>interfaces ethernet ${COMP_WORDS[3]} vif</path> -                  </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=ethernet</command> -                <children> -                  <leafNode name="brief"> +                  <leafNode name="identify">                      <properties> -                      <help>Show summary of specified virtual network interface (vif) information</help> +                      <help>Visually identify specified ethernet interface</help>                      </properties> -                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=ethernet</command> +                    <command>echo "Blinking interface $4 for 30 seconds."; ethtool --identify "$4" 30</command>                    </leafNode> +                  <node name="physical"> +                    <properties> +                      <help>Show physical device information for specified ethernet interface</help> +                    </properties> +                    <command>ethtool "$4"; ethtool --show-ring "$4"; ethtool --driver "$4"</command> +                    <children> +                      <leafNode name="offload"> +                        <properties> +                          <help>Show physical device offloading capabilities</help> +                        </properties> +                        <command>ethtool --show-features "$4" | sed -e 1d -e '/fixed/d' -e 's/^\t*//g' -e 's/://' | column -t -s' '</command> +                      </leafNode> +                    </children> +                  </node> +                  <leafNode name="statistics"> +                    <properties> +                      <help>Show physical device statistics for specified ethernet interface</help> +                    </properties> +                    <command>ethtool --statistics "$4"</command> +                  </leafNode> +                  <leafNode name="transceiver"> +                    <properties> +                      <help>Show transceiver information from modules (e.g SFP+, QSFP)</help> +                    </properties> +                    <command>ethtool --module-info "$4"</command> +                  </leafNode> +                  <tagNode name="vif"> +                    <properties> +                      <help>Show specified virtual network interface (vif) information</help> +                      <completionHelp> +                        <path>interfaces ethernet ${COMP_WORDS[3]} vif</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=ethernet</command> +                    <children> +                      <leafNode name="brief"> +                        <properties> +                          <help>Show summary of specified virtual network interface (vif) information</help> +                        </properties> +                        <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=ethernet</command> +                      </leafNode> +                    </children> +                  </tagNode> +                  #include <include/show-interface-type-event-log.xml.i>                  </children> -              </tagNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="ethernet"> -            <properties> -              <help>Show Ethernet interface information</help> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=ethernet</command> -            <children> -              <leafNode name="detail"> -                <properties> -                  <help>Show detailed ethernet interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=ethernet</command> -              </leafNode> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-geneve.xml.in b/op-mode-definitions/show-interfaces-geneve.xml.in index b5fe84ca7..aaaa34757 100644 --- a/op-mode-definitions/show-interfaces-geneve.xml.in +++ b/op-mode-definitions/show-interfaces-geneve.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="geneve"> -            <properties> -              <help>Show specified GENEVE interface information</help> -              <completionHelp> -                <path>interfaces geneve</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=geneve</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified GENEVE interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=geneve</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="geneve"> +         <node name="geneve">              <properties>                <help>Show GENEVE interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=geneve</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified GENEVE interface information</help> +                  <completionHelp> +                    <path>interfaces geneve</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=geneve</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified GENEVE interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=geneve</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-input.xml.in b/op-mode-definitions/show-interfaces-input.xml.in index c9856f77f..705b94a1a 100644 --- a/op-mode-definitions/show-interfaces-input.xml.in +++ b/op-mode-definitions/show-interfaces-input.xml.in @@ -4,9 +4,23 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="input"> +          <node name="input"> +            <properties> +              <help>Show input (ifb) interface information</help> +            </properties> +            <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=input</command> +            <children> +              <leafNode name="detail"> +                <properties> +                  <help>Show detailed input interface information</help> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=input</command> +              </leafNode> +            </children> +          </node> +          <virtualTagNode>              <properties> -              <help>Show specified Input interface information</help> +              <help>Show specified input interface information</help>                <completionHelp>                  <path>interfaces input</path>                </completionHelp> @@ -21,21 +35,7 @@                </leafNode>                #include <include/show-interface-type-event-log.xml.i>              </children> -          </tagNode> -          <node name="input"> -            <properties> -              <help>Show Input (ifb) interface information</help> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=input</command> -            <children> -              <leafNode name="detail"> -                <properties> -                  <help>Show detailed input interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=input</command> -              </leafNode> -            </children> -          </node> +          </virtualTagNode>          </children>        </node>      </children> diff --git a/op-mode-definitions/show-interfaces-l2tpv3.xml.in b/op-mode-definitions/show-interfaces-l2tpv3.xml.in index 88b73d7d7..3d0345001 100644 --- a/op-mode-definitions/show-interfaces-l2tpv3.xml.in +++ b/op-mode-definitions/show-interfaces-l2tpv3.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="l2tpv3"> -            <properties> -              <help>Show specified L2TPv3 interface information</help> -              <completionHelp> -                <path>interfaces l2tpv3</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=l2tpv3</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified L2TPv3 interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=l2tpv3</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="l2tpv3"> +         <node name="l2tpv3">              <properties>                <help>Show L2TPv3 interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=l2tpv3</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified L2TPv3 interface information</help> +                  <completionHelp> +                    <path>interfaces l2tpv3</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=l2tpv3</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified L2TPv3 interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=l2tpv3</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-loopback.xml.in b/op-mode-definitions/show-interfaces-loopback.xml.in index 467e1a13d..028d1c079 100644 --- a/op-mode-definitions/show-interfaces-loopback.xml.in +++ b/op-mode-definitions/show-interfaces-loopback.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="loopback"> -            <properties> -              <help>Show specified Loopback interface information</help> -              <completionHelp> -                <path>interfaces loopback</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=loopback</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified Loopback interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=loopback</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="loopback"> +         <node name="loopback">              <properties>                <help>Show Loopback interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=loopback</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified Loopback interface information</help> +                  <completionHelp> +                    <path>interfaces loopback</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=loopback</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified Loopback interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=loopback</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-macsec.xml.in b/op-mode-definitions/show-interfaces-macsec.xml.in index 640031b77..027c05c63 100644 --- a/op-mode-definitions/show-interfaces-macsec.xml.in +++ b/op-mode-definitions/show-interfaces-macsec.xml.in @@ -19,21 +19,21 @@                  </properties>                  <command>ip -s macsec show</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified MACsec interface information</help> +                  <completionHelp> +                    <path>interfaces macsec</path> +                  </completionHelp> +                </properties> +                <command>ip macsec show $4</command> +                <children> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>                  </node> -          <tagNode name="macsec"> -            <properties> -              <help>Show specified MACsec interface information</help> -              <completionHelp> -                <path>interfaces macsec</path> -              </completionHelp> -            </properties> -            <command>ip macsec show $4</command> -            <children> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -        </children> +       </children>        </node>      </children>    </node> diff --git a/op-mode-definitions/show-interfaces-pppoe.xml.in b/op-mode-definitions/show-interfaces-pppoe.xml.in index c1f502cb3..0e13ecdb8 100644 --- a/op-mode-definitions/show-interfaces-pppoe.xml.in +++ b/op-mode-definitions/show-interfaces-pppoe.xml.in @@ -4,34 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="pppoe"> -            <properties> -              <help>Show specified PPPoE interface information</help> -              <completionHelp> -                <path>interfaces pppoe</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pppoe</command> -            <children> -              <leafNode name="log"> -                <properties> -                  <help>Show specified PPPoE interface log</help> -                </properties> -                <command>journalctl --no-hostname --boot --follow --unit "ppp@$4".service</command> -              </leafNode> -              <leafNode name="statistics"> -                <properties> -                  <help>Show specified PPPoE interface statistics</help> -                  <completionHelp> -                    <path>interfaces pppoe</path> -                  </completionHelp> -                </properties> -                <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="pppoe"> +         <node name="pppoe">              <properties>                <help>Show PPPoE interface information</help>              </properties> @@ -43,6 +16,33 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=pppoe</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified PPPoE interface information</help> +                  <completionHelp> +                    <path>interfaces pppoe</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pppoe</command> +                <children> +                  <leafNode name="log"> +                    <properties> +                      <help>Show specified PPPoE interface log</help> +                    </properties> +                    <command>journalctl --no-hostname --boot --follow --unit "ppp@$4".service</command> +                  </leafNode> +                  <leafNode name="statistics"> +                    <properties> +                      <help>Show specified PPPoE interface statistics</help> +                      <completionHelp> +                        <path>interfaces pppoe</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_ppp_stats.sh "$4"</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in index a9e4257ce..140e7150d 100644 --- a/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml.in @@ -4,27 +4,9 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="pseudo-ethernet"> +         <node name="pseudo-ethernet">              <properties> -              <help>Show specified Pseudo-Ethernet/MACvlan interface information</help> -              <completionHelp> -                <path>interfaces pseudo-ethernet</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pseudo-ethernet</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified pseudo-ethernet/MACvlan interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=pseudo-ethernet</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="pseudo-ethernet"> -            <properties> -              <help>Show Pseudo-Ethernet/MACvlan interface information</help> +              <help>Show pseudo-ethernet/MACvlan interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=pseudo-ethernet</command>              <children> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=pseudo-ethernet</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified pseudo-ethernet/MACvlan interface information</help> +                  <completionHelp> +                    <path>interfaces pseudo-ethernet</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=pseudo-ethernet</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified pseudo-ethernet/MACvlan interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=pseudo-ethernet</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-sstpc.xml.in b/op-mode-definitions/show-interfaces-sstpc.xml.in index 3bd7a8247..e0a53d9f4 100644 --- a/op-mode-definitions/show-interfaces-sstpc.xml.in +++ b/op-mode-definitions/show-interfaces-sstpc.xml.in @@ -4,34 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="sstpc"> -            <properties> -              <help>Show specified SSTP client interface information</help> -              <completionHelp> -                <path>interfaces sstpc</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=sstpc</command> -            <children> -              <leafNode name="log"> -                <properties> -                  <help>Show specified SSTP client interface log</help> -                </properties> -                <command>journalctl --no-hostname --boot --follow --unit "ppp@$4".service</command> -              </leafNode> -              <leafNode name="statistics"> -                <properties> -                  <help>Show specified SSTP client interface statistics</help> -                  <completionHelp> -                    <path>interfaces sstpc</path> -                  </completionHelp> -                </properties> -                <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="sstpc"> +         <node name="sstpc">              <properties>                <help>Show SSTP client interface information</help>              </properties> @@ -43,6 +16,33 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=sstpc</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified SSTP client interface information</help> +                  <completionHelp> +                    <path>interfaces sstpc</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=sstpc</command> +                <children> +                  <leafNode name="log"> +                    <properties> +                      <help>Show specified SSTP client interface log</help> +                    </properties> +                    <command>journalctl --no-hostname --boot --follow --unit "ppp@$4".service</command> +                  </leafNode> +                  <leafNode name="statistics"> +                    <properties> +                      <help>Show specified SSTP client interface statistics</help> +                      <completionHelp> +                        <path>interfaces sstpc</path> +                      </completionHelp> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_ppp_stats.sh "$4"</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-tunnel.xml.in b/op-mode-definitions/show-interfaces-tunnel.xml.in index 579b173cb..0707fe763 100644 --- a/op-mode-definitions/show-interfaces-tunnel.xml.in +++ b/op-mode-definitions/show-interfaces-tunnel.xml.in @@ -4,27 +4,9 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="tunnel"> +         <node name="tunnel">              <properties> -              <help>Show specified Tunnel interface information</help> -              <completionHelp> -                <path>interfaces tunnel</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=tunnel</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified tunnel interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=tunnel</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="tunnel"> -            <properties> -              <help>Show Tunnel interface information</help> +              <help>Show tunnel interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=tunnel</command>              <children> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=tunnel</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified tunnel interface information</help> +                  <completionHelp> +                    <path>interfaces tunnel</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=tunnel</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified tunnel interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=tunnel</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in b/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in index 4112a17af..20e1754e7 100644 --- a/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in +++ b/op-mode-definitions/show-interfaces-virtual-ethernet.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="virtual-ethernet"> -            <properties> -              <help>Show specified virtual-ethernet interface information</help> -              <completionHelp> -                <path>interfaces virtual-ethernet</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=virtual-ethernet</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified virtual-ethernet interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=virtual-ethernet</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="virtual-ethernet"> +         <node name="virtual-ethernet">              <properties>                <help>Show virtual-ethernet interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=virtual-ethernet</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified virtual-ethernet interface information</help> +                  <completionHelp> +                    <path>interfaces virtual-ethernet</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=virtual-ethernet</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified virtual-ethernet interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=virtual-ethernet</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-vti.xml.in b/op-mode-definitions/show-interfaces-vti.xml.in index d13b3e7cc..460481bde 100644 --- a/op-mode-definitions/show-interfaces-vti.xml.in +++ b/op-mode-definitions/show-interfaces-vti.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="vti"> -            <properties> -              <help>Show specified VTI interface information</help> -              <completionHelp> -                <path>interfaces vti</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vti</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified vti interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vti</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="vti"> +         <node name="vti">              <properties>                <help>Show VTI interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=vti</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified VTI interface information</help> +                  <completionHelp> +                    <path>interfaces vti</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vti</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified vti interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vti</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-vxlan.xml.in b/op-mode-definitions/show-interfaces-vxlan.xml.in index 89c8d075b..4623e9371 100644 --- a/op-mode-definitions/show-interfaces-vxlan.xml.in +++ b/op-mode-definitions/show-interfaces-vxlan.xml.in @@ -4,25 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="vxlan"> -            <properties> -              <help>Show specified VXLAN interface information</help> -              <completionHelp> -                <path>interfaces vxlan</path> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vxlan</command> -            <children> -              <leafNode name="brief"> -                <properties> -                  <help>Show summary of the specified VXLAN interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vxlan</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="vxlan"> +         <node name="vxlan">              <properties>                <help>Show VXLAN interface information</help>              </properties> @@ -34,6 +16,24 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=vxlan</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified VXLAN interface information</help> +                  <completionHelp> +                    <path>interfaces vxlan</path> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=vxlan</command> +                <children> +                  <leafNode name="brief"> +                    <properties> +                      <help>Show summary of the specified VXLAN interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=vxlan</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-wireguard.xml.in b/op-mode-definitions/show-interfaces-wireguard.xml.in index d86152a21..9457953ef 100644 --- a/op-mode-definitions/show-interfaces-wireguard.xml.in +++ b/op-mode-definitions/show-interfaces-wireguard.xml.in @@ -4,48 +4,6 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="wireguard"> -            <properties> -              <help>Show specified WireGuard interface information</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type wireguard</script> -              </completionHelp> -            </properties> -	        <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireguard</command> -            <children> -              <leafNode name="allowed-ips"> -                <properties> -                  <help>Show all IP addresses allowed for the specified interface</help> -                </properties> -                <command>sudo wg show "$4" allowed-ips</command> -              </leafNode> -              <leafNode name="endpoints"> -                <properties> -                  <help>Show all endpoints for the specified interface</help> -                </properties> -                <command>sudo wg show "$4" endpoints</command> -              </leafNode> -              <leafNode name="peers"> -                <properties> -                  <help>Show all peer IDs for the specified interface</help> -                </properties> -                <command>sudo wg show "$4" peers</command> -              </leafNode> -              <leafNode name="public-key"> -                <properties> -                  <help>Show interface public-key</help> -                </properties> -                <command>sudo wg show "$4" public-key</command> -              </leafNode> -              <leafNode name="summary"> -                <properties> -                  <help>Shows current configuration and device information</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces_wireguard.py show_summary --intf-name="$4"</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode>            <node name="wireguard">              <properties>                <help>Show WireGuard interface information</help> @@ -58,6 +16,48 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=wireguard</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified WireGuard interface information</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type wireguard</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireguard</command> +                <children> +                  <leafNode name="allowed-ips"> +                    <properties> +                      <help>Show all IP addresses allowed for the specified interface</help> +                    </properties> +                    <command>wg show "$4" allowed-ips</command> +                  </leafNode> +                  <leafNode name="endpoints"> +                    <properties> +                      <help>Show all endpoints for the specified interface</help> +                    </properties> +                    <command>wg show "$4" endpoints</command> +                  </leafNode> +                  <leafNode name="peers"> +                    <properties> +                      <help>Show all peer IDs for the specified interface</help> +                    </properties> +                    <command>wg show "$4" peers</command> +                  </leafNode> +                  <leafNode name="public-key"> +                    <properties> +                      <help>Show interface public-key</help> +                    </properties> +                    <command>wg show "$4" public-key</command> +                  </leafNode> +                  <leafNode name="summary"> +                    <properties> +                      <help>Shows current configuration and device information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces_wireguard.py show_summary --intf-name="$4"</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces-wireless.xml.in b/op-mode-definitions/show-interfaces-wireless.xml.in index b0a1502de..55e23adf5 100644 --- a/op-mode-definitions/show-interfaces-wireless.xml.in +++ b/op-mode-definitions/show-interfaces-wireless.xml.in @@ -6,7 +6,7 @@          <children>            <node name="wireless">              <properties> -              <help>Show Wireless (WLAN) interface information</help> +              <help>Show wireless (WLAN) interface information</help>              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-type=wireless</command>              <children> @@ -22,61 +22,61 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces_wireless.py show_info</command>                </leafNode> -            </children> -          </node> -          <tagNode name="wireless"> -            <properties> -              <help>Show specified wireless interface information</help> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces --type wireless</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireless</command> -            <children> -              <leafNode name="brief"> +              <virtualTagNode>                  <properties> -                  <help>Show brief summary of the specified wireless interface</help> +                  <help>Show specified wireless interface information</help> +                  <completionHelp> +                    <script>${vyos_completion_dir}/list_interfaces --type wireless</script> +                  </completionHelp>                  </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=wireless</command> -              </leafNode> -              <node name="scan"> -                <properties> -                  <help>Scan for networks via specified wireless interface</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/interfaces_wireless.py show_scan --intf-name="$4"</command> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wireless</command>                  <children> -                  <leafNode name="detail"> +                  <leafNode name="brief">                      <properties> -                      <help>Show detailed scan results</help> +                      <help>Show brief summary of the specified wireless interface</help>                      </properties> -                    <command>sudo /sbin/iw dev "$4" scan ap-force</command> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4" --intf-type=wireless</command>                    </leafNode> -                </children> -              </node> -              <leafNode name="stations"> -                <properties> -                  <help>Show specified Wireless interface information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces_wireless.py show_stations --intf-name="$4"</command> -              </leafNode> -              <tagNode name="vif"> -                <properties> -                  <help>Show specified virtual network interface (vif) information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=wireless</command> -                <children> -                  <leafNode name="brief"> +                  <node name="scan">                      <properties> -                      <help>Show summary of specified virtual network interface (vif) information</help> +                      <help>Scan for networks via specified wireless interface</help>                      </properties> -                    <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=wireless</command> +                    <command>${vyos_op_scripts_dir}/interfaces_wireless.py show_scan --intf-name="$4"</command> +                    <children> +                      <leafNode name="detail"> +                        <properties> +                          <help>Show detailed scan results</help> +                        </properties> +                        <command>/sbin/iw dev "$4" scan ap-force</command> +                      </leafNode> +                    </children> +                  </node> +                  <leafNode name="stations"> +                    <properties> +                      <help>Show specified wireless interface information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces_wireless.py show_stations --intf-name="$4"</command>                    </leafNode> +                  <tagNode name="vif"> +                    <properties> +                      <help>Show specified virtual network interface (vif) information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4.$6" --intf-type=wireless</command> +                    <children> +                      <leafNode name="brief"> +                        <properties> +                          <help>Show summary of specified virtual network interface (vif) information</help> +                        </properties> +                        <command>${vyos_op_scripts_dir}/interfaces.py show_summary --intf-name="$4.$6" --intf-type=wireless</command> +                      </leafNode> +                    </children> +                  </tagNode> +                  #include <include/show-interface-type-event-log.xml.i>                  </children> -              </tagNode> -              #include <include/show-interface-type-event-log.xml.i> +              </virtualTagNode>              </children> -          </tagNode> -        </children> +          </node> +       </children>        </node>      </children>    </node> diff --git a/op-mode-definitions/show-interfaces-wwan.xml.in b/op-mode-definitions/show-interfaces-wwan.xml.in index 2301b32d0..6616de9dc 100644 --- a/op-mode-definitions/show-interfaces-wwan.xml.in +++ b/op-mode-definitions/show-interfaces-wwan.xml.in @@ -4,86 +4,7 @@      <children>        <node name="interfaces">          <children> -          <tagNode name="wwan"> -            <properties> -              <help>Show specified Wireless Wire Area Network (WWAN) interface information</help> -              <completionHelp> -                <path>interfaces wwan</path> -                <script>cd /sys/class/net; ls -d wwan*</script> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wirelessmodem</command> -            <children> -              <leafNode name="capabilities"> -                <properties> -                  <help>Show WWAN module capabilities</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --capabilities</command> -              </leafNode> -              <leafNode name="firmware"> -                <properties> -                  <help>Show WWAN module firmware</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --firmware</command> -              </leafNode> -              <leafNode name="imei"> -                <properties> -                  <help>Show WWAN module IMEI/ESN/MEID</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imei</command> -              </leafNode> -              <leafNode name="imsi"> -                <properties> -                  <help>Show WWAN module IMSI</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imsi</command> -              </leafNode> -              <leafNode name="model"> -                <properties> -                  <help>Show WWAN module manufacturer</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --model</command> -              </leafNode> -              <leafNode name="msisdn"> -                <properties> -                  <help>Show WWAN module MSISDN</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --msisdn</command> -              </leafNode> -              <leafNode name="revision"> -                <properties> -                  <help>Show WWAN module revision</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --revision</command> -              </leafNode> -              <leafNode name="signal"> -                <properties> -                  <help>Show WWAN module RF signal info</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --signal</command> -              </leafNode> -              <leafNode name="sim"> -                <properties> -                  <help>Show WWAN module connected SIM card information</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --sim</command> -              </leafNode> -              <leafNode name="detail"> -                <properties> -                  <help>Show WWAN module detailed information summary</help> -                </properties> -                <command>if cli-shell-api existsActive interfaces wwan $4; then mmcli --modem ${4#wwan}; else echo "Interface \"$4\" unconfigured!"; fi</command> -              </leafNode> -              <leafNode name="log"> -                <properties> -                  <help>Show interface log for specified interface</help> -                </properties> -                <command>echo not implemented</command> -              </leafNode> -              #include <include/show-interface-type-event-log.xml.i> -            </children> -          </tagNode> -          <node name="wwan"> +         <node name="wwan">              <properties>                <help>Show Wireless Modem (WWAN) interface information</help>              </properties> @@ -95,6 +16,85 @@                  </properties>                  <command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=wwan</command>                </leafNode> +              <virtualTagNode> +                <properties> +                  <help>Show specified Wireless Wire Area Network (WWAN) interface information</help> +                  <completionHelp> +                    <path>interfaces wwan</path> +                    <script>cd /sys/class/net; ls -d wwan*</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show --intf-name="$4" --intf-type=wirelessmodem</command> +                <children> +                  <leafNode name="capabilities"> +                    <properties> +                      <help>Show WWAN module capabilities</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --capabilities</command> +                  </leafNode> +                  <leafNode name="firmware"> +                    <properties> +                      <help>Show WWAN module firmware</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --firmware</command> +                  </leafNode> +                  <leafNode name="imei"> +                    <properties> +                      <help>Show WWAN module IMEI/ESN/MEID</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imei</command> +                  </leafNode> +                  <leafNode name="imsi"> +                    <properties> +                      <help>Show WWAN module IMSI</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imsi</command> +                  </leafNode> +                  <leafNode name="model"> +                    <properties> +                      <help>Show WWAN module manufacturer</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --model</command> +                  </leafNode> +                  <leafNode name="msisdn"> +                    <properties> +                      <help>Show WWAN module MSISDN</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --msisdn</command> +                  </leafNode> +                  <leafNode name="revision"> +                    <properties> +                      <help>Show WWAN module revision</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --revision</command> +                  </leafNode> +                  <leafNode name="signal"> +                    <properties> +                      <help>Show WWAN module RF signal info</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --signal</command> +                  </leafNode> +                  <leafNode name="sim"> +                    <properties> +                      <help>Show WWAN module connected SIM card information</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --sim</command> +                  </leafNode> +                  <leafNode name="detail"> +                    <properties> +                      <help>Show WWAN module detailed information summary</help> +                    </properties> +                    <command>if cli-shell-api existsActive interfaces wwan $4; then mmcli --modem ${4#wwan}; else echo "Interface \"$4\" unconfigured!"; fi</command> +                  </leafNode> +                  <leafNode name="log"> +                    <properties> +                      <help>Show interface log for specified interface</help> +                    </properties> +                    <command>echo not implemented</command> +                  </leafNode> +                  #include <include/show-interface-type-event-log.xml.i> +                </children> +              </virtualTagNode>              </children>            </node>          </children> diff --git a/op-mode-definitions/show-interfaces.xml.in b/op-mode-definitions/show-interfaces.xml.in index 09466647d..e2d7d3dd3 100644 --- a/op-mode-definitions/show-interfaces.xml.in +++ b/op-mode-definitions/show-interfaces.xml.in @@ -26,6 +26,48 @@              </properties>              <command>${vyos_op_scripts_dir}/interfaces.py show_summary</command>            </leafNode> +          <node name="kernel"> +            <properties> +              <help>Show all interfaces on this system</help> +            </properties> +            <command>${vyos_op_scripts_dir}/interfaces.py show_kernel</command> +            <children> +              <virtualTagNode> +                <properties> +                  <completionHelp> +                    <script>ip -j link show | jq -r '.[].ifname'</script> +                  </completionHelp> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show_kernel --intf-name=$4</command> +                <children> +                  <leafNode name="detail"> +                    <properties> +                      <help>Show system interface in JSON format</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_kernel --intf-name=$4 --detail</command> +                  </leafNode> +                  <leafNode name="json"> +                    <properties> +                      <help>Show system interface in JSON format</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/interfaces.py show_kernel --intf-name=$4 --raw</command> +                  </leafNode> +                </children> +              </virtualTagNode> +              <leafNode name="detail"> +                <properties> +                  <help>Show system interface in JSON format</help> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show_kernel --detail</command> +              </leafNode> +              <leafNode name="json"> +                <properties> +                  <help>Show all interfaces in JSON format</help> +                </properties> +                <command>${vyos_op_scripts_dir}/interfaces.py show_kernel --raw</command> +              </leafNode> +            </children> +          </node>          </children>        </node>      </children> diff --git a/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml.in b/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml.in index d7222516a..7a466d8c1 100644 --- a/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml.in +++ b/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml.in @@ -7,65 +7,57 @@            <help>Show IPv4 routing information</help>          </properties>          <children> -          <leafNode name="access-list"> -            <properties> -              <help>Show all IP access-lists</help> -            </properties> -            <command>vtysh -c "show ip access-list"</command> -          </leafNode>            <tagNode name="access-list">              <properties> -              <help>Show all IP access-lists</help> +              <help>Show IP access-list</help>                <completionHelp>                  <path>policy access-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show ip access-list $4"</command> +            <standalone> +              <help>Show all IP access lists</help> +              <command>vtysh -c "show ip access-list"</command> +            </standalone>            </tagNode> -          <leafNode name="as-path-access-list"> -            <properties> -              <help>Show all as-path-access-lists</help> -            </properties> -            <command>vtysh -c "show ip as-path-access-list"</command> -          </leafNode>            <tagNode name="as-path-access-list">              <properties> -              <help>Show all as-path-access-lists</help> +              <help>Show as-path-access-list</help>                <completionHelp>                  <path>policy as-path-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show ip as-path-access-list $4"</command> +            <standalone> +              <help>Show all AS path access lists</help> +              <command>vtysh -c "show ip as-path-access-list"</command> +            </standalone>            </tagNode> -          <leafNode name="community-list"> -            <properties> -              <help>Show IP community-lists</help> -            </properties> -            <command>vtysh -c "show bgp community-list"</command> -          </leafNode>            <tagNode name="community-list">              <properties> -              <help>Show IP community-lists</help> +              <help>Show BGP community-list</help>                <completionHelp>                  <path>policy community-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show bgp community-list $4 detail"</command> +            <standalone> +              <help>Show all BGP community lists</help> +              <command>vtysh -c "show bgp community-list"</command> +            </standalone>            </tagNode> -          <leafNode name="extcommunity-list"> -            <properties> -              <help>Show extended IP community-lists</help> -            </properties> -            <command>vtysh -c "show bgp extcommunity-list"</command> -          </leafNode>            <tagNode name="extcommunity-list">              <properties> -              <help>Show extended IP community-lists</help> +              <help>Show extended BGP community list</help>                <completionHelp>                  <path>policy extcommunity-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show bgp extcommunity-list $4 detail"</command> +            <standalone> +              <help>Show all extended BGP community lists</help> +              <command>vtysh -c "show bgp extcommunity-list"</command> +            </standalone>            </tagNode>            <leafNode name="forwarding">              <properties> @@ -73,35 +65,31 @@              </properties>              <command>vtysh -c "show ip forwarding"</command>            </leafNode> -          <leafNode name="large-community-list"> -            <properties> -              <help>Show IP large-community-lists</help> -            </properties> -            <command>vtysh -c "show bgp large-community-list"</command> -          </leafNode>            <tagNode name="large-community-list">              <properties> -              <help>Show IP large-community-lists</help> +              <help>Show BGP large-community-list</help>                <completionHelp>                  <path>policy large-community-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show bgp large-community-list $4 detail"</command> +            <standalone> +              <help>Show all BGP large community lists</help> +              <command>vtysh -c "show bgp large-community-list"</command> +            </standalone>            </tagNode> -          <leafNode name="prefix-list"> -            <properties> -              <help>Show all IP prefix-lists</help> -            </properties> -            <command>vtysh -c "show ip prefix-list"</command> -          </leafNode>            <tagNode name="prefix-list">              <properties> -              <help>Show all IP prefix-lists</help> +              <help>Show IP prefix-list</help>                <completionHelp>                  <path>policy prefix-list</path>                </completionHelp>              </properties>              <command>vtysh -c "show ip prefix-list $4"</command> +            <standalone> +              <help>Show all IP prefix lists</help> +              <command>vtysh -c "show ip prefix-list"</command> +            </standalone>            </tagNode>            <leafNode name="protocol">              <properties> diff --git a/op-mode-definitions/show-ip-bgp.xml.in b/op-mode-definitions/show-ip-bgp.xml.in index ecef320bf..f2b98582e 100644 --- a/op-mode-definitions/show-ip-bgp.xml.in +++ b/op-mode-definitions/show-ip-bgp.xml.in @@ -11,12 +11,6 @@              <command>vtysh -c "show ip bgp"</command>              <children>                #include <include/bgp/show-ip-bgp-common.xml.i> -              <leafNode name="vrf"> -                <properties> -                  <help>Show BGP VRF information</help> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -              </leafNode>                <tagNode name="vrf">                  <properties>                    <help>Show BGP VRF related information</help> @@ -25,6 +19,10 @@                      <list>all</list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Show BGP VRF information</help> +                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                </standalone>                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>                  <children>                    #include <include/bgp/show-ip-bgp-common.xml.i> diff --git a/op-mode-definitions/show-ip-ports.xml.in b/op-mode-definitions/show-ip-ports.xml.in index a74b68ffc..0d4eec351 100644 --- a/op-mode-definitions/show-ip-ports.xml.in +++ b/op-mode-definitions/show-ip-ports.xml.in @@ -8,7 +8,7 @@              <properties>                <help>Show IP ports in use by various system services</help>              </properties> -            <command>sudo /usr/bin/netstat -tulnp</command> +            <command>/usr/bin/netstat -tulnp</command>            </leafNode>          </children>        </node> diff --git a/op-mode-definitions/show-ip-route.xml.in b/op-mode-definitions/show-ip-route.xml.in index 37279d3d2..bbac433c7 100644 --- a/op-mode-definitions/show-ip-route.xml.in +++ b/op-mode-definitions/show-ip-route.xml.in @@ -13,13 +13,24 @@              </properties>              <command>vtysh -c "show ip route"</command>              <children> -              #include <include/show-route-bgp.xml.i> -              <node name="cache"> +              <virtualTagNode>                  <properties> -                  <help>Show kernel route cache</help> +                  <help>Show IP routes of specified IP address or prefix</help> +                  <completionHelp> +                    <list><x.x.x.x> <x.x.x.x/x></list> +                  </completionHelp>                  </properties> -                <command>ip -s route list cache</command> -              </node> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <children> +                  <leafNode name="longer-prefixes"> +                    <properties> +                      <help>Show longer prefixes of routes for specified prefix</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                  </leafNode> +                </children> +              </virtualTagNode> +              #include <include/show-route-bgp.xml.i>                <tagNode name="cache">                  <properties>                    <help>Show kernel route cache for a given route</help> @@ -27,15 +38,13 @@                      <list><x.x.x.x> <x.x.x.x/x></list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Show kernel route cache</help> +                  <command>ip -s route list cache</command> +                </standalone>                  <command>ip -s route list cache $5</command>                </tagNode>                #include <include/show-route-connected.xml.i> -              <node name="forward"> -                <properties> -                  <help>Show kernel route table</help> -                </properties> -                <command>ip route list</command> -              </node>                <tagNode name="forward">                  <properties>                    <help>Show kernel route table for a given route</help> @@ -43,6 +52,10 @@                      <list><x.x.x.x> <x.x.x.x/x></list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Show kernel route table</help> +                  <command>ip route list</command> +                </standalone>                  <command>ip -s route list $5</command>                </tagNode>                #include <include/show-route-isis.xml.i> @@ -93,7 +106,7 @@                    #include <include/show-route-static.xml.i>                    #include <include/show-route-supernets-only.xml.i>                    #include <include/show-route-tag.xml.i> -                  <node name="node.tag"> +                  <virtualTagNode>                      <properties>                        <help>Show IP routes of specified IP address or prefix</help>                        <completionHelp> @@ -109,28 +122,11 @@                          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>                        </leafNode>                      </children> -                  </node> +                  </virtualTagNode>                  </children>                </tagNode>              </children>            </node> -          <tagNode name="route"> -            <properties> -              <help>Show IP routes of specified IP address or prefix</help> -              <completionHelp> -                <list><x.x.x.x> <x.x.x.x/x></list> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            <children> -              <leafNode name="longer-prefixes"> -                <properties> -                  <help>Show longer prefixes of routes for specified prefix</help> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -              </leafNode> -            </children> -          </tagNode>          </children>        </node>      </children> diff --git a/op-mode-definitions/show-ipv6-ospfv3.xml.in b/op-mode-definitions/show-ipv6-ospfv3.xml.in index e1fcf470f..b4a1c6c8a 100644 --- a/op-mode-definitions/show-ipv6-ospfv3.xml.in +++ b/op-mode-definitions/show-ipv6-ospfv3.xml.in @@ -13,12 +13,6 @@              </properties>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>              <children> -              <node name="area"> -                <properties> -                  <help>Show Shortest Path First tree information</help> -                </properties> -                <command>vtysh -c "show ipv6 ospf6 spf tree"</command> -              </node>                <tagNode name="area">                  <properties>                    <help>Area ID (as an IPv4 notation)</help> @@ -27,6 +21,10 @@                    </completionHelp>                  </properties>                  <command>vtysh -c "show ipv6 ospf6 area $5 spf tree"</command> +                <standalone> +                  <help>Show Shortest Path First tree information</help> +                  <command>vtysh -c "show ipv6 ospf6 spf tree"</command> +                </standalone>                  <children>                    <tagNode name="router">                      <properties> @@ -47,16 +45,6 @@                #include <include/ospfv3/neighbor.xml.i>                #include <include/ospfv3/redistribute.xml.i>                #include <include/ospfv3/route.xml.i> -              <node name="vrf"> -                <properties> -                  <help>Specify the VRF</help> -                  <completionHelp> -                    <list>all</list> -                    <path>vrf name</path> -                  </completionHelp> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -              </node>                <tagNode name="vrf">                  <properties>                    <help>VRF name</help> @@ -66,13 +54,11 @@                    </completionHelp>                  </properties>                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <standalone> +                  <help>Show OSPFv3 information in given VRF</help> +                  <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                </standalone>                  <children> -                  <node name="area"> -                    <properties> -                      <help>Show Shortest Path First tree information</help> -                    </properties> -                    <command>vtysh -c "show ipv6 ospf6 vrf $5 spf tree"</command> -                  </node>                    <tagNode name="area">                      <properties>                        <help>Area ID (as an IPv4 notation)</help> @@ -81,6 +67,10 @@                        </completionHelp>                      </properties>                      <command>vtysh -c "show ipv6 ospf6 vrf $5 area $7 spf tree"</command> +                    <standalone> +                      <help>Show Shortest Path First tree information</help> +                      <command>vtysh -c "show ipv6 ospf6 vrf $5 spf tree"</command> +                    </standalone>                      <children>                        <tagNode name="router">                          <properties> diff --git a/op-mode-definitions/show-ipv6-prefix-list.xml.in b/op-mode-definitions/show-ipv6-prefix-list.xml.in index e003ad110..db1a2754e 100644 --- a/op-mode-definitions/show-ipv6-prefix-list.xml.in +++ b/op-mode-definitions/show-ipv6-prefix-list.xml.in @@ -13,78 +13,72 @@              </properties>              <command>vtysh -c "show ipv6 prefix-list"</command>              <children> -              <node name="detail"> +              <virtualTagNode>                  <properties> -                  <help>Show detail of IPv6 prefix-lists</help> -                </properties> -                <command>vtysh -c "show ipv6 prefix-list detail"</command> -              </node> -              <tagNode name="detail"> -                <properties> -                  <help>Show detail of specified IPv6 prefix-list</help> -                </properties> -                <command>vtysh -c "show ipv6 prefix-list detail $5"</command> -              </tagNode> -              <node name="summary"> -                <properties> -                  <help>Show summary of IPv6 prefix-lists</help> -                </properties> -                <command>vtysh -c "show ipv6 prefix-list summary"</command> -              </node> -              <tagNode name="summary"> -                <properties> -                  <help>Show summary of specified IPv6 prefix-list</help> -                </properties> -                <command>vtysh -c "show ipv6 prefix-list summary $5"</command> -              </tagNode> -            </children> -          </node> -          <tagNode name="prefix-list"> -            <properties> -              <help>Show specified IPv6 prefix-list</help> -              <completionHelp> -                <list>WORD</list> -              </completionHelp> -            </properties> -            <command>vtysh -c "show ipv6 prefix-list $4"</command> -            <children> -              <node name="node.tag"> -                <properties> -                  <help>Show select prefix of specified IPv6 prefix-list</help> +                  <help>Show specified IPv6 prefix-list</help>                    <completionHelp> -                    <list><h:h:h:h:h:h:h:h/x></list> +                    <list>WORD</list>                    </completionHelp>                  </properties> -                <command>vtysh -c "show ipv6 prefix-list $4 $5"</command> +                <command>vtysh -c "show ipv6 prefix-list $4"</command>                  <children> -                  <node name="first-match"> +                  <virtualTagNode>                      <properties> -                      <help>Show first-match from select prefix of named IPv6 prefix-list</help> +                      <help>Show select prefix of specified IPv6 prefix-list</help> +                      <completionHelp> +                        <list><h:h:h:h:h:h:h:h/x></list> +                      </completionHelp>                      </properties> -                    <command>vtysh -c "show ipv6 prefix-list $4 $5 first-match"</command> -                  </node> -                  <node name="longer"> +                    <command>vtysh -c "show ipv6 prefix-list $4 $5"</command> +                    <children> +                      <node name="first-match"> +                        <properties> +                          <help>Show first-match from select prefix of named IPv6 prefix-list</help> +                        </properties> +                        <command>vtysh -c "show ipv6 prefix-list $4 $5 first-match"</command> +                      </node> +                      <node name="longer"> +                        <properties> +                          <help>Show longer match of select prefix from named IPv6 prefix-list</help> +                        </properties> +                        <command>vtysh -c "show ipv6 prefix-list $4 $5 longer"</command> +                      </node> +                    </children> +                  </virtualTagNode> +                  <tagNode name="seq">                      <properties> -                      <help>Show longer match of select prefix from named IPv6 prefix-list</help> +                      <help>Show specified sequence from specified IPv6 prefix-list</help>                      </properties> -                    <command>vtysh -c "show ipv6 prefix-list $4 $5 longer"</command> -                  </node> +                    <standalone> +                      <help>Show specified sequence from specified IPv6 prefix-list</help> +                      <command>vtysh -c "show ipv6 prefix-list $4 seq"</command> +                    </standalone> +                    <command>vtysh -c "show ipv6 prefix-list $4 seq $6"</command> +                  </tagNode>                  </children> -              </node> -              <node name="seq"> +              </virtualTagNode> +              <tagNode name="detail">                  <properties> -                  <help>Show specified sequence from specified IPv6 prefix-list</help> +                  <help>Show detail of specified IPv6 prefix-list</help>                  </properties> -                <command>vtysh -c "show ipv6 prefix-list $4 seq"</command> -              </node> -              <tagNode name="seq"> +                <command>vtysh -c "show ipv6 prefix-list detail $5"</command> +                <standalone> +                  <help>Show details of IPv6 prefix lists</help> +                  <command>vtysh -c "show ipv6 prefix-list detail"</command> +                </standalone> +              </tagNode> +              <tagNode name="summary">                  <properties> -                  <help>Show specified sequence from specified IPv6 prefix-list</help> +                  <help>Show summary of specified IPv6 prefix-list</help>                  </properties> -                <command>vtysh -c "show ipv6 prefix-list $4 seq $6"</command> +                <command>vtysh -c "show ipv6 prefix-list summary $5"</command> +                <standalone> +                  <help>Show summary of IPv6 prefix lists</help> +                  <command>vtysh -c "show ipv6 prefix-list summary"</command> +                </standalone>                </tagNode>              </children> -          </tagNode> +          </node>          </children>        </node>      </children> diff --git a/op-mode-definitions/show-ipv6-route.xml.in b/op-mode-definitions/show-ipv6-route.xml.in index f68a94971..8690ed710 100644 --- a/op-mode-definitions/show-ipv6-route.xml.in +++ b/op-mode-definitions/show-ipv6-route.xml.in @@ -13,13 +13,24 @@              </properties>              <command>vtysh -c "show ipv6 route"</command>              <children> -              #include <include/show-route-bgp.xml.i> -              <node name="cache"> +              <virtualTagNode>                  <properties> -                  <help>Show kernel IPv6 route cache</help> +                  <help>Show IPv6 routes of given address or prefix</help> +                  <completionHelp> +                    <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> +                  </completionHelp>                  </properties> -                <command>ip -s -f inet6 route list cache</command> -              </node> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                <children> +                  <node name="longer-prefixes"> +                    <properties> +                      <help>Show longer prefixes of routes for given prefix</help> +                    </properties> +                    <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +                  </node> +                </children> +              </virtualTagNode> +              #include <include/show-route-bgp.xml.i>                <tagNode name="cache">                  <properties>                    <help>Show kernel IPv6 route cache for a given route</help> @@ -27,15 +38,13 @@                      <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Show kernel IPv6 route cache</help> +                  <command>ip -s -f inet6 route list cache</command> +                </standalone>                  <command>ip -s -f inet6 route list cache $5</command>                </tagNode>                #include <include/show-route-connected.xml.i> -              <node name="forward"> -                <properties> -                  <help>Show kernel IPv6 route table</help> -                </properties> -                <command>ip -f inet6 route list</command> -              </node>                <tagNode name="forward">                  <properties>                    <help>Show kernel IPv6 route table for a given route</help> @@ -43,6 +52,10 @@                      <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list>                    </completionHelp>                  </properties> +                <standalone> +                  <help>Show kernel IPv6 route table</help> +                  <command>ip -f inet6 route list</command> +                </standalone>                  <command>ip -s -f inet6 route list $5</command>                </tagNode>                #include <include/show-route-isis.xml.i> @@ -83,7 +96,7 @@                      </properties>                      <command>${vyos_op_scripts_dir}/route.py show_summary --family inet6 --vrf $5</command>                    </node> -                  <node name="node.tag"> +                  <virtualTagNode>                      <properties>                        <help>Show IPv6 routes of given address or prefix</help>                        <completionHelp> @@ -99,7 +112,7 @@                          <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>                        </node>                      </children> -                  </node> +                  </virtualTagNode>                    #include <include/show-route-bgp.xml.i>                    #include <include/show-route-connected.xml.i>                    #include <include/show-route-isis.xml.i> @@ -114,23 +127,6 @@                </tagNode>              </children>            </node> -          <tagNode name="route"> -            <properties> -              <help>Show IPv6 routes of given address or prefix</help> -              <completionHelp> -                <list><h:h:h:h:h:h:h:h> <h:h:h:h:h:h:h:h/x></list> -              </completionHelp> -            </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -            <children> -              <node name="longer-prefixes"> -                <properties> -                  <help>Show longer prefixes of routes for given prefix</help> -                </properties> -                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -              </node> -            </children> -          </tagNode>          </children>        </node>      </children> diff --git a/op-mode-definitions/show-ipv6.xml.in b/op-mode-definitions/show-ipv6.xml.in index e10379ac2..314a686fe 100644 --- a/op-mode-definitions/show-ipv6.xml.in +++ b/op-mode-definitions/show-ipv6.xml.in @@ -7,12 +7,6 @@            <help>Show IPv6 networking information</help>          </properties>          <children> -          <node name="access-list"> -            <properties> -              <help>Show all IPv6 access-lists</help> -            </properties> -            <command>vtysh -c "show ipv6 access-list"</command> -          </node>            <tagNode name="access-list">              <properties>                <help>Show specified IPv6 access-list</help> @@ -21,6 +15,10 @@                </completionHelp>              </properties>              <command>vtysh -c "show ipv6 access-list $4"</command> +            <standalone> +              <help>Show all IPv6 access-lists</help> +              <command>vtysh -c "show ipv6 access-list"</command> +            </standalone>            </tagNode>            <node name="forwarding">              <properties> diff --git a/op-mode-definitions/show-kernel-modules.xml.in b/op-mode-definitions/show-kernel-modules.xml.in index 28eb28212..67a0130fb 100644 --- a/op-mode-definitions/show-kernel-modules.xml.in +++ b/op-mode-definitions/show-kernel-modules.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Show kernel modules</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/kernel_modules.py show</command> +            <command>${vyos_op_scripts_dir}/kernel_modules.py show</command>            </node>          </children>        </node> diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index ee2e2bf70..499e7f84b 100755 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -5,21 +5,21 @@        <help>Show system information</help>      </properties>      <children> -      <tagNode name="log"> -        <properties> -          <help>Show last number of messages in master logging buffer</help> -          <completionHelp> -            <list><1-9999></list> -          </completionHelp> -        </properties> -        <command>if ${vyos_validators_dir}/numeric --range 1-9999 "$3"; then journalctl --no-hostname --boot --lines "$3"; fi</command> -      </tagNode> -      <node name="log"> +     <node name="log">          <properties>            <help>Show contents of current master logging buffer</help>          </properties>          <command>journalctl --no-hostname --boot</command>          <children> +          <virtualTagNode> +            <properties> +              <help>Show last number of messages in master logging buffer</help> +              <completionHelp> +                <list><1-9999></list> +              </completionHelp> +            </properties> +            <command>if ${vyos_validators_dir}/numeric --range 1-9999 "$3"; then journalctl --no-hostname --boot --lines "$3"; fi</command> +          </virtualTagNode>            <leafNode name="audit">              <properties>                <help>Show audit logs</help> @@ -30,7 +30,7 @@              <properties>                <help>Show contents of all master log files</help>              </properties> -            <command>sudo bash -c 'eval $(lesspipe); less $_vyatta_less_options --prompt=".logm, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr`'</command> +            <command>bash -c 'eval $(lesspipe); less $_vyatta_less_options --prompt=".logm, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr`'</command>            </leafNode>            <leafNode name="authorization">              <properties> @@ -42,7 +42,7 @@              <properties>                <help>Show log for certbot</help>              </properties> -            <command>if sudo test -f /var/log/letsencrypt/letsencrypt.log; then sudo cat /var/log/letsencrypt/letsencrypt.log; else echo "Cerbot log does not exist"; fi</command> +            <command>if test -f /var/log/letsencrypt/letsencrypt.log; then cat /var/log/letsencrypt/letsencrypt.log; else echo "Cerbot log does not exist"; fi</command>            </leafNode>            <leafNode name="cluster">              <properties> @@ -559,6 +559,12 @@              </properties>              <command>journalctl --no-hostname --boot --unit frr.service</command>            </leafNode> +          <leafNode name="haproxy"> +            <properties> +              <help>Show log for HAProxy</help> +            </properties> +            <command>journalctl --no-hostname --boot --unit haproxy.service</command> +          </leafNode>            <leafNode name="https">              <properties>                <help>Show log for HTTPs</help> @@ -671,12 +677,6 @@              </properties>              <command>journalctl --no-hostname --boot --unit ndppd.service</command>            </leafNode> -          <leafNode name="nhrp"> -            <properties> -              <help>Show log for Next Hop Resolution Protocol (NHRP)</help> -            </properties> -            <command>journalctl --no-hostname --boot --unit opennhrp.service</command> -          </leafNode>            <leafNode name="ntp">              <properties>                <help>Show log for Network Time Protocol (NTP)</help> @@ -831,6 +831,12 @@              </properties>              <command>journalctl --no-hostname --boot --unit snmpd.service</command>            </leafNode> +          <leafNode name="spanning-tree"> +            <properties> +              <help>Show log for Spanning Tree Protocol (STP)</help> +            </properties> +            <command>journalctl --dmesg --no-hostname --boot --grep='br[0-9].*(stp|bpdu|blocking|disabled|forwarding|listening|root port)'</command> +          </leafNode>            <node name="ssh">              <properties>                <help>Show log for Secure Shell (SSH)</help> @@ -852,14 +858,12 @@                  <list><NUMBER></list>                </completionHelp>              </properties> +            <standalone> +              <help>Show last 10 lines of /var/log/messages file</help> +              <command>tail -n 10 /var/log/messages</command> +            </standalone>              <command>tail -n "$4" /var/log/messages | ${VYATTA_PAGER:-cat}</command>            </tagNode> -          <node name="tail"> -            <properties> -              <help>Show last 10 lines of /var/log/messages file</help> -            </properties> -            <command>tail -n 10 /var/log/messages</command> -          </node>            <leafNode name="vpn">              <properties>                <help>Show log for ALL Virtual Private Network services</help> diff --git a/op-mode-definitions/show-login.xml.in b/op-mode-definitions/show-login.xml.in index 6d8c782c4..664677bc6 100644 --- a/op-mode-definitions/show-login.xml.in +++ b/op-mode-definitions/show-login.xml.in @@ -14,12 +14,6 @@              </properties>              <command>/usr/bin/id -Gn</command>            </leafNode> -          <leafNode name="level"> -            <properties> -              <help>Show current login level</help> -            </properties> -            <command>if [ -n "$VYATTA_USER_LEVEL_DIR" ]; then basename $VYATTA_USER_LEVEL_DIR; fi</command> -          </leafNode>            <leafNode name="user">              <properties>                <help>Show current login user id</help> diff --git a/op-mode-definitions/show-mpls.xml.in b/op-mode-definitions/show-mpls.xml.in index 86f6f1bcc..43fa26b64 100644 --- a/op-mode-definitions/show-mpls.xml.in +++ b/op-mode-definitions/show-mpls.xml.in @@ -18,6 +18,23 @@                  </properties>                  <command>vtysh -c "show mpls ldp binding"</command>                  <children> +                  <virtualTagNode> +                    <properties> +                      <help>LDP forwarding equivalence class</help> +                      <completionHelp> +                        <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list> +                      </completionHelp> +                    </properties> +                    <command>vtysh -c "show mpls ldp binding $5"</command> +                    <children> +                      <leafNode name="detail"> +                        <properties> +                          <help>Show detailed information</help> +                        </properties> +                        <command>vtysh -c "show mpls ldp binding $5 detail"</command> +                      </leafNode> +                    </children> +                  </virtualTagNode>                    <node name="detail">                      <properties>                        <help>Show detailed information</help> @@ -116,23 +133,6 @@                    </tagNode>                  </children>                </node> -              <tagNode name="binding"> -                <properties> -                  <help>LDP forwarding equivalence class</help> -                  <completionHelp> -                    <list><x.x.x.x/x> <h:h:h:h:h:h:h:h/h></list> -                  </completionHelp> -                </properties> -                <command>vtysh -c "show mpls ldp binding $5"</command> -                <children> -                  <leafNode name="detail"> -                    <properties> -                      <help>Show detailed information</help> -                    </properties> -                    <command>vtysh -c "show mpls ldp binding $5 detail"</command> -                  </leafNode> -                </children> -              </tagNode>                <node name="discovery">                  <properties>                    <help>Discovery hello information</help> @@ -171,32 +171,32 @@                      </properties>                      <command>vtysh -c "show mpls ldp neighbor capabilities"</command>                    </leafNode> -                </children> -              </node> -              <tagNode name="neighbor"> -                <properties> -                  <help>LDP neighbor</help> -                  <completionHelp> -                    <list><x.x.x.x> <h:h:h:h:h:h:h:h></list> -                    <script>vtysh -c "show mpls ldp neighbor" | awk '{print $2}' | egrep -v "ID"</script> -                  </completionHelp> -                </properties> -                <command>vtysh -c "show mpls ldp neighbor $5"</command> -                <children> -                  <leafNode name="detail"> -                    <properties> -                      <help>Show detailed information</help> -                    </properties> -                    <command>vtysh -c "show mpls ldp neighbor $5 detail"</command> -                  </leafNode> -                  <leafNode name="capabilities"> +                  <virtualTagNode>                      <properties> -                      <help>Show neighbor capability information</help> +                      <help>LDP neighbor</help> +                      <completionHelp> +                        <list><x.x.x.x> <h:h:h:h:h:h:h:h></list> +                        <script>vtysh -c "show mpls ldp neighbor" | awk '{print $2}' | egrep -v "ID"</script> +                      </completionHelp>                      </properties> -                    <command>vtysh -c "show mpls ldp neighbor $5 capabilities"</command> -                  </leafNode> +                    <command>vtysh -c "show mpls ldp neighbor $5"</command> +                    <children> +                      <leafNode name="detail"> +                        <properties> +                          <help>Show detailed information</help> +                        </properties> +                        <command>vtysh -c "show mpls ldp neighbor $5 detail"</command> +                      </leafNode> +                      <leafNode name="capabilities"> +                        <properties> +                          <help>Show neighbor capability information</help> +                        </properties> +                        <command>vtysh -c "show mpls ldp neighbor $5 capabilities"</command> +                      </leafNode> +                    </children> +                  </virtualTagNode>                  </children> -              </tagNode> +              </node>              </children>            </node>            <node name="pseudowire"> diff --git a/op-mode-definitions/show-openfabric.xml.in b/op-mode-definitions/show-openfabric.xml.in index 2f489866e..124b9616e 100644 --- a/op-mode-definitions/show-openfabric.xml.in +++ b/op-mode-definitions/show-openfabric.xml.in @@ -24,11 +24,11 @@                </completionHelp>              </properties>              <children> +              #include <include/vtysh-generic-interface-virtualTagNode.xml.i>                #include <include/vtysh-generic-detail.xml.i>              </children>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>            </node> -          #include <include/vtysh-generic-interface-tagNode.xml.i>            <node name="neighbor">              <properties>                <help>Show OpenFabric neighbor adjacencies</help> diff --git a/op-mode-definitions/show-qos.xml.in b/op-mode-definitions/show-qos.xml.in index 8974e9541..12b215d8d 100644 --- a/op-mode-definitions/show-qos.xml.in +++ b/op-mode-definitions/show-qos.xml.in @@ -20,7 +20,7 @@                      <list><interface></list>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/qos.py show_cake --ifname $5</command> +                <command>${vyos_op_scripts_dir}/qos.py show_cake --ifname $5</command>                </tagNode>              </children>            </node> @@ -28,13 +28,13 @@              <properties>                <help>Show QoS shaping information</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper</command> +            <command>${vyos_op_scripts_dir}/qos.py show_shaper</command>              <children>                <leafNode name="detail">                  <properties>                    <help>Show QoS detailed information</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper --detail</command> +                <command>${vyos_op_scripts_dir}/qos.py show_shaper --detail</command>                </leafNode>                <tagNode name="interface">                  <properties> @@ -44,7 +44,7 @@                      <list><interface></list>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5</command> +                <command>${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5</command>                  <children>                    <tagNode name="class">                      <properties> @@ -53,13 +53,13 @@                          <list><class></list>                        </completionHelp>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --classn $7</command> +                    <command>${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --classn $7</command>                      <children>                        <leafNode name="detail">                          <properties>                            <help>Show QoS detailed information for given class</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --classn $7 --detail</command> +                        <command>${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --classn $7 --detail</command>                        </leafNode>                      </children>                    </tagNode> @@ -67,7 +67,7 @@                      <properties>                        <help>Show QoS detailed information for given interface</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --detail</command> +                    <command>${vyos_op_scripts_dir}/qos.py show_shaper --ifname $5 --detail</command>                    </leafNode>                  </children>                </tagNode> diff --git a/op-mode-definitions/show-raid.xml.in b/op-mode-definitions/show-raid.xml.in index 2ae3fad6a..8bf394552 100644 --- a/op-mode-definitions/show-raid.xml.in +++ b/op-mode-definitions/show-raid.xml.in @@ -9,7 +9,7 @@              <script>${vyos_completion_dir}/list_raidset.sh</script>            </completionHelp>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/show_raid.sh $3</command> +        <command>${vyos_op_scripts_dir}/show_raid.sh $3</command>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/show-route-map.xml.in b/op-mode-definitions/show-route-map.xml.in index 633b2a4cb..a34ae0200 100644 --- a/op-mode-definitions/show-route-map.xml.in +++ b/op-mode-definitions/show-route-map.xml.in @@ -2,12 +2,6 @@  <interfaceDefinition>    <node name="show">      <children> -      <node name="route-map"> -        <properties> -          <help>Show route-map information</help> -        </properties> -        <command>vtysh -c "show route-map"</command> -      </node>        <tagNode name="route-map">          <properties>            <help>Show specified route-map information</help> @@ -16,6 +10,10 @@            </completionHelp>          </properties>          <command>vtysh -c "show route-map $3"</command> +        <standalone> +          <help>Show route map information</help> +          <command>vtysh -c "show route-map"</command> +        </standalone>        </tagNode>      </children>    </node> diff --git a/op-mode-definitions/show-ssh.xml.in b/op-mode-definitions/show-ssh.xml.in index ca8e669b3..88faecada 100644 --- a/op-mode-definitions/show-ssh.xml.in +++ b/op-mode-definitions/show-ssh.xml.in @@ -11,7 +11,7 @@              <properties>                <help>Show SSH server dynamic-protection blocked attackers</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/ssh.py show_dynamic_protection</command> +            <command>${vyos_op_scripts_dir}/ssh.py show_dynamic_protection</command>            </node>            <node name="fingerprints">              <properties> diff --git a/op-mode-definitions/show-system.xml.in b/op-mode-definitions/show-system.xml.in index 6873b816b..c7b57893f 100644 --- a/op-mode-definitions/show-system.xml.in +++ b/op-mode-definitions/show-system.xml.in @@ -95,7 +95,7 @@              <properties>                <help>Show messages in kernel ring buffer</help>              </properties> -            <command>sudo dmesg</command> +            <command>dmesg</command>            </leafNode>            <node name="login">              <properties> @@ -155,31 +155,31 @@                  <properties>                    <help>Show user account information</help>                  </properties> -                <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py</command> +                <command>${vyos_op_scripts_dir}/show_users.py</command>                  <children>                    <leafNode name="all">                      <properties>                        <help>Show information about all accounts</help>                      </properties> -                    <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py all</command> +                    <command>${vyos_op_scripts_dir}/show_users.py all</command>                    </leafNode>                    <leafNode name="locked">                      <properties>                        <help>Show information about locked accounts</help>                      </properties> -                    <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py locked</command> +                    <command>${vyos_op_scripts_dir}/show_users.py locked</command>                    </leafNode>                    <leafNode name="other">                      <properties>                        <help>Show information about non VyOS user accounts</help>                      </properties> -                    <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py other</command> +                    <command>${vyos_op_scripts_dir}/show_users.py other</command>                    </leafNode>                    <leafNode name="vyos">                      <properties>                        <help>Show information about VyOS user accounts</help>                      </properties> -                    <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py vyos</command> +                    <command>${vyos_op_scripts_dir}/show_users.py vyos</command>                    </leafNode>                  </children>                </node> @@ -195,7 +195,7 @@                  <properties>                    <help>Show kernel cache information</help>                  </properties> -                <command>sudo slabtop -o</command> +                <command>slabtop -o</command>                </leafNode>                <leafNode name="detail">                  <properties> diff --git a/op-mode-definitions/show-techsupport_report.xml.in b/op-mode-definitions/show-techsupport_report.xml.in index 4fd6e5d1e..c07cb3c7d 100644 --- a/op-mode-definitions/show-techsupport_report.xml.in +++ b/op-mode-definitions/show-techsupport_report.xml.in @@ -17,7 +17,7 @@                  <properties>                    <help>Show consolidated tech-support report in JSON</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/tech_support.py show --raw</command> +                <command>${vyos_op_scripts_dir}/tech_support.py show --raw</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/show-users.xml.in b/op-mode-definitions/show-users.xml.in index a026e47e7..a9cde3138 100644 --- a/op-mode-definitions/show-users.xml.in +++ b/op-mode-definitions/show-users.xml.in @@ -8,12 +8,6 @@        </properties>        <command>who -H</command>        <children> -        <node name="recent"> -          <properties> -            <help>Show 10 recently logged in users</help> -          </properties> -          <command>last -aF -n 10 | sed -e 's/^wtmp begins/Displaying logins since/'</command> -        </node>          <tagNode name="recent">            <properties>              <help>Show specified number of recently logged in users</help> @@ -22,6 +16,10 @@              </completionHelp>            </properties>            <command>last -aF -n $4 | sed -e 's/^wtmp begins/Displaying logins since/'</command> +          <standalone> +            <help>Show 10 recently logged in users</help> +            <command>last -aF -n 10 | sed -e 's/^wtmp begins/Displaying logins since/'</command> +          </standalone>          </tagNode>        </children>      </node> diff --git a/op-mode-definitions/show-version.xml.in b/op-mode-definitions/show-version.xml.in index 36e68ff79..dc158673d 100644 --- a/op-mode-definitions/show-version.xml.in +++ b/op-mode-definitions/show-version.xml.in @@ -6,13 +6,13 @@          <properties>            <help>Show system version information</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/version.py show</command> +        <command>${vyos_op_scripts_dir}/version.py show</command>          <children>            <leafNode name="funny">              <properties>                <help>Show system version and some fun stuff</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/version.py show --funny</command> +            <command>${vyos_op_scripts_dir}/version.py show --funny</command>            </leafNode>            <leafNode name="all">               <properties> diff --git a/op-mode-definitions/show-vrf.xml.in b/op-mode-definitions/show-vrf.xml.in index c18649844..574e92bfe 100644 --- a/op-mode-definitions/show-vrf.xml.in +++ b/op-mode-definitions/show-vrf.xml.in @@ -14,31 +14,31 @@              </properties>              <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>            </leafNode> -        </children> -      </node> -      <tagNode name="vrf"> -        <properties> -          <help>Show information on specific VRF instance</help> -          <completionHelp> -            <path>vrf name</path> -          </completionHelp> -        </properties> -        <command>${vyos_op_scripts_dir}/vrf.py show --name="$3"</command> -        <children> -          <leafNode name="processes"> -            <properties> -              <help>Shows all process ids associated with VRF</help> -            </properties> -            <command>ip vrf pids "$3"</command> -          </leafNode> -          <leafNode name="vni"> +          <virtualTagNode>              <properties> -              <help>Show VXLAN VNI association</help> +              <help>Show information on specific VRF instance</help> +              <completionHelp> +                <path>vrf name</path> +              </completionHelp>              </properties> -            <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> -          </leafNode> +            <command>${vyos_op_scripts_dir}/vrf.py show --name="$3"</command> +            <children> +              <leafNode name="processes"> +                <properties> +                  <help>Shows all process ids associated with VRF</help> +                </properties> +                <command>ip vrf pids "$3"</command> +              </leafNode> +              <leafNode name="vni"> +                <properties> +                  <help>Show VXLAN VNI association</help> +                </properties> +                <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> +              </leafNode> +            </children> +          </virtualTagNode>          </children> -      </tagNode> -    </children> +      </node> +   </children>    </node>  </interfaceDefinition> diff --git a/op-mode-definitions/suricata.xml.in b/op-mode-definitions/suricata.xml.in index ff1f84706..74e54fb9c 100644 --- a/op-mode-definitions/suricata.xml.in +++ b/op-mode-definitions/suricata.xml.in @@ -6,7 +6,7 @@          <properties>            <help>Update Suricata</help>          </properties> -        <command>if test -f /run/suricata/suricata.yaml; then sudo suricata-update --suricata-conf /run/suricata/suricata.yaml; sudo systemctl restart suricata; else echo "Service Suricata not configured"; fi </command> +        <command>${vyos_op_scripts_dir}/update_suricata.sh</command>        </node>      </children>    </node> @@ -16,7 +16,7 @@          <properties>            <help>Restart Suricata service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name suricata</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name suricata</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/system-image.xml.in b/op-mode-definitions/system-image.xml.in index 847029dcd..a6634fc65 100644 --- a/op-mode-definitions/system-image.xml.in +++ b/op-mode-definitions/system-image.xml.in @@ -17,7 +17,7 @@                  <list>/path/to/vyos-image.iso "http://example.com/vyos-image.iso" latest</list>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}"</command> +            <command>${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}"</command>              <children>                <tagNode name="vrf">                  <properties> @@ -26,7 +26,7 @@                      <path>vrf name</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}"</command> +                <command>${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}"</command>                  <children>                    <tagNode name="username">                      <properties> @@ -37,7 +37,7 @@                          <properties>                            <help>Password to use with authentication</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}" --username "${8}" --password "${10}"</command> +                        <command>${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}" --username "${8}" --password "${10}"</command>                        </tagNode>                      </children>                    </tagNode> @@ -52,7 +52,7 @@                      <properties>                        <help>Password to use with authentication</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --username "${6}" --password "${8}"</command> +                    <command>${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --username "${6}" --password "${8}"</command>                    </tagNode>                  </children>                </tagNode> @@ -76,30 +76,28 @@              <properties>                <help>Set system console type at boot</help>                <completionHelp> -                <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list_console_types</script> +                <script>${vyos_op_scripts_dir}/image_manager.py --action list_console_types</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set_console_type --console-type "${4}"</command> +            <command>${vyos_op_scripts_dir}/image_manager.py --action set_console_type --console-type "${4}"</command>            </tagNode>            <node name="image">              <properties>                <help>Set system image parameters</help>              </properties>              <children> -              <node name="default-boot"> -                <properties> -                  <help>Set default image to boot.</help> -                </properties> -                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set</command> -              </node>                <tagNode name="default-boot">                  <properties> -                  <help>Set default image to boot.</help> +                  <help>Set default image to boot</help>                    <completionHelp> -                    <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script> +                    <script>${vyos_op_scripts_dir}/image_manager.py --action list</script>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set --image-name "${5}"</command> +                <command>${vyos_op_scripts_dir}/image_manager.py --action set --image-name "${5}"</command> +                <standalone> +                  <help>Set default image to boot</help> +                  <command>${vyos_op_scripts_dir}/image_manager.py --action set</command> +                </standalone>                </tagNode>              </children>            </node> @@ -116,7 +114,7 @@          <properties>            <help>Install new system image to hard drive</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action install</command> +        <command>${vyos_op_scripts_dir}/image_installer.py --action install</command>        </node>      </children>    </node> @@ -130,20 +128,18 @@            <help>Delete system objects</help>          </properties>          <children> -          <node name="image"> -            <properties> -              <help>Remove an installed image from the system</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action delete</command> -          </node>            <tagNode name="image">              <properties>                <help>Remove an installed image from the system</help>                <completionHelp> -                <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script> +                <script>${vyos_op_scripts_dir}/image_manager.py --action list</script>                </completionHelp>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action delete --image-name "${4}"</command> +            <command>${vyos_op_scripts_dir}/image_manager.py --action delete --image-name "${4}"</command> +            <standalone> +              <help>Remove an installed image from the system</help> +              <command>${vyos_op_scripts_dir}/image_manager.py --action delete</command> +            </standalone>            </tagNode>          </children>        </node> @@ -163,7 +159,7 @@              <properties>                <help>System image to rename</help>                <completionHelp> -                <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script> +                <script>${vyos_op_scripts_dir}/image_manager.py --action list</script>                </completionHelp>              </properties>              <children> @@ -171,7 +167,7 @@                  <properties>                    <help>A new name for an image</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action rename --image-name "${4}" --image-new-name "${6}"</command> +                <command>${vyos_op_scripts_dir}/image_manager.py --action rename --image-name "${4}" --image-new-name "${6}"</command>                </tagNode>              </children>            </tagNode> @@ -199,7 +195,7 @@                  <properties>                    <help>Show details about installed VyOS images</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/image_info.py show_images_details</command> +                <command>${vyos_op_scripts_dir}/image_info.py show_images_details</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/terminal.xml.in b/op-mode-definitions/terminal.xml.in index 2a76de146..163159846 100644 --- a/op-mode-definitions/terminal.xml.in +++ b/op-mode-definitions/terminal.xml.in @@ -49,7 +49,7 @@              <properties>                <help>Reconfigure console keyboard layout</help>              </properties> -            <command>sudo dpkg-reconfigure -f dialog keyboard-configuration && sudo systemctl restart keyboard-setup</command> +            <command>dpkg-reconfigure -f dialog keyboard-configuration && systemctl restart keyboard-setup</command>            </leafNode>          </children>        </node> @@ -74,12 +74,6 @@                </tagNode>              </children>            </node> -          <node name="pager"> -            <properties> -              <help>Set terminal pager to default (less)</help> -            </properties> -            <command>VYATTA_PAGER=${_vyatta_default_pager}</command> -          </node>            <tagNode name="pager">              <properties>                <help>Set terminal pager</help> @@ -87,6 +81,10 @@                  <list><PROGRAM></list>                </completionHelp>              </properties> +            <standalone> +              <help>Set terminal pager to default (less)</help> +              <command>VYATTA_PAGER=${_vyatta_default_pager}</command> +            </standalone>              <command>VYATTA_PAGER=$4</command>            </tagNode>            <tagNode name="length"> diff --git a/op-mode-definitions/traceroute.xml.in b/op-mode-definitions/traceroute.xml.in index aba0f45e3..9976bdd97 100644 --- a/op-mode-definitions/traceroute.xml.in +++ b/op-mode-definitions/traceroute.xml.in @@ -9,7 +9,7 @@      </properties>      <command>${vyos_op_scripts_dir}/traceroute.py ${@:2}</command>      <children> -      <leafNode name="node.tag"> +      <virtualTagNode>          <properties>            <help>Traceroute options</help>            <completionHelp> @@ -17,7 +17,7 @@            </completionHelp>          </properties>          <command>${vyos_op_scripts_dir}/traceroute.py ${@:2}</command> -      </leafNode> +      </virtualTagNode>      </children>    </tagNode>  </interfaceDefinition> diff --git a/op-mode-definitions/traffic-dump.xml.in b/op-mode-definitions/traffic-dump.xml.in index e86e69736..a145742e9 100644 --- a/op-mode-definitions/traffic-dump.xml.in +++ b/op-mode-definitions/traffic-dump.xml.in @@ -16,7 +16,7 @@                </completionHelp>              </properties>              <children> -              <leafNode name="node.tag"> +              <virtualTagNode>                  <properties>                    <help>Traffic capture options</help>                    <completionHelp> @@ -24,7 +24,7 @@                    </completionHelp>                  </properties>                  <command>${vyos_op_scripts_dir}/tcpdump.py "${@:4}"</command> -              </leafNode> +              </virtualTagNode>              </children>            </tagNode>          </children> diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in index 0a8671aeb..af7f12ba8 100644 --- a/op-mode-definitions/vpn-ipsec.xml.in +++ b/op-mode-definitions/vpn-ipsec.xml.in @@ -24,7 +24,7 @@                      <properties>                        <help>Reset a specific tunnel for given DMVPN profile</help>                        <completionHelp> -                        <script>sudo ${vyos_completion_dir}/list_ipsec_profile_tunnels.py --profile ${COMP_WORDS[4]}</script> +                        <script>${vyos_completion_dir}/list_ipsec_profile_tunnels.py --profile ${COMP_WORDS[4]}</script>                        </completionHelp>                      </properties>                      <children> @@ -35,10 +35,10 @@                              <list><x.x.x.x> <h:h:h:h:h:h:h:h></list>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_dst --profile="$5" --tunnel="$7" --nbma-dst="$9"</command> +                        <command>${vyos_op_scripts_dir}/ipsec.py reset_profile_dst --profile="$5" --tunnel="$7" --nbma-dst="$9"</command>                        </tagNode>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_profile_all --profile="$5" --tunnel="$7"</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py reset_profile_all --profile="$5" --tunnel="$7"</command>                    </tagNode>                  </children>                </tagNode> @@ -51,13 +51,13 @@                      <properties>                        <help>Reset all users current remote access IPSec VPN sessions</help>                      </properties> -                     <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_ra</command> +                     <command>${vyos_op_scripts_dir}/ipsec.py reset_ra</command>                    </node>                    <tagNode name="user">                      <properties>                        <help>Reset specified user current remote access IPsec VPN session(s)</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_ra --user="$6"</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py reset_ra --user="$6"</command>                    </tagNode>                  </children>                </node> @@ -70,7 +70,7 @@                      <properties>                        <help>Reset all site-to-site IPSec VPN sessions</help>                      </properties> -                     <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_all_peers</command> +                     <command>${vyos_op_scripts_dir}/ipsec.py reset_all_peers</command>                    </node>                    <tagNode name="peer">                      <properties> @@ -87,16 +87,16 @@                              <path>vpn ipsec site-to-site peer ${COMP_WORDS[5]} tunnel</path>                            </completionHelp>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6" --tunnel="$8"</command> +                        <command>${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6" --tunnel="$8"</command>                        </tagNode>                        <node name="vti">                          <properties>                            <help>Reset the VTI tunnel for given peer</help>                          </properties> -                        <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6" --tunnel="vti"</command> +                        <command>${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6" --tunnel="vti"</command>                        </node>                      </children> -                    <command>sudo ${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6"</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py reset_peer --peer="$6"</command>                    </tagNode>                  </children>                </node> @@ -112,7 +112,7 @@          <properties>            <help>Restart the IPsec VPN process</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name ipsec</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name ipsec</command>        </node>      </children>    </node> @@ -140,13 +140,13 @@                      <properties>                        <help>Show debug information for peer tunnel</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="$5" --tunnel="$7"</command> +                    <command>${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="$5" --tunnel="$7"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="$5" --tunnel="all"</command> +                <command>${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="$5" --tunnel="all"</command>                </tagNode>              </children> -            <command>sudo ${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="all"</command> +            <command>${vyos_op_scripts_dir}/vpn_ipsec.py --action="vpn-debug" --name="all"</command>            </node>            <node name="ike">              <properties> @@ -162,16 +162,16 @@                      <properties>                        <help>Show all currently active IKE Security Associations (SA) that are using NAT Traversal</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/vpn_ike_sa.py --nat="yes"</command> +                    <command>${vyos_op_scripts_dir}/vpn_ike_sa.py --nat="yes"</command>                    </node>                    <tagNode name="peer">                      <properties>                        <help>Show all currently active IKE Security Associations (SA) for a peer</help>                      </properties> -                    <command>sudo ${vyos_op_scripts_dir}/vpn_ike_sa.py --peer="$6"</command> +                    <command>${vyos_op_scripts_dir}/vpn_ike_sa.py --peer="$6"</command>                    </tagNode>                  </children> -                <command>sudo ${vyos_op_scripts_dir}/vpn_ike_sa.py</command> +                <command>${vyos_op_scripts_dir}/vpn_ike_sa.py</command>                </node>                <node name="secrets">                  <properties> @@ -183,7 +183,7 @@                  <properties>                    <help>Show summary of IKE process information</help>                  </properties> -                <command>if systemctl is-active --quiet strongswan ; then systemctl status strongswan ; else echo "Process is not running" ; fi</command> +                <command>systemctl status strongswan</command>                </node>              </children>            </node> @@ -196,13 +196,13 @@                  <properties>                    <help>Show VPN connections</help>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/ipsec.py show_connections</command> +                <command>${vyos_op_scripts_dir}/ipsec.py show_connections</command>                </node>                <node name="policy">                  <properties>                    <help>Show the in-kernel crypto policies</help>                  </properties> -                <command>sudo ip xfrm policy list</command> +                <command>ip xfrm policy list</command>                </node>                <node name="remote-access">                  <properties> @@ -213,25 +213,25 @@                      <properties>                        <help>Show detail active IKEv2 RA sessions</help>                      </properties> -                    <command>if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_ra_detail; else echo "IPsec process not running" ; fi</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py show_ra_detail</command>                    </node>                    <tagNode name="connection-id">                      <properties>                        <help>Show detail active IKEv2 RA sessions by connection-id</help>                      </properties> -                    <command>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</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py show_ra_detail --conn-id="$6"</command>                    </tagNode>                    <node name="summary">                      <properties>                        <help>Show active IKEv2 RA sessions summary</help>                      </properties> -                    <command>if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_ra_summary; else echo "IPsec process not running" ; fi</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py show_ra_summary; else echo "IPsec process not running"</command>                    </node>                    <tagNode name="username">                      <properties>                        <help>Show detail active IKEv2 RA sessions by username</help>                      </properties> -                    <command>if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_ra_detail --username="$6"; else echo "IPsec process not running" ; fi</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py show_ra_detail --username="$6"</command>                    </tagNode>                  </children>                </node> @@ -268,24 +268,24 @@                    -->                    <node name="detail">                      <properties> -                      <help>Show Verbose Detail on all active IPsec Security Associations (SA)</help> +                      <help>Show verbose details on all active IPsec security associations (SA)</help>                      </properties> -                    <command>if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa_detail ; else echo "IPsec process not running" ; fi</command> +                    <command>${vyos_op_scripts_dir}/ipsec.py show_sa_detail</command>                    </node>                  </children> -                <command>if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa ; else echo "IPsec process not running" ; fi</command> +                <command>${vyos_op_scripts_dir}/ipsec.py show_sa</command>                </node>                <node name="state">                  <properties>                    <help>Show the in-kernel crypto state</help>                  </properties> -                <command>sudo ip xfrm state list</command> +                <command>ip xfrm state list</command>                </node>                <node name="status">                  <properties>                    <help>Show status of IPsec process</help>                  </properties> -                <command>if systemctl is-active --quiet strongswan >/dev/null ; then echo -e "IPsec Process Running: $(pgrep charon)\n$(sudo /usr/sbin/ipsec status)" ; else echo "IPsec process not running" ; fi</command> +                <command>/usr/sbin/ipsec status</command>                </node>              </children>            </node> diff --git a/op-mode-definitions/vrrp.xml.in b/op-mode-definitions/vrrp.xml.in index fb777b2e4..b2b2886c0 100644 --- a/op-mode-definitions/vrrp.xml.in +++ b/op-mode-definitions/vrrp.xml.in @@ -2,42 +2,42 @@  <interfaceDefinition>    <node name="show">      <children> -      <tagNode name="vrrp"> -        <properties> -          <help>Show specified VRRP (Virtual Router Redundancy Protocol) group information</help> -        </properties> -        <children> -          <node name="statistics"> -            <properties> -              <help>Show VRRP statistics</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/vrrp.py show_statistics --group-name="$3"</command> -          </node> -          <node name="detail"> -            <properties> -              <help>Show detailed VRRP state information</help> -            </properties> -            <command>sudo ${vyos_op_scripts_dir}/vrrp.py show_detail --group-name="$3"</command> -          </node> -        </children> -      </tagNode>        <node name="vrrp">          <properties>            <help>Show VRRP (Virtual Router Redundancy Protocol) information</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/vrrp.py show_summary</command> +        <command>${vyos_op_scripts_dir}/vrrp.py show_summary</command>          <children> +          <virtualTagNode> +            <properties> +              <help>Show specified VRRP (Virtual Router Redundancy Protocol) group information</help> +            </properties> +            <children> +              <node name="statistics"> +                <properties> +                  <help>Show VRRP statistics</help> +                </properties> +                <command>${vyos_op_scripts_dir}/vrrp.py show_statistics --group-name="$3"</command> +              </node> +              <node name="detail"> +                <properties> +                  <help>Show detailed VRRP state information</help> +                </properties> +                <command>${vyos_op_scripts_dir}/vrrp.py show_detail --group-name="$3"</command> +              </node> +            </children> +          </virtualTagNode>            <node name="statistics">              <properties>                <help>Show VRRP statistics</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/vrrp.py show_statistics</command> +            <command>${vyos_op_scripts_dir}/vrrp.py show_statistics</command>            </node>            <node name="detail">              <properties>                <help>Show detailed VRRP state information</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/vrrp.py show_detail</command> +            <command>${vyos_op_scripts_dir}/vrrp.py show_detail</command>            </node>          </children>        </node> @@ -49,7 +49,7 @@          <properties>            <help>Restart VRRP (Virtual Router Redundancy Protocol) process</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name vrrp</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name vrrp</command>        </node>      </children>    </node> diff --git a/op-mode-definitions/wake-on-lan.xml.in b/op-mode-definitions/wake-on-lan.xml.in index d4589c868..bec12dae6 100644 --- a/op-mode-definitions/wake-on-lan.xml.in +++ b/op-mode-definitions/wake-on-lan.xml.in @@ -19,7 +19,7 @@                  <properties>                    <help>Station (MAC) address to wake up</help>                  </properties> -                <command>sudo /usr/sbin/etherwake -i "$4" "$6"</command> +                <command>/usr/sbin/etherwake -i "$4" "$6"</command>                </tagNode>              </children>              </tagNode> diff --git a/op-mode-definitions/webproxy.xml.in b/op-mode-definitions/webproxy.xml.in index ba13907b8..76c348f9d 100644 --- a/op-mode-definitions/webproxy.xml.in +++ b/op-mode-definitions/webproxy.xml.in @@ -14,13 +14,13 @@                  <properties>                    <help>Monitor the last lines of the Webproxy access log</help>                  </properties> -                <command>if [ -f /var/log/squid/access.log ]; then sudo tail --follow=name /var/log/squid/access.log; else echo "WebProxy access-log does not exist"; fi</command> +                <command>if [ -f /var/log/squid/access.log ]; then tail --follow=name /var/log/squid/access.log; else echo "WebProxy access-log does not exist"; fi</command>                </leafNode>                <leafNode name="cache-log">                  <properties>                    <help>Monitor the last lines of the Webproxy cache log</help>                  </properties> -                <command>if [ -f /var/log/squid/cache.log ]; then sudo tail --follow=name /var/log/squid/cache.log; else echo "WebProxy cache-log does not exist"; fi</command> +                <command>if [ -f /var/log/squid/cache.log ]; then tail --follow=name /var/log/squid/cache.log; else echo "WebProxy cache-log does not exist"; fi</command>                </leafNode>              </children>            </node> @@ -34,7 +34,7 @@          <properties>            <help>Restart WebProxy service</help>          </properties> -        <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name webproxy</command> +        <command>${vyos_op_scripts_dir}/restart.py restart_service --name webproxy</command>        </node>      </children>    </node> @@ -63,7 +63,7 @@              <properties>                <help>Show contents of WebProxy access log</help>              </properties> -            <command>if [ -e /var/log/squid/access.log ]; then sudo less $_vyatta_less_options --prompt="file %i of %m, page %dt of %D" -- `printf "%s\n" /var/log/squid/access.log* | sort -nr`; else echo "No WebProxy log"; fi</command> +            <command>if [ -e /var/log/squid/access.log ]; then less $_vyatta_less_options --prompt="file %i of %m, page %dt of %D" -- `printf "%s\n" /var/log/squid/access.log* | sort -nr`; else echo "No WebProxy log"; fi</command>            </node>            <node name="update-log">              <properties> @@ -86,7 +86,7 @@              <properties>                <help>Update the webproxy blacklist database</help>              </properties> -            <command>sudo ${vyos_op_scripts_dir}/webproxy_update_blacklist.sh --update-blacklist</command> +            <command>${vyos_op_scripts_dir}/webproxy_update_blacklist.sh --update-blacklist</command>              <children>                <tagNode name="vrf">                  <properties> @@ -95,7 +95,7 @@                      <path>vrf name</path>                    </completionHelp>                  </properties> -                <command>sudo ${vyos_op_scripts_dir}/webproxy_update_blacklist.sh --update-blacklist --vrf "${5}" </command> +                <command>${vyos_op_scripts_dir}/webproxy_update_blacklist.sh --update-blacklist --vrf "${5}" </command>                </tagNode>              </children>            </node> | 
