From: Marcin Siodelski Date: Mon, 15 Jul 2019 12:44:37 +0000 (+0200) Subject: [#643,!421] Created API docs for remote-server* commands. X-Git-Tag: Kea-1.6.0-beta2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2810c44a1aafbf1f3a2bcef8a2a9e3510b31af96;p=thirdparty%2Fkea.git [#643,!421] Created API docs for remote-server* commands. --- diff --git a/doc/Makefile.am b/doc/Makefile.am index 4bfb887e7d..3f82ac64eb 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -156,6 +156,14 @@ EXTRA_DIST += api/remote-subnet6-set.json EXTRA_DIST += api/reservation-add.json api/reservation-del.json EXTRA_DIST += api/reservation-get.json api/reservation-get-all.json EXTRA_DIST += api/reservation-get-page.json api/shutdown.json +EXTRA_DIST += api/remote-server4-del.json +EXTRA_DIST += api/remote-server4-get.json +EXTRA_DIST += api/remote-server4-get-all.json +EXTRA_DIST += api/remote-server4-set.json +EXTRA_DIST += api/remote-server6-del.json +EXTRA_DIST += api/remote-server6-get.json +EXTRA_DIST += api/remote-server6-get-all.json +EXTRA_DIST += api/remote-server6-set.json EXTRA_DIST += api/statistic-get-all.json api/statistic-get.json EXTRA_DIST += api/statistic-remove-all.json api/statistic-remove.json EXTRA_DIST += api/statistic-reset-all.json api/statistic-reset.json diff --git a/doc/api/remote-global-parameter4-get-all.json b/doc/api/remote-global-parameter4-get-all.json index 9e6e511a18..12a85b091c 100644 --- a/doc/api/remote-global-parameter4-get-all.json +++ b/doc/api/remote-global-parameter4-get-all.json @@ -5,7 +5,7 @@ "avail": "1.6.0", "hook": "cb_cmds", "cmd-syntax": "{ - \"command\": \"remote-global-parameter4-get-all\" + \"command\": \"remote-global-parameter4-get-all\", \"arguments\": { \"remote\": { diff --git a/doc/api/remote-global-parameter4-get.json b/doc/api/remote-global-parameter4-get.json index be62d1910b..dc184d235e 100644 --- a/doc/api/remote-global-parameter4-get.json +++ b/doc/api/remote-global-parameter4-get.json @@ -5,7 +5,7 @@ "avail": "1.6.0", "hook": "cb_cmds", "cmd-syntax": "{ - \"command\": \"remote-global-parameter4-get\" + \"command\": \"remote-global-parameter4-get\", \"arguments\": { \"parameters\": [ ], \"remote\": { diff --git a/doc/api/remote-server4-del.json b/doc/api/remote-server4-del.json new file mode 100644 index 0000000000..1d74ea1a22 --- /dev/null +++ b/doc/api/remote-server4-del.json @@ -0,0 +1,28 @@ +{ + "name": "remote-server4-del", + "brief": "This command is used to delete information about a DHCPv4 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers.", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server4-del\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "This command carries the list including exactly one map with the tag of the server to be deleted.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"1 DHCPv4 server(s) deleted.\" + \"arguments\": { + \"count\": 1 + } +}" +} diff --git a/doc/api/remote-server4-get-all.json b/doc/api/remote-server4-get-all.json new file mode 100644 index 0000000000..aed338e7a5 --- /dev/null +++ b/doc/api/remote-server4-get-all.json @@ -0,0 +1,34 @@ +{ + "name": "remote-server4-get-all", + "brief": "This command is used to fetch information about all DHCPv4 servers specified by the user.", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server4-get-all\", + \"arguments\": { + \"remote\": { + + } + } +}", + "cmd-comment": "This command contains no arguments besides the optional remote.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 servers found.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + \"description\": + }, + { + \"server-tag\": + \"description\": + } + ], + \"count\": 2 + } +}", + "resp-comment": "The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword all to associate parts of the configuration with all servers. Internally, it creates the logical server all for this purpose. However, this logical server is not returned as a result of the remote-server4-get-all. Only the user defined servers are returned." +} diff --git a/doc/api/remote-server4-get.json b/doc/api/remote-server4-get.json new file mode 100644 index 0000000000..c5abc0e5e4 --- /dev/null +++ b/doc/api/remote-server4-get.json @@ -0,0 +1,35 @@ +{ + "name": "remote-server4-get", + "brief": "This command is used to fetch the information about the DHCPv4 server, such as server tag and description.", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server4-get\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "This command carries the list including exactly one map with the tag of the server to be fetched.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCP server found.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ], + \"count\": 1 + } +}", + "resp-comment": "The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information." +} diff --git a/doc/api/remote-server4-set.json b/doc/api/remote-server4-set.json new file mode 100644 index 0000000000..ca8fc5776e --- /dev/null +++ b/doc/api/remote-server4-set.json @@ -0,0 +1,34 @@ +{ + "name": "remote-server4-set", + "brief": "This command is used to create or replace information about the DHCPv4 server in the database.", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server4-set\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "The provided list must contain exactly one server specification. The server-tag must be unique accross all servers within the configuration database. The description is the arbitrary text describing the server, its location within the network etc.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 server successfully set.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ] + } +}" +} diff --git a/doc/api/remote-server6-del.json b/doc/api/remote-server6-del.json new file mode 100644 index 0000000000..6c079ad53a --- /dev/null +++ b/doc/api/remote-server6-del.json @@ -0,0 +1,28 @@ +{ + "name": "remote-server6-del", + "brief": "This command is used to delete information about a DHCPv6 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers.", + "support": [ "kea-dhcp6" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server6-del\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "This command carries the list including exactly one map with the tag of the server to be deleted.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"1 DHCPv6 server(s) deleted.\" + \"arguments\": { + \"count\": 1 + } +}" +} diff --git a/doc/api/remote-server6-get-all.json b/doc/api/remote-server6-get-all.json new file mode 100644 index 0000000000..d5d998e9f6 --- /dev/null +++ b/doc/api/remote-server6-get-all.json @@ -0,0 +1,34 @@ +{ + "name": "remote-server6-get-all", + "brief": "This command is used to fetch information about all DHCPv6 servers specified by the user.", + "support": [ "kea-dhcp6" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server6-get-all\", + \"arguments\": { + \"remote\": { + + } + } +}", + "cmd-comment": "This command contains no arguments besides the optional remote.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv6 servers found.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + \"description\": + }, + { + \"server-tag\": + \"description\": + } + ], + \"count\": 2 + } +}", + "resp-comment": "The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword all to associate parts of the configuration with all servers. Internally, it creates the logical server all for this purpose. However, this logical server is not returned as a result of the remote-server6-get-all. Only the user defined servers are returned." +} diff --git a/doc/api/remote-server6-get.json b/doc/api/remote-server6-get.json new file mode 100644 index 0000000000..04ad9fe54b --- /dev/null +++ b/doc/api/remote-server6-get.json @@ -0,0 +1,35 @@ +{ + "name": "remote-server6-get", + "brief": "This command is used to fetch the information about the DHCPv6 server, such as server tag and description.", + "support": [ "kea-dhcp6" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server6-get\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "This command carries the list including exactly one map with the tag of the server to be fetched.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCP server found.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ], + \"count\": 1 + } +}", + "resp-comment": "The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information." +} diff --git a/doc/api/remote-server6-set.json b/doc/api/remote-server6-set.json new file mode 100644 index 0000000000..f4ee9fa0c8 --- /dev/null +++ b/doc/api/remote-server6-set.json @@ -0,0 +1,34 @@ +{ + "name": "remote-server6-set", + "brief": "This command is used to create or replace information about the DHCPv6 server in the database.", + "support": [ "kea-dhcp6" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-server6-set\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ], + \"remote\": { + + } + } +}", + "cmd-comment": "The provided list must contain exactly one server specification. The server-tag must be unique accross all servers within the configuration database. The description is the arbitrary text describing the server, its location within the network etc.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv6 server successfully set.\", + \"arguments\": { + \"servers\": [ + { + \"server-tag\": , + \"description\": + } + ] + } +}" +} diff --git a/doc/docgen/cmds-list b/doc/docgen/cmds-list index b58cd72dff..0289e4d431 100644 --- a/doc/docgen/cmds-list +++ b/doc/docgen/cmds-list @@ -83,6 +83,14 @@ remote-option6-global-del remote-option6-global-get remote-option6-global-get-all remote-option6-global-set +remote-server4-del +remote-server4-get +remote-server4-get-all +remote-server4-set +remote-server6-del +remote-server6-get +remote-server6-get-all +remote-server6-set remote-subnet4-del-by-id remote-subnet4-del-by-prefix remote-subnet4-get-by-id diff --git a/doc/guide/api.xml b/doc/guide/api.xml index e280e88ccb..00a1a4a5f6 100644 --- a/doc/guide/api.xml +++ b/doc/guide/api.xml @@ -9,7 +9,7 @@ API Reference - Kea currently supports 122 commands: + Kea currently supports 130 commands: build-report , cache-clear , cache-get @@ -95,6 +95,14 @@ , remote-option6-global-get , remote-option6-global-get-all , remote-option6-global-set +, remote-server4-del +, remote-server4-get +, remote-server4-get-all +, remote-server4-set +, remote-server6-del +, remote-server6-get +, remote-server6-get-all +, remote-server6-set , remote-subnet4-del-by-id , remote-subnet4-del-by-prefix , remote-subnet4-get-by-id @@ -209,6 +217,10 @@ , remote-option4-global-get , remote-option4-global-get-all , remote-option4-global-set +, remote-server4-del +, remote-server4-get +, remote-server4-get-all +, remote-server4-set , remote-subnet4-del-by-id , remote-subnet4-del-by-prefix , remote-subnet4-get-by-id @@ -292,6 +304,10 @@ , remote-option6-global-get , remote-option6-global-get-all , remote-option6-global-set +, remote-server6-del +, remote-server6-get +, remote-server6-get-all +, remote-server6-set , remote-subnet6-del-by-id , remote-subnet6-del-by-prefix , remote-subnet6-get-by-id @@ -350,6 +366,14 @@ , remote-option6-global-get , remote-option6-global-get-all , remote-option6-global-set +, remote-server4-del +, remote-server4-get +, remote-server4-get-all +, remote-server4-set +, remote-server6-del +, remote-server6-get +, remote-server6-get-all +, remote-server6-set , remote-subnet4-del-by-id , remote-subnet4-del-by-prefix , remote-subnet4-get-by-id @@ -2710,7 +2734,7 @@ Result is an integer representation of the status. Currently supported statuses Command syntax: { - "command": "remote-global-parameter4-get" + "command": "remote-global-parameter4-get", "arguments": { "parameters": [ <parameter name> ], "remote": { @@ -2752,7 +2776,7 @@ The returned response contains a map with a global parameter name/value pair. Th Command syntax: { - "command": "remote-global-parameter4-get-all" + "command": "remote-global-parameter4-get-all", "arguments": { "remote": { <specification of the database to connect to> @@ -2817,7 +2841,14 @@ This command carries multiple global parameters with their values. Care should b Response syntax: { "result": 0, - "text": "DHCPv4 global parameter(s) successfully set." + "text": "DHCPv4 global parameter(s) successfully set.", + "arguments": { + "parameters": { + <first parameter name>: <first parameter value>, + <second parameter name>: <second parameter value> + }, + "count": 2 + } } Result is an integer representation of the status. Currently supported statuses are: @@ -2993,7 +3024,14 @@ This command carries multiple global parameters with their values. Care should b Response syntax: { "result": 0, - "text": "DHCPv6 global parameter(s) successfully set." + "text": "DHCPv6 global parameter(s) successfully set.", + "arguments": { + "parameters": { + <first parameter name>: <first parameter value>, + <second parameter name>: <second parameter value> + }, + "count": 2 + } } Result is an integer representation of the status. Currently supported statuses are: @@ -4159,6 +4197,388 @@ Result is an integer representation of the status. Currently supported statuses + +
+remote-server4-del reference +remote-server4-del - This command is used to delete information about a DHCPv4 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers. + +Supported by: kea-dhcp4 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server4-del", + "arguments": { + "servers": [ + { + "server-tag": <server name> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +This command carries the list including exactly one map with the tag of the server to be deleted. + +Response syntax: + { + "result": 0, + "text": "1 DHCPv4 server(s) deleted." + "arguments": { + "count": 1 + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+remote-server4-get reference +remote-server4-get - This command is used to fetch the information about the DHCPv4 server, such as server tag and description. + +Supported by: kea-dhcp4 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server4-get", + "arguments": { + "servers": [ + { + "server-tag": <server tag> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +This command carries the list including exactly one map with the tag of the server to be fetched. + +Response syntax: + { + "result": 0, + "text": "DHCP server <server tag> found.", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ], + "count": 1 + } +} +The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information. + +
+ + + +
+remote-server4-get-all reference +remote-server4-get-all - This command is used to fetch information about all DHCPv4 servers specified by the user. + +Supported by: kea-dhcp4 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server4-get-all", + "arguments": { + "remote": { + <specification of the database to connect to> + } + } +} +This command contains no arguments besides the optional remote. + +Response syntax: + { + "result": 0, + "text": "DHCPv4 servers found.", + "arguments": { + "servers": [ + { + "server-tag": <first server tag> + "description": <first server description> + }, + { + "server-tag": <second server tag> + "description": <second server description> + } + ], + "count": 2 + } +} +The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword all to associate parts of the configuration with all servers. Internally, it creates the logical server all for this purpose. However, this logical server is not returned as a result of the remote-server4-get-all. Only the user defined servers are returned. + +
+ + + +
+remote-server4-set reference +remote-server4-set - This command is used to create or replace information about the DHCPv4 server in the database. + +Supported by: kea-dhcp4 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server4-set", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +The provided list must contain exactly one server specification. The server-tag must be unique accross all servers within the configuration database. The description is the arbitrary text describing the server, its location within the network etc. + +Response syntax: + { + "result": 0, + "text": "DHCPv4 server successfully set.", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+remote-server6-del reference +remote-server6-del - This command is used to delete information about a DHCPv6 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. The shareable configuration (e.g. subnets, shared networks) is not deleted as it may be used by other servers. + +Supported by: kea-dhcp6 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server6-del", + "arguments": { + "servers": [ + { + "server-tag": <server name> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +This command carries the list including exactly one map with the tag of the server to be deleted. + +Response syntax: + { + "result": 0, + "text": "1 DHCPv6 server(s) deleted." + "arguments": { + "count": 1 + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+remote-server6-get reference +remote-server6-get - This command is used to fetch the information about the DHCPv6 server, such as server tag and description. + +Supported by: kea-dhcp6 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server6-get", + "arguments": { + "servers": [ + { + "server-tag": <server tag> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +This command carries the list including exactly one map with the tag of the server to be fetched. + +Response syntax: + { + "result": 0, + "text": "DHCP server <server tag> found.", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ], + "count": 1 + } +} +The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information. + +
+ + + +
+remote-server6-get-all reference +remote-server6-get-all - This command is used to fetch information about all DHCPv6 servers specified by the user. + +Supported by: kea-dhcp6 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server6-get-all", + "arguments": { + "remote": { + <specification of the database to connect to> + } + } +} +This command contains no arguments besides the optional remote. + +Response syntax: + { + "result": 0, + "text": "DHCPv6 servers found.", + "arguments": { + "servers": [ + { + "server-tag": <first server tag> + "description": <first server description> + }, + { + "server-tag": <second server tag> + "description": <second server description> + } + ], + "count": 2 + } +} +The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server and the user defined description of the server. The Kea Configuration Backend uses the keyword all to associate parts of the configuration with all servers. Internally, it creates the logical server all for this purpose. However, this logical server is not returned as a result of the remote-server6-get-all. Only the user defined servers are returned. + +
+ + + +
+remote-server6-set reference +remote-server6-set - This command is used to create or replace information about the DHCPv6 server in the database. + +Supported by: kea-dhcp6 + +Availability: 1.6.0 (cb_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "remote-server6-set", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ], + "remote": { + <specification of the database to connect to> + } + } +} +The provided list must contain exactly one server specification. The server-tag must be unique accross all servers within the configuration database. The description is the arbitrary text describing the server, its location within the network etc. + +Response syntax: + { + "result": 0, + "text": "DHCPv6 server successfully set.", + "arguments": { + "servers": [ + { + "server-tag": <server tag>, + "description": <server description> + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ +
remote-subnet4-del-by-id reference