From: Marcin Siodelski Date: Thu, 9 May 2019 10:02:16 +0000 (+0200) Subject: [#71,!314] Partially documented cb_cmds API. X-Git-Tag: Kea-1.6.0-beta~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5540eb90a144c957e53485c051dd0e54b825bb3a;p=thirdparty%2Fkea.git [#71,!314] Partially documented cb_cmds API. --- diff --git a/doc/api/remote-global-parameter4-del.json b/doc/api/remote-global-parameter4-del.json new file mode 100644 index 0000000000..f626ee1f10 --- /dev/null +++ b/doc/api/remote-global-parameter4-del.json @@ -0,0 +1,25 @@ +{ + "name": "remote-global-parameter4-del", + "brief": "This command is used to delete a global DHCPv4 parameter from a configuration database. The server will use the value specified in the configuration file or a default value (if the parameter is not specified in the configuration file) after deleting the parameter from the database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-global-parameter4-del\", + \"arguments\": { + \"parameters\": [ ], + \"remote\": { + + } + } +}", + "cmd-comment": "This command includes a list with exactly one name of the parameter to be deleted. The remote map contains specification of the backend from which the global parameter should be deleted. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 global parameter successfully deleted.\", + \"arguments\": { + \"count\": 1 + } +}" +} diff --git a/doc/api/remote-global-parameter4-get-all.json b/doc/api/remote-global-parameter4-get-all.json new file mode 100644 index 0000000000..469b40aa2b --- /dev/null +++ b/doc/api/remote-global-parameter4-get-all.json @@ -0,0 +1,39 @@ +{ + "name": "remote-global-parameter4-get-all", + "brief": "This command is used to fetch all global parameters for the server from the specified database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-global-parameter4-get-all\" + \"arguments\": { + \"remote\": { + + } + } +}", + "cmd-comment": "The remote map contains specification of the backend from which the global parameters should be fetched. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 global parameters found.\", + \"arguments\": { + \"parameters\": [ + { + : , + \"metadata\": { + \"server-tag\": + } + }, + { + : , + \"metadata\": { + \"server-tag\": + } + } + ], + \"count\": 2 + } +}", + "resp-comment": "The returned response contains a list of maps. Each map contains a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is appended to each parameter and it provides database specific information associated with the returned objects." +} diff --git a/doc/api/remote-global-parameter4-get.json b/doc/api/remote-global-parameter4-get.json new file mode 100644 index 0000000000..34e8ee4613 --- /dev/null +++ b/doc/api/remote-global-parameter4-get.json @@ -0,0 +1,34 @@ +{ + "name": "remote-global-parameter4-get", + "brief": "This command is used to fetch selected global parameter for the server from the specified database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-global-parameter4-get\" + \"arguments\": { + \"parameters\": [ ], + \"remote\": { + + } + } +} + +", + "cmd-comment": "The remote map contains specification of the backend from which the global parameters should be fetched. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 global parameter found.\", + \"arguments\": { + \"parameters\": { + : , + \"metadata\": { + \"server-tag\": + } + }, + \"count\": 1 + } +}", + "resp-comment": "The returned response contains a map with a global parameter name/value pair. The value may be a JSON string, integer, real or boolean. The metadata is included and it provides database specific information associated with the returned object." +} diff --git a/doc/api/remote-global-parameter4-set.json b/doc/api/remote-global-parameter4-set.json new file mode 100644 index 0000000000..e57bbfc644 --- /dev/null +++ b/doc/api/remote-global-parameter4-set.json @@ -0,0 +1,25 @@ +{ + "name": "remote-global-parameter4-set", + "brief": "This command is used to create or update one more global parameters for a server.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-global-parameter4-set\" + \"arguments\": { + \"parameters\": { + : , + : + }, + \"remote\": { + + } + } +}", + "cmd-comment": "The remote map contains specification of the backend where global parameter should be set. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"DHCPv4 global parameter(s) successfully set.\" +}" +} diff --git a/doc/api/remote-global-parameter6-del.json b/doc/api/remote-global-parameter6-del.json new file mode 100644 index 0000000000..ce280c12c5 --- /dev/null +++ b/doc/api/remote-global-parameter6-del.json @@ -0,0 +1,12 @@ +{ + "name": "remote-global-parameter6-del", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-global-parameter6-get-all.json b/doc/api/remote-global-parameter6-get-all.json new file mode 100644 index 0000000000..b40b4eb847 --- /dev/null +++ b/doc/api/remote-global-parameter6-get-all.json @@ -0,0 +1,12 @@ +{ + "name": "remote-global-parameter6-get-all", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-global-parameter6-get.json b/doc/api/remote-global-parameter6-get.json new file mode 100644 index 0000000000..4774608b10 --- /dev/null +++ b/doc/api/remote-global-parameter6-get.json @@ -0,0 +1,12 @@ +{ + "name": "remote-global-parameter6-get", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-global-parameter6-set.json b/doc/api/remote-global-parameter6-set.json new file mode 100644 index 0000000000..6258861bd0 --- /dev/null +++ b/doc/api/remote-global-parameter6-set.json @@ -0,0 +1,12 @@ +{ + "name": "remote-global-parameter6-set", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-network4-del.json b/doc/api/remote-network4-del.json new file mode 100644 index 0000000000..7d4846bbc3 --- /dev/null +++ b/doc/api/remote-network4-del.json @@ -0,0 +1,28 @@ +{ + "name": "remote-network4-del", + "brief": "This command is used to delete an IPv4 shared network from the configuration database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-network4-del\", + \"arguments\": { + \"shared-networks\": [ { + \"name\": + } ], + \"subnets-action\": \"keep\" | \"delete\", + \"remote\": { + + } + } +}", + "cmd-comment": "This command includes a list with exactly one name of the shared network to be deleted. The subnets-action denotes whether the subnets in this shared network should be deleted or not. The remote map contains specification of the backend from which the shared network should be deleted. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"1 IPv4 shared network(s) deleted.\", + \"arguments\": { + \"count\": 1 + } +}" +} diff --git a/doc/api/remote-network4-get.json b/doc/api/remote-network4-get.json new file mode 100644 index 0000000000..b81098aac6 --- /dev/null +++ b/doc/api/remote-network4-get.json @@ -0,0 +1,36 @@ +{ + "name": "remote-network4-get", + "brief": "This command is used to fetch selected IPv4 shared network for the server from the specified database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-network4-get\" + \"arguments\": { + \"shared-networks\": [ { + \"name\": + } ], + \"subnets-include\": \"full\" | \"no\", + \"remote\": { + + } + } +}", + "cmd-comment": "This command includes a list with exactly one name of the shared network to be returned. The subnets-include optional parameter allows for specifying whether subnets belonging to the shared network should also be returned. The remote map contains specification of the backend from which the shared network should be fetched. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 shared network 'floor1' found.\", + \"arguments\": { + \"shared-networks\": [ { + \"name\": , + \"metadata\": { + \"server-tag\": + }, + + } ], + \"count\": 1 + } +}", + "resp-comment": "The metadata is included in the returned shared network definition and it provides database specific information associated with the returned object." +} diff --git a/doc/api/remote-network4-list.json b/doc/api/remote-network4-list.json new file mode 100644 index 0000000000..d6f882e5cc --- /dev/null +++ b/doc/api/remote-network4-list.json @@ -0,0 +1,39 @@ +{ + "name": "remote-network4-list", + "brief": "This command is used to fetch a list of all subnets for the particular server from the specified database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-network4-list\" + \"arguments\": { + \"remote\": { + + } + } +}", + "cmd-comment": "The remote map contains specification of the backend from which the shared networks should be fetched. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"2 IPv4 shared network(s) found.\", + \"arguments\": { + \"shared-networks\": [ + { + \"name\": , + \"metadata\": { + \"server-tag\": + } + }, + { + \"name\": , + \"metadata\": { + \"server-tag\": + } + } + ], + \"count\": 2 + } +}", + "resp-comment": "The returned response contains a list of maps. Each map contains a shared network name and the metadata which provides database specific information associated with the shared networks. The returned list does not contain full definitions of the shared networks. Use remote-network4-get to fetch the full information about the selected shared networks." +} diff --git a/doc/api/remote-network4-set.json b/doc/api/remote-network4-set.json new file mode 100644 index 0000000000..0db21abe82 --- /dev/null +++ b/doc/api/remote-network4-set.json @@ -0,0 +1,24 @@ +{ + "name": "remote-network4-set", + "brief": "This command is used to create or update IPv4 shared network for a server in the specified database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-network4-set\", + \"arguments\": { + \"shared-networks\": [ { + + } ], + \"remote\": { + + } + } +}", + "cmd-comment": "The provided list must contain exactly one shared network specification. It must not contain subnets (subnet4 parameter). The subnets are added to the shared network using remote-subnet4-set command. The remote map contains specification of the backend where shared network should be set. Typically it contains \"type\": \"mysql\".", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 shared network successfully set.\" +}" +} diff --git a/doc/api/remote-network6-del.json b/doc/api/remote-network6-del.json new file mode 100644 index 0000000000..d92b9f7867 --- /dev/null +++ b/doc/api/remote-network6-del.json @@ -0,0 +1,12 @@ +{ + "name": "remote-network6-del", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-network6-get.json b/doc/api/remote-network6-get.json new file mode 100644 index 0000000000..5e6ff2e7e2 --- /dev/null +++ b/doc/api/remote-network6-get.json @@ -0,0 +1,12 @@ +{ + "name": "remote-network6-get", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-network6-list.json b/doc/api/remote-network6-list.json new file mode 100644 index 0000000000..015c61bcad --- /dev/null +++ b/doc/api/remote-network6-list.json @@ -0,0 +1,12 @@ +{ + "name": "remote-network6-list", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-network6-set.json b/doc/api/remote-network6-set.json new file mode 100644 index 0000000000..5a7c6de438 --- /dev/null +++ b/doc/api/remote-network6-set.json @@ -0,0 +1,12 @@ +{ + "name": "remote-network6-set", + "brief": "a sentence or two explaining what this command does", + "description": "See ", + "support": [ "undocumented" ], + "avail": "0.0.0", + "hook": "undocumented", + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the resposne syntax." +} diff --git a/doc/api/remote-option-def4-del.json b/doc/api/remote-option-def4-del.json new file mode 100644 index 0000000000..0d28d516a6 --- /dev/null +++ b/doc/api/remote-option-def4-del.json @@ -0,0 +1,28 @@ +{ + "name": "remote-option-def4-del", + "brief": "This command is used to delete a DHCPv4 option definition from the configuration database.", + "description": "See ", + "support": [ "kea-dhcp4" ], + "avail": "1.6.0", + "hook": "cb_cmds", + "cmd-syntax": "{ + \"command\": \"remote-option-def4-del\", + \"arguments\": { + \"option-defs\": [ { + \"code\":