summaryrefslogtreecommitdiffstats
path: root/src/share/api/remote-subnet4-list.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/api/remote-subnet4-list.json')
-rw-r--r--src/share/api/remote-subnet4-list.json56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/share/api/remote-subnet4-list.json b/src/share/api/remote-subnet4-list.json
new file mode 100644
index 0000000..a0c15ff
--- /dev/null
+++ b/src/share/api/remote-subnet4-list.json
@@ -0,0 +1,56 @@
+{
+ "access": "read",
+ "avail": "1.6.0",
+ "brief": [
+ "This command fetches a list of all IPv4 subnets from the configuration database."
+ ],
+ "cmd-comment": [
+ "The ``server-tags`` list is required for this command, and must not be empty. It may either contain one or multiple server tags as strings, or a single ``null`` value."
+ ],
+ "cmd-syntax": [
+ "{",
+ " \"command\": \"remote-subnet4-list\",",
+ " \"arguments\": {",
+ " \"remote\": {",
+ " <specification of the database to connect to>",
+ " },",
+ " \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+ " }",
+ "}"
+ ],
+ "hook": "cb_cmds",
+ "name": "remote-subnet4-list",
+ "resp-comment": [
+ "The returned response contains a list of maps. Each map contains a subnet identifier, prefix, and shared network name to which the subnet belongs. If the subnet does not belong to a shared network, the name is null. The metadata includes database-specific information associated with the subnets. The returned list does not contain full subnet definitions; use ``remote-subnet4-get`` to fetch the full information about the selected subnets. If the command includes explicit server tags as strings (including the special server tag \"all\"), the list contains all subnets which are associated with any of the specified tags. A subnet is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the ``null`` value in the ``server-tags`` list, the response contains all subnets which are assigned to no servers (unassigned)."
+ ],
+ "resp-syntax": [
+ "{",
+ " \"result\": 0,",
+ " \"text\": \"2 IPv4 subnets found.\",",
+ " \"arguments\": {",
+ " \"subnets\": [",
+ " {",
+ " \"id\": <first subnet identifier>,",
+ " \"subnet\": <first subnet prefix>,",
+ " \"shared-network-name\": <shared network name> | null,",
+ " \"metadata\": {",
+ " \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+ " }",
+ " },",
+ " {",
+ " \"id\": <second subnet identifier>,",
+ " \"subnet\": <second subnet prefix>,",
+ " \"shared-network-name\": <shared network name> | null,",
+ " \"metadata\": {",
+ " \"server-tags\": [ <first server tag>, ... ]",
+ " }",
+ " }",
+ " ],",
+ " \"count\": 2",
+ " }",
+ "}"
+ ],
+ "support": [
+ "kea-dhcp4"
+ ]
+}