summaryrefslogtreecommitdiff
path: root/op-mode-definitions/dhcp.xml
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-09-04 19:47:43 +0200
committerDaniil Baturin <daniil@baturin.org>2018-09-04 19:47:43 +0200
commit2053539a7d532941e2cdbcc37fff26a1b9c95447 (patch)
tree68338ff3b367708da1feafab6db011047b63b4f0 /op-mode-definitions/dhcp.xml
parent93f6b6a3b23f4169a4af4a23eb795d041be84e42 (diff)
downloadvyos-1x-2053539a7d532941e2cdbcc37fff26a1b9c95447.tar.gz
vyos-1x-2053539a7d532941e2cdbcc37fff26a1b9c95447.zip
T823: extend the new DHCP op mode.
Diffstat (limited to 'op-mode-definitions/dhcp.xml')
-rw-r--r--op-mode-definitions/dhcp.xml111
1 files changed, 111 insertions, 0 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
new file mode 100644
index 000000000..eb57f8f1f
--- /dev/null
+++ b/op-mode-definitions/dhcp.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="dhcp">
+ <properties>
+ <help>Show DHCP (Dynamic Host Configuration Protocol) information</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Show DHCP information</help>
+ </properties>
+ <children>
+ <node name="leases">
+ <properties>
+ <help>Show DHCP server leases</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCP leases for a specific pool</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $4</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show DHCP server statistics</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCP server statistics for a specific pool</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="dhcpv6">
+ <properties>
+ <help>Show DHCPv6 (IPv6 Dynamic Host Configuration Protocol) information</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Show DHCPv6 server information</help>
+ </properties>
+ <children>
+ <node name="leases">
+ <properties>
+ <help>Show DHCPv6 server leases</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <node name="dhcp">
+ <properties>
+ <help>Restart DHCP processes</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo systemctl restart isc-dhcp-server.service</command>
+ </node>
+ <node name="relay-agent">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo /opt/vyatta/sbin/dhcrelay-starter.pl --op-mode --init='/opt/vyatta/sbin/dhcrelay.init'</command>
+ </node>
+ </children>
+ </node>
+ <node name="dhcpv6">
+ <properties>
+ <help>Restart DHCPv6 processes</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Restart the DHCPv6 server process</help>
+ </properties>
+ <command>sudo systemctl restart isc-dhcpv6-server.service</command>
+ </node>
+ <node name="relay-agent">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo /opt/vyatta/sbin/dhcv6relay-starter.pl --op_mode --config_action ACTIVE</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>