]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1977] Added API files to class commands in CB
authorMarcin Siodelski <marcin@isc.org>
Sat, 17 Jul 2021 13:55:47 +0000 (15:55 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 23 Jul 2021 06:04:51 +0000 (08:04 +0200)
doc/sphinx/api-files.txt
src/share/api/api_files.mk
src/share/api/remote-class4-del.json [new file with mode: 0644]
src/share/api/remote-class4-get-all.json [new file with mode: 0644]
src/share/api/remote-class4-get.json [new file with mode: 0644]
src/share/api/remote-class4-set.json [new file with mode: 0644]
src/share/api/remote-class6-del.json [new file with mode: 0644]
src/share/api/remote-class6-get-all.json [new file with mode: 0644]
src/share/api/remote-class6-get.json [new file with mode: 0644]
src/share/api/remote-class6-set.json [new file with mode: 0644]

index 3e23c5a27d911e756630e03ed5e58cb90e7a72c2..a0fca97656033a73ca5bd7bb0d4be9fb41ebfdc8 100644 (file)
@@ -66,6 +66,14 @@ src/share/api/network6-get.json
 src/share/api/network6-list.json
 src/share/api/network6-subnet-add.json
 src/share/api/network6-subnet-del.json
+src/share/api/remote-class4-del.json
+src/share/api/remote-class4-get.json
+src/share/api/remote-class4-get-all.json
+src/share/api/remote-class4-set.json
+src/share/api/remote-class6-del.json
+src/share/api/remote-class6-get.json
+src/share/api/remote-class6-get-all.json
+src/share/api/remote-class6-set.json
 src/share/api/remote-global-parameter4-del.json
 src/share/api/remote-global-parameter4-get-all.json
 src/share/api/remote-global-parameter4-get.json
index 8bfb37cda4a1dbb367c87b8491365481ba87836d..eaec3142f8f14e87cc0128fd5280ebe474889648 100644 (file)
@@ -66,6 +66,14 @@ api_files += $(top_srcdir)/src/share/api/network6-get.json
 api_files += $(top_srcdir)/src/share/api/network6-list.json
 api_files += $(top_srcdir)/src/share/api/network6-subnet-add.json
 api_files += $(top_srcdir)/src/share/api/network6-subnet-del.json
+api_files += $(top_srcdir)/src/share/api/remote-class4-del.json
+api_files += $(top_srcdir)/src/share/api/remote-class4-get.json
+api_files += $(top_srcdir)/src/share/api/remote-class4-get-all.json
+api_files += $(top_srcdir)/src/share/api/remote-class4-set.json
+api_files += $(top_srcdir)/src/share/api/remote-class6-del.json
+api_files += $(top_srcdir)/src/share/api/remote-class6-get.json
+api_files += $(top_srcdir)/src/share/api/remote-class6-get-all.json
+api_files += $(top_srcdir)/src/share/api/remote-class6-set.json
 api_files += $(top_srcdir)/src/share/api/remote-global-parameter4-del.json
 api_files += $(top_srcdir)/src/share/api/remote-global-parameter4-get-all.json
 api_files += $(top_srcdir)/src/share/api/remote-global-parameter4-get.json
diff --git a/src/share/api/remote-class4-del.json b/src/share/api/remote-class4-del.json
new file mode 100644 (file)
index 0000000..af73605
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "1.9.10",
+    "brief": [
+        "This command deletes a DHCPv4 client class from the configuration database."
+    ],
+    "cmd-comment": [
+        "This command includes a list with exactly one name of the client class to be deleted. The ``server-tags`` parameter must not be specified for this command."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class4-del\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        }",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class4-del",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"1 DHCPv4 client class(es) deleted.\",",
+        "    \"arguments\": {",
+        "        \"count\": 1",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
diff --git a/src/share/api/remote-class4-get-all.json b/src/share/api/remote-class4-get-all.json
new file mode 100644 (file)
index 0000000..639fc36
--- /dev/null
@@ -0,0 +1,52 @@
+{
+    "access": "read",
+    "avail": "1.9.10",
+    "brief": [
+        "This command fetches all DHCPv4 client classes for specified servers from the configuration database."
+    ],
+    "cmd-comment": [
+        "The ``server-tags`` list is required for this command, and must not be empty."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class4-get-all\",",
+        "    \"arguments\": {",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        },",
+        "        \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class4-get-all",
+    "resp-comment": [
+        "The returned response contains a list of maps. Each map contains a client class name and the metadata, which provides database-specific information associated with the client class."
+    ],
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"2 DHCPv4 client class(es) found.\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                <first client class specification>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "                }",
+        "            },",
+        "            {",
+        "                <second client class specification>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, ... ]",
+        "                }",
+        "            }",
+        "        ],",
+        "        \"count\": 2",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
diff --git a/src/share/api/remote-class4-get.json b/src/share/api/remote-class4-get.json
new file mode 100644 (file)
index 0000000..5dfdcb5
--- /dev/null
@@ -0,0 +1,51 @@
+{
+    "access": "read",
+    "avail": "1.9.10",
+    "brief": [
+        "This command fetches a selected DHCPv4 client class by name from the specified database."
+    ],
+    "cmd-comment": [
+        "This command includes a list with exactly one name of the client class to be returned. The ``server-tags`` parameter must not be specified for this command."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class4-get\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        }",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class4-get",
+    "resp-comment": [
+        "The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object."
+    ],
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"DHCPv4 client class found.\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "                },",
+        "                <the rest of the client class information>",
+        "            }",
+        "        ],",
+        "        \"count\": 1",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
diff --git a/src/share/api/remote-class4-set.json b/src/share/api/remote-class4-set.json
new file mode 100644 (file)
index 0000000..b978496
--- /dev/null
@@ -0,0 +1,44 @@
+{
+    "access": "write",
+    "avail": "1.9.10",
+    "brief": [
+        "This command creates or replaces a DHCPv4 client class in the configuration database."
+    ],
+    "cmd-comment": [
+        "The provided list must contain exactly one client class specification. It may contain an optional parameter \"follow-class-name\" which can specify an existing class name to indicate that the class from the command is placed right after this existing class in the hierarchy. This parameter can be ommitted or set to \"null\" to indicate that the new client class should be appended at the end of the hierarchy or an updated class should remain at the current position. The ``server-tags`` list is mandatory and must contain one or more server tags as strings to explicitly associate the client class with one or more user-defined servers. It may include the special server tag \"all\" to associate the class with all servers."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class4-set\",",
+        "    \"arguments\": {",
+        "        \"client-class\": [",
+        "            {",
+        "                <client class specification>",
+        "                \"follow-class-name\": <existing class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        },",
+        "        \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class4-set",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"DHCPv4 shared network successfully set.\"",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <set client class name>",
+        "            }",
+        "    ]",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
diff --git a/src/share/api/remote-class6-del.json b/src/share/api/remote-class6-del.json
new file mode 100644 (file)
index 0000000..f74578d
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "1.9.10",
+    "brief": [
+        "This command deletes a DHCPv6 client class from the configuration database."
+    ],
+    "cmd-comment": [
+        "This command includes a list with exactly one name of the client class to be deleted. The ``server-tags`` parameter must not be specified for this command."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class6-del\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        }",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class6-del",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"1 DHCPv6 client class(es) deleted.\",",
+        "    \"arguments\": {",
+        "        \"count\": 1",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/remote-class6-get-all.json b/src/share/api/remote-class6-get-all.json
new file mode 100644 (file)
index 0000000..216611c
--- /dev/null
@@ -0,0 +1,52 @@
+{
+    "access": "read",
+    "avail": "1.9.10",
+    "brief": [
+        "This command fetches all DHCPv6 client classes for specified servers from the configuration database."
+    ],
+    "cmd-comment": [
+        "The ``server-tags`` list is required for this command, and must not be empty."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class6-get-all\",",
+        "    \"arguments\": {",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        },",
+        "        \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class6-get-all",
+    "resp-comment": [
+        "The returned response contains a list of maps. Each map contains a client class name and the metadata, which provides database-specific information associated with the client class."
+    ],
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"2 DHCPv6 client class(es) found.\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                <first client class specification>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "                }",
+        "            },",
+        "            {",
+        "                <second client class specification>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, ... ]",
+        "                }",
+        "            }",
+        "        ],",
+        "        \"count\": 2",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/remote-class6-get.json b/src/share/api/remote-class6-get.json
new file mode 100644 (file)
index 0000000..bf90fbe
--- /dev/null
@@ -0,0 +1,51 @@
+{
+    "access": "read",
+    "avail": "1.9.10",
+    "brief": [
+        "This command fetches a selected DHCPv6 client class by name from the specified database."
+    ],
+    "cmd-comment": [
+        "This command includes a list with exactly one name of the client class to be returned. The ``server-tags`` parameter must not be specified for this command."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class6-get\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        }",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class6-get",
+    "resp-comment": [
+        "The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object."
+    ],
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"DHCPv6 client class found.\",",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <client class name>,",
+        "                \"metadata\": {",
+        "                    \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "                },",
+        "                <the rest of the client class information>",
+        "            }",
+        "        ],",
+        "        \"count\": 1",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/remote-class6-set.json b/src/share/api/remote-class6-set.json
new file mode 100644 (file)
index 0000000..37e66b9
--- /dev/null
@@ -0,0 +1,44 @@
+{
+    "access": "write",
+    "avail": "1.9.10",
+    "brief": [
+        "This command creates or replaces a DHCPv6 client class in the configuration database."
+    ],
+    "cmd-comment": [
+        "The provided list must contain exactly one client class specification. It may contain an optional parameter \"follow-class-name\" which can specify an existing class name to indicate that the class from the command is placed right after this existing class in the hierarchy. This parameter can be ommitted or set to \"null\" to indicate that the new client class should be appended at the end of the hierarchy or an updated class should remain at the current position. The ``server-tags`` list is mandatory and must contain one or more server tags as strings to explicitly associate the client class with one or more user-defined servers. It may include the special server tag \"all\" to associate the class with all servers."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"remote-class6-set\",",
+        "    \"arguments\": {",
+        "        \"client-class\": [",
+        "            {",
+        "                <client class specification>",
+        "                \"follow-class-name\": <existing class name>",
+        "            }",
+        "        ],",
+        "        \"remote\": {",
+        "            <specification of the database to connect to>",
+        "        },",
+        "        \"server-tags\": [ <first server tag>, <second server tag>, ... ]",
+        "    }",
+        "}"
+    ],
+    "hook": "cb_cmds",
+    "name": "remote-class6-set",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"DHCPv6 shared network successfully set.\"",
+        "    \"arguments\": {",
+        "        \"client-classes\": [",
+        "            {",
+        "                \"name\": <set client class name>",
+        "            }",
+        "    ]",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}