From e982b78f24d1dca3d2bc92a39b8e9fcf35b39a37 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Jan 2021 14:31:48 +0100 Subject: xml: op-mode: add preprocessor support as known from configuration mode --- op-mode-definitions/dhcp.xml.in | 203 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 op-mode-definitions/dhcp.xml.in (limited to 'op-mode-definitions/dhcp.xml.in') diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in new file mode 100644 index 000000000..48752cfd5 --- /dev/null +++ b/op-mode-definitions/dhcp.xml.in @@ -0,0 +1,203 @@ + + + + + + + Show DHCP (Dynamic Host Configuration Protocol) information + + + + + Show DHCP server information + + + + + Show DHCP server leases + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases + + + + Show DHCP server leases for a specific pool + + + + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6 + + + + Show DHCP server leases sorted by the specified key + + + + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --sort $6 + + + + Show DHCP server leases with a specific state (can be multiple, comma-separated) + + + + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --state $(echo $6 | tr , " ") + + + + + + Show DHCP server statistics + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics + + + + Show DHCP server statistics for a specific pool + + + + + sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6 + + + + + + + + + + Show DHCPv6 (IPv6 Dynamic Host Configuration Protocol) information + + + + + Show DHCPv6 server information + + + + + Show DHCPv6 server leases + + sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases + + + + Show DHCPv6 server leases for a specific pool + + + + + sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --pool $6 + + + + Show DHCPv6 server leases sorted by the specified key + + + + + sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --sort $6 + + + + Show DHCPv6 server leases with a specific state (can be multiple, comma-separated) + + + + + sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $(echo $6 | tr , " ") + + + + + + + + + + + + + + Restart DHCP processes + + + + + Restart the DHCP server process + + sudo systemctl restart isc-dhcp-server.service + + + + Restart the DHCP server process + + sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4 + + + + + + Restart DHCPv6 processes + + + + + Restart the DHCPv6 server process + + sudo systemctl restart isc-dhcp-server6.service + + + + Restart the DHCP server process + + sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6 + + + + + + + + Renew specified variable + + + + + Renew DHCP client lease + + + + + Renew DHCP client lease for specified interface + + + + + sudo systemctl restart "dhclient@$4.service" + + + + + + Renew DHCPv6 client lease + + + + + Renew DHCPv6 client lease for specified interface + + + + + sudo systemctl restart "dhcp6c@$4.service" + + + + + + -- cgit v1.2.3