From: Piotrek Zadroga Date: Thu, 15 Jun 2023 10:52:11 +0000 (+0200) Subject: [#2795] rename cmd to get-reservation-by-address X-Git-Tag: Kea-2.4.0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28487364f6a2257a55375c3ea167371e416c4b92;p=thirdparty%2Fkea.git [#2795] rename cmd to get-reservation-by-address --- diff --git a/doc/sphinx/arm/hooks-host-cmds.rst b/doc/sphinx/arm/hooks-host-cmds.rst index b205805006..88fa4bfa9a 100644 --- a/doc/sphinx/arm/hooks-host-cmds.rst +++ b/doc/sphinx/arm/hooks-host-cmds.rst @@ -367,12 +367,12 @@ An example result returned when the query was malformed might look like this: { "result": 1, "text": "No 'ip-address' provided and 'identifier-type' is either missing or not a string." } -.. _command-reservations-get: +.. _command-reservation-get-by-address: -The ``reservations-get`` Command -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ``reservation-get-by-address`` Command +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``reservations-get`` can be used to query the host database and +``reservation-get-by-address`` can be used to query the host database and retrieve all reservations in a specified subnet for given ip address. .. isccmd:: reservation-get-all diff --git a/src/share/api/api_files.mk b/src/share/api/api_files.mk index 4c734b0afa..bb3f761abc 100644 --- a/src/share/api/api_files.mk +++ b/src/share/api/api_files.mk @@ -158,11 +158,11 @@ api_files += $(top_srcdir)/src/share/api/remote-subnet6-set.json api_files += $(top_srcdir)/src/share/api/reservation-add.json api_files += $(top_srcdir)/src/share/api/reservation-del.json api_files += $(top_srcdir)/src/share/api/reservation-get-all.json +api_files += $(top_srcdir)/src/share/api/reservation-get-by-address.json api_files += $(top_srcdir)/src/share/api/reservation-get-by-hostname.json api_files += $(top_srcdir)/src/share/api/reservation-get-by-id.json api_files += $(top_srcdir)/src/share/api/reservation-get-page.json api_files += $(top_srcdir)/src/share/api/reservation-get.json -api_files += $(top_srcdir)/src/share/api/reservations-get.json api_files += $(top_srcdir)/src/share/api/reservation-update.json api_files += $(top_srcdir)/src/share/api/server-tag-get.json api_files += $(top_srcdir)/src/share/api/shutdown.json diff --git a/src/share/api/reservation-get-by-address.json b/src/share/api/reservation-get-by-address.json new file mode 100644 index 0000000000..c9a40bbc8e --- /dev/null +++ b/src/share/api/reservation-get-by-address.json @@ -0,0 +1,29 @@ +{ + "access": "read", + "avail": "2.3.9", + "brief": [ + "This command retrieves all host reservations for given ip-address and optionally a specified subnet." + ], + "cmd-comment": [ + "The host reservations can be identified by a pair of ip-address and subnet-id. Subnet-id is optional. Operation-target is optional; default is 'all'." + ], + "cmd-syntax": [ + "{", + " \"command\": \"reservation-get-by-address\",", + " \"arguments\": {", + " \"ip-address\": ,", + " \"subnet-id\": ,", + " \"operation-target\": ", + " }", + "}" + ], + "hook": "host_cmds", + "name": "reservation-get-by-address", + "resp-comment": [ + "The reservation-get-by-address may return many reservations for the same ip-address. This command may be useful in case ip-reservations-unique configuration flag is set to false." + ], + "support": [ + "kea-dhcp4", + "kea-dhcp6" + ] +} diff --git a/src/share/api/reservations-get.json b/src/share/api/reservations-get.json deleted file mode 100644 index 3bd6df47cf..0000000000 --- a/src/share/api/reservations-get.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "access": "read", - "avail": "2.3.9", - "brief": [ - "This command retrieves all host reservations for a specified subnet and ip-address." - ], - "cmd-comment": [ - "The host reservations can be identified by a pair of subnet-id, ip-address. Operation-target is optional; default is 'all'." - ], - "cmd-syntax": [ - "{", - " \"command\": \"reservations-get\",", - " \"arguments\": {", - " \"subnet-id\": ,", - " \"ip-address\": ,", - " \"operation-target\": ", - " }", - "}" - ], - "hook": "host_cmds", - "name": "reservations-get", - "resp-comment": [ - "The reservations-get may return many reservations for the same ip-address. This is useful in case ip-reservations-unique configuration flag is set to false." - ], - "support": [ - "kea-dhcp4", - "kea-dhcp6" - ] -}