summaryrefslogtreecommitdiff
path: root/op-mode-definitions/clear-dhcp-server-lease.xml.in
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-06-15 12:32:07 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-06-16 05:17:54 +0000
commita83eecfeee1f925c914a46623dd35f96b48389f8 (patch)
tree9724dfd47bdc95717b12fd4edf177536d78f9d4f /op-mode-definitions/clear-dhcp-server-lease.xml.in
parent609a3abb3d9b60daf0bdd5e3733791d520322802 (diff)
downloadvyos-1x-a83eecfeee1f925c914a46623dd35f96b48389f8.tar.gz
vyos-1x-a83eecfeee1f925c914a46623dd35f96b48389f8.zip
op-mode: T1375: Allow to clear dhcp-server lease
Allow to reset dhcp-leases per ip Parse file '/config/dhcpd.leases' find match section 'lease x.x.x.x {}' And remove this section clear dhcp-server lease 192.0.2.21
Diffstat (limited to 'op-mode-definitions/clear-dhcp-server-lease.xml.in')
-rw-r--r--op-mode-definitions/clear-dhcp-server-lease.xml.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/op-mode-definitions/clear-dhcp-server-lease.xml.in b/op-mode-definitions/clear-dhcp-server-lease.xml.in
new file mode 100644
index 000000000..b1241588c
--- /dev/null
+++ b/op-mode-definitions/clear-dhcp-server-lease.xml.in
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <children>
+ <node name="dhcp-server">
+ <properties>
+ <help>clear DHCP server lease</help>
+ </properties>
+ <children>
+ <tagNode name="lease">
+ <properties>
+ <help>DHCP server lease</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/clear_dhcp_lease.py --ip $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>