From a483281e5fd9db394c0dce3359d91599ba55adf8 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 27 Feb 2023 11:21:51 -0600 Subject: op-mode: T4952: use list_interfaces from vyos-utils --- op-mode-definitions/dhcp.xml.in | 4 ++-- op-mode-definitions/flow-accounting-op.xml.in | 2 +- op-mode-definitions/force-arp.xml.in | 6 +++--- op-mode-definitions/force-ipv6-nd.xml.in | 2 +- op-mode-definitions/force-ipv6-rd.xml.in | 2 +- op-mode-definitions/force-mtu-host.xml.in | 2 +- op-mode-definitions/generate-openvpn-config-client.xml.in | 2 +- op-mode-definitions/generate-wireguard.xml.in | 2 +- op-mode-definitions/include/isis-common.xml.i | 6 +++--- op-mode-definitions/include/ospf-common.xml.i | 4 ++-- op-mode-definitions/include/ospfv3/interface.xml.i | 2 +- op-mode-definitions/ipv4-route.xml.in | 2 +- op-mode-definitions/ipv6-route.xml.in | 4 ++-- op-mode-definitions/lldp.xml.in | 2 +- op-mode-definitions/monitor-bandwidth.xml.in | 2 +- op-mode-definitions/monitor-log.xml.in | 4 ++-- op-mode-definitions/monitor-ndp.xml.in | 2 +- op-mode-definitions/openvpn.xml.in | 4 ++-- op-mode-definitions/show-arp.xml.in | 2 +- op-mode-definitions/show-bridge.xml.in | 2 +- op-mode-definitions/show-interfaces-wireguard.xml.in | 2 +- op-mode-definitions/show-interfaces-wireless.xml.in | 2 +- op-mode-definitions/show-ip.xml.in | 2 +- op-mode-definitions/show-log.xml.in | 4 ++-- op-mode-definitions/show-protocols.xml.in | 2 +- op-mode-definitions/snmp.xml.in | 6 +++--- op-mode-definitions/wake-on-lan.xml.in | 2 +- op-mode-definitions/wireless.xml.in | 2 +- 28 files changed, 40 insertions(+), 40 deletions(-) diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 419abe7ad..66584efc3 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -175,7 +175,7 @@ Renew DHCP client lease for specified interface - + sudo systemctl restart "dhclient@$4.service" @@ -191,7 +191,7 @@ Renew DHCPv6 client lease for specified interface - + sudo systemctl restart "dhcp6c@$4.service" diff --git a/op-mode-definitions/flow-accounting-op.xml.in b/op-mode-definitions/flow-accounting-op.xml.in index 7aaae5974..46dc77d05 100644 --- a/op-mode-definitions/flow-accounting-op.xml.in +++ b/op-mode-definitions/flow-accounting-op.xml.in @@ -13,7 +13,7 @@ Show flow accounting statistics for specified interface - + ${vyos_op_scripts_dir}/flow_accounting_op.py --action show --interface $4 diff --git a/op-mode-definitions/force-arp.xml.in b/op-mode-definitions/force-arp.xml.in index f9f7c7643..05aa04e6b 100644 --- a/op-mode-definitions/force-arp.xml.in +++ b/op-mode-definitions/force-arp.xml.in @@ -19,7 +19,7 @@ Send gratuitous ARP reply on specified interface - + @@ -50,7 +50,7 @@ Send gratuitous ARP request on specified interface - + @@ -81,7 +81,7 @@ Send ARP for DAD detection on specified interface - + diff --git a/op-mode-definitions/force-ipv6-nd.xml.in b/op-mode-definitions/force-ipv6-nd.xml.in index 49de097f6..664fee4fb 100644 --- a/op-mode-definitions/force-ipv6-nd.xml.in +++ b/op-mode-definitions/force-ipv6-nd.xml.in @@ -11,7 +11,7 @@ IPv6 Neighbor Discovery on specified interface - + diff --git a/op-mode-definitions/force-ipv6-rd.xml.in b/op-mode-definitions/force-ipv6-rd.xml.in index 8c901af25..c81b81a49 100644 --- a/op-mode-definitions/force-ipv6-rd.xml.in +++ b/op-mode-definitions/force-ipv6-rd.xml.in @@ -11,7 +11,7 @@ IPv6 Router Discovery on specified interface - + /usr/bin/rdisc6 "$4" diff --git a/op-mode-definitions/force-mtu-host.xml.in b/op-mode-definitions/force-mtu-host.xml.in index b92179f11..56241678a 100644 --- a/op-mode-definitions/force-mtu-host.xml.in +++ b/op-mode-definitions/force-mtu-host.xml.in @@ -20,7 +20,7 @@ Source interface - + ${vyos_op_scripts_dir}/force_mtu_host.sh $4 $6 diff --git a/op-mode-definitions/generate-openvpn-config-client.xml.in b/op-mode-definitions/generate-openvpn-config-client.xml.in index baec0842b..fc8bfa346 100644 --- a/op-mode-definitions/generate-openvpn-config-client.xml.in +++ b/op-mode-definitions/generate-openvpn-config-client.xml.in @@ -16,7 +16,7 @@ Local interface used for connection - interfaces openvpn + diff --git a/op-mode-definitions/generate-wireguard.xml.in b/op-mode-definitions/generate-wireguard.xml.in index 6c01619be..1dcafcd8b 100644 --- a/op-mode-definitions/generate-wireguard.xml.in +++ b/op-mode-definitions/generate-wireguard.xml.in @@ -19,7 +19,7 @@ Local interface used for connection - interfaces wireguard + diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 5674bc22f..95a171515 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -32,7 +32,7 @@ Show IS-IS interfaces - + @@ -49,7 +49,7 @@ Show specific IS-IS interface - + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -75,7 +75,7 @@ Show specific IS-IS interface - + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ diff --git a/op-mode-definitions/include/ospf-common.xml.i b/op-mode-definitions/include/ospf-common.xml.i index 23769c8ba..098254f4e 100644 --- a/op-mode-definitions/include/ospf-common.xml.i +++ b/op-mode-definitions/include/ospf-common.xml.i @@ -512,7 +512,7 @@ Show IPv4 OSPF information for specified interface - + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -536,7 +536,7 @@ Show IPv4 OSPF neighbor information for specified IP address or interface <x.x.x.x> - + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ diff --git a/op-mode-definitions/include/ospfv3/interface.xml.i b/op-mode-definitions/include/ospfv3/interface.xml.i index 0fb66257d..7a0b8ea48 100644 --- a/op-mode-definitions/include/ospfv3/interface.xml.i +++ b/op-mode-definitions/include/ospfv3/interface.xml.i @@ -38,7 +38,7 @@ Specific insterface to examine - + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ diff --git a/op-mode-definitions/ipv4-route.xml.in b/op-mode-definitions/ipv4-route.xml.in index 660b34496..17a0a4ad9 100644 --- a/op-mode-definitions/ipv4-route.xml.in +++ b/op-mode-definitions/ipv4-route.xml.in @@ -45,7 +45,7 @@ Reset ARP cache for interface - + sudo ${vyos_op_scripts_dir}/neighbor.py reset --family inet --interface "$5" diff --git a/op-mode-definitions/ipv6-route.xml.in b/op-mode-definitions/ipv6-route.xml.in index 46e416a8a..5ed0b9dba 100644 --- a/op-mode-definitions/ipv6-route.xml.in +++ b/op-mode-definitions/ipv6-route.xml.in @@ -26,7 +26,7 @@ Show IPv6 neighbor table for specified interface - + ${vyos_op_scripts_dir}/neighbor.py show --family inet6 --interface "$5" @@ -71,7 +71,7 @@ Reset IPv6 ND cache for interface - + sudo ip -f inet6 neigh flush dev "$5" diff --git a/op-mode-definitions/lldp.xml.in b/op-mode-definitions/lldp.xml.in index 07cafa77f..985262a89 100644 --- a/op-mode-definitions/lldp.xml.in +++ b/op-mode-definitions/lldp.xml.in @@ -17,7 +17,7 @@ Show LLDP for specified interface - + ${vyos_op_scripts_dir}/lldp.py show_neighbors --interface $5 diff --git a/op-mode-definitions/monitor-bandwidth.xml.in b/op-mode-definitions/monitor-bandwidth.xml.in index 9af0a9e70..2da9d34f4 100644 --- a/op-mode-definitions/monitor-bandwidth.xml.in +++ b/op-mode-definitions/monitor-bandwidth.xml.in @@ -12,7 +12,7 @@ Monitor bandwidth usage on specified interface - + diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in index d5892398b..06b1cf129 100644 --- a/op-mode-definitions/monitor-log.xml.in +++ b/op-mode-definitions/monitor-log.xml.in @@ -48,7 +48,7 @@ Show DHCP client log on specific interface - + journalctl --no-hostname --follow --boot --unit "dhclient@$6.service" @@ -78,7 +78,7 @@ Show DHCPv6 client log on specific interface - + journalctl --no-hostname --follow --boot --unit "dhcp6c@$6.service" diff --git a/op-mode-definitions/monitor-ndp.xml.in b/op-mode-definitions/monitor-ndp.xml.in index 1ac6ce39b..26d881f1a 100644 --- a/op-mode-definitions/monitor-ndp.xml.in +++ b/op-mode-definitions/monitor-ndp.xml.in @@ -13,7 +13,7 @@ Monitor ndp protocol on specified interface - + diff --git a/op-mode-definitions/openvpn.xml.in b/op-mode-definitions/openvpn.xml.in index 0a2657398..0aa9c3209 100644 --- a/op-mode-definitions/openvpn.xml.in +++ b/op-mode-definitions/openvpn.xml.in @@ -20,7 +20,7 @@ Reset OpenVPN process on interface - interfaces openvpn + sudo ${vyos_op_scripts_dir}/openvpn.py reset --interface $4 @@ -51,7 +51,7 @@ Show OpenVPN interface information - interfaces openvpn + ${vyos_op_scripts_dir}/interfaces.py show --intf_name=$4 diff --git a/op-mode-definitions/show-arp.xml.in b/op-mode-definitions/show-arp.xml.in index 3680c20c6..84170f070 100644 --- a/op-mode-definitions/show-arp.xml.in +++ b/op-mode-definitions/show-arp.xml.in @@ -12,7 +12,7 @@ Show Address Resolution Protocol (ARP) cache for specified interface - + ${vyos_op_scripts_dir}/neighbor.py show --family inet --interface "$4" diff --git a/op-mode-definitions/show-bridge.xml.in b/op-mode-definitions/show-bridge.xml.in index e7a646fdc..acf3a00c7 100644 --- a/op-mode-definitions/show-bridge.xml.in +++ b/op-mode-definitions/show-bridge.xml.in @@ -25,7 +25,7 @@ Show bridge information for a given bridge interface - interfaces bridge + bridge -c link show | grep "master $3" diff --git a/op-mode-definitions/show-interfaces-wireguard.xml.in b/op-mode-definitions/show-interfaces-wireguard.xml.in index 75b0cc88e..d045beafc 100644 --- a/op-mode-definitions/show-interfaces-wireguard.xml.in +++ b/op-mode-definitions/show-interfaces-wireguard.xml.in @@ -8,7 +8,7 @@ Show specified WireGuard interface information - interfaces wireguard + ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=wireguard diff --git a/op-mode-definitions/show-interfaces-wireless.xml.in b/op-mode-definitions/show-interfaces-wireless.xml.in index cdd591f82..f39d402f1 100644 --- a/op-mode-definitions/show-interfaces-wireless.xml.in +++ b/op-mode-definitions/show-interfaces-wireless.xml.in @@ -28,7 +28,7 @@ Show specified wireless interface information - interfaces wireless + ${vyos_op_scripts_dir}/interfaces.py show --intf_name="$4" --intf_type=wireless diff --git a/op-mode-definitions/show-ip.xml.in b/op-mode-definitions/show-ip.xml.in index a710e33d2..d5dbb7850 100644 --- a/op-mode-definitions/show-ip.xml.in +++ b/op-mode-definitions/show-ip.xml.in @@ -17,7 +17,7 @@ Show IPv4 neighbor table for specified interface - + ${vyos_op_scripts_dir}/neighbor.py show --family inet --interface "$5" diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index c626e45fb..7f6469ca9 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -66,7 +66,7 @@ Show DHCP client log on specific interface - + journalctl --no-hostname --boot --unit "dhclient@$6.service" @@ -96,7 +96,7 @@ Show DHCPv6 client log on specific interface - + journalctl --no-hostname --boot --unit "dhcp6c@$6.service" diff --git a/op-mode-definitions/show-protocols.xml.in b/op-mode-definitions/show-protocols.xml.in index 27146f90d..8f98f3a4c 100644 --- a/op-mode-definitions/show-protocols.xml.in +++ b/op-mode-definitions/show-protocols.xml.in @@ -22,7 +22,7 @@ Show Address Resolution Protocol (ARP) cache for specified interface - + /usr/sbin/arp -e -n -i "$6" diff --git a/op-mode-definitions/snmp.xml.in b/op-mode-definitions/snmp.xml.in index a0a47da40..894005e7b 100644 --- a/op-mode-definitions/snmp.xml.in +++ b/op-mode-definitions/snmp.xml.in @@ -39,7 +39,7 @@ Show SNMP ifAlias for specified interface - + ${vyos_op_scripts_dir}/snmp_ifmib.py --ifalias="$6" @@ -48,7 +48,7 @@ Show SNMP ifDescr for specified interface - + ${vyos_op_scripts_dir}/snmp_ifmib.py --ifdescr="$6" @@ -57,7 +57,7 @@ Show SNMP ifDescr for specified interface - + ${vyos_op_scripts_dir}/snmp_ifmib.py --ifindex="$6" diff --git a/op-mode-definitions/wake-on-lan.xml.in b/op-mode-definitions/wake-on-lan.xml.in index 1a9b88596..7119eeb65 100644 --- a/op-mode-definitions/wake-on-lan.xml.in +++ b/op-mode-definitions/wake-on-lan.xml.in @@ -9,7 +9,7 @@ Interface where the station is connected - + diff --git a/op-mode-definitions/wireless.xml.in b/op-mode-definitions/wireless.xml.in index f8e53ad21..25809e0b8 100644 --- a/op-mode-definitions/wireless.xml.in +++ b/op-mode-definitions/wireless.xml.in @@ -21,7 +21,7 @@ Clear interface information for a given wireless interface - interfaces wireless + -- cgit v1.2.3