]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2266] updated documentation
authorRazvan Becheriu <razvan@isc.org>
Thu, 16 Jun 2022 10:56:48 +0000 (13:56 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 24 Jun 2022 18:15:37 +0000 (18:15 +0000)
22 files changed:
doc/sphinx/api-files.txt
doc/sphinx/arm/hooks-subnet-cmds.rst
src/lib/dhcp/option_definition.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.h
src/share/api/api_files.mk
src/share/api/network4-del.json
src/share/api/network4-get.json
src/share/api/network6-add.json
src/share/api/network6-del.json
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/subnet4-add.json
src/share/api/subnet4-delta-add.json [new file with mode: 0644]
src/share/api/subnet4-delta-del.json [new file with mode: 0644]
src/share/api/subnet4-update.json
src/share/api/subnet6-add.json
src/share/api/subnet6-delta-add.json [new file with mode: 0644]
src/share/api/subnet6-delta-del.json [new file with mode: 0644]
src/share/api/subnet6-update.json

index 95adccb8381e0592163183984144c7eec68a2635..735d520a5f8e213676df6adef5545aa8a99e1bba 100644 (file)
@@ -175,11 +175,15 @@ src/share/api/statistic-sample-count-set.json
 src/share/api/status-get.json
 src/share/api/subnet4-add.json
 src/share/api/subnet4-del.json
+src/share/api/subnet4-delta-add.json
+src/share/api/subnet4-delta-del.json
 src/share/api/subnet4-get.json
 src/share/api/subnet4-list.json
 src/share/api/subnet4-update.json
 src/share/api/subnet6-add.json
 src/share/api/subnet6-del.json
+src/share/api/subnet6-delta-add.json
+src/share/api/subnet6-delta-del.json
 src/share/api/subnet6-get.json
 src/share/api/subnet6-list.json
 src/share/api/subnet6-update.json
index fe4e002d818a54d7b030b7ee3a167b44e4927df9..e5cb734f4bec93b4cd6cd81c7acd8ec8f328466f 100644 (file)
@@ -37,6 +37,12 @@ The following commands are currently supported:
 -  ``subnet4-del``/``subnet6-del`` - removes a subnet from the server's
    configuration.
 
+-  ``subnet4-delta-add``/``subnet6-delta-add`` - updates (replaces) parts of a
+   single subnet in the server's configuration.
+
+-  ``subnet4-delta-del``/``subnet6-delta-del`` - removes parts of a single subnet in
+   the server's configuration.
+
 -  ``network4-list``/``network6-list`` - lists all configured shared networks.
 
 -  ``network4-get``/``network6-get`` - retrieves detailed information about a
@@ -561,6 +567,306 @@ A successful response may look like this:
        ]
    }
 
+.. _command-subnet4-delta-add:
+
+The ``subnet4-delta-add`` Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This command is used to update (overwrite) parts of a single subnet in the
+existing server configuration. This operation has no impact on other subnets.
+The subnet identifier is used to identify the subnet to update; it must be
+specified and must be unique among all subnets. The subnet prefix should
+not be updated.
+
+The subnet information within this command has the same structure as the
+subnet information in the server configuration file, with the exception
+that static host reservations cannot be specified within
+``subnet4-delta-add``. The commands described in :ref:`hooks-host-cmds` should be used
+to update, remove, and modify static reservations.
+
+::
+
+   {
+       "command": "subnet4-delta-add",
+       "arguments": {
+           "subnet4": [ {
+               ...
+               "id": 123,
+               "subnet": "10.20.30.0/24",
+               "option-data": [
+                   ...
+               ],
+               "pools": [
+                   ...
+                   {
+                       ...
+                       "pool": "10.20.30.1-10.20.30.10",
+                       "option-data": [
+                           ...
+                       ]
+                   }
+               ]
+           } ]
+       }
+   }
+
+The response to this command has the following structure:
+
+::
+
+   {
+       "result": 0,
+       "text": "IPv4 subnet updated",
+       "arguments": {
+           "subnet4": [
+               {
+                   "id": 123,
+                   "subnet": "10.20.30.0/24"
+               }
+           ]
+       }
+   }
+
+.. _command-subnet6-delta-add:
+
+The ``subnet6-delta-add`` Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This command is used to update (overwrite) parts of a single subnet in the
+existing server configuration. This operation has no impact on other subnets.
+The subnet identifier is used to identify the subnet to update; it must be
+specified and must be unique among all subnets. The subnet prefix should
+not be updated.
+
+The subnet information within this command has the same structure as the
+subnet information in the server configuration file, with the exception
+that static host reservations cannot be specified within
+``subnet6-delta-add``. The commands described in :ref:`hooks-host-cmds` should be used
+to update, remove, and modify static reservations.
+
+::
+
+   {
+       "command": "subnet6-delta-add",
+       "arguments": {
+           "subnet6": [ {
+               ...
+               "id": 243,
+               "subnet": "2001:db8:1::/64",
+               "option-data": [
+                   ...
+               ],
+               "pd-pools": [
+                   ...
+                   {
+                       ...
+                       "prefix": "2001:db8:2::",
+                       "prefix-len": 48,
+                       "delegated-len": 64,
+                       "option-data": [
+                           ...
+                       ]
+                   }
+               ],
+               "pools": [
+                   ...
+                   {
+                       ...
+                       "pool": "2001:db8:1::1-2001:db8:1::10",
+                       "option-data": [
+                           ...
+                       ]
+                   }
+               ]
+           } ]
+       }
+   }
+
+The response to this command has the following structure:
+
+::
+
+   {
+       "result": 0,
+       "text": "IPv6 subnet updated",
+       "arguments": {
+           "subnet6": [
+               {
+                   "id": 234,
+                   "subnet": "2001:db8:1::/64"
+               }
+           ]
+       }
+   }
+
+.. _command-subnet4-delta-del:
+
+The ``subnet4-delta-del`` Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This command is used to update (overwrite) parts of a single subnet in the
+existing server configuration. This operation has no impact on other subnets.
+The subnet identifier is used to identify the subnet to update; it must be
+specified and must be unique among all subnets. The subnet prefix should
+not be updated.
+
+The subnet information within this command has the same structure as the
+subnet information in the server configuration file, with the exception
+that static host reservations cannot be specified within
+``subnet4-delta-del``. The commands described in :ref:`hooks-host-cmds` should be used
+to update, remove, and modify static reservations.
+
+The command is flexible and can delete the part of the subnet by either
+specifying the entire object that needs to be deleted, or just the keys
+identifying the respective object. The address pools are identified by the
+'pool' parameter, the options are identified by the 'name' or 'code' and
+'space' parameters. The 'space' parameter can be omitted if the option belongs
+to the default 'dhcp4' space.
+
+::
+
+   {
+       "command": "subnet4-delta-del",
+       "arguments": {
+           "subnet4": [ {
+               ...
+               "id": 123,
+               "subnet": "10.20.30.0/24",
+               "option-data" [
+                   ...
+                   { "code": 23 },
+                   { "code": 31 }
+               ]
+               "pools": [
+                   ...
+                   {
+                       ...
+                       "option-data": [
+                           ...
+                           { "code": 23 },
+                           { "code": 31 }
+                       ]
+                       "pool": "10.20.30.11-10.20.30.20"
+                   },
+                   {
+                       "pool": "10.20.30.21-10.20.30.30"
+                   }
+               ]
+           } ]
+       }
+   }
+
+The response to this command has the following structure:
+
+::
+
+   {
+       "result": 0,
+       "text": "IPv4 subnet updated",
+       "arguments": {
+           "subnet4": [
+               {
+                   "id": 123,
+                   "subnet": "10.20.30.0/24"
+               }
+           ]
+       }
+   }
+
+.. _command-subnet6-delta-del:
+
+The ``subnet6-delta-del`` Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This command is used to update (overwrite) parts of a single subnet in the
+existing server configuration. This operation has no impact on other subnets.
+The subnet identifier is used to identify the subnet to update; it must be
+specified and must be unique among all subnets. The subnet prefix should
+not be updated.
+
+The subnet information within this command has the same structure as the
+subnet information in the server configuration file, with the exception
+that static host reservations cannot be specified within
+``subnet6-delta-del``. The commands described in :ref:`hooks-host-cmds` should be used
+to update, remove, and modify static reservations.
+
+The command is flexible and can delete the part of the subnet by either
+specifying the entire object that needs to be deleted, or just the keys
+identifying the respective object. The address pools are identified by the
+'pool' parameter, the prefix pools are identified by the "prefix", "prefix-len"
+and "delegated-len" parameters, the options are identified by the 'name' or
+'code' and 'space' parameters. The 'space' parameter can be omitted if the
+option belongs to the default 'dhcp6' space.
+
+::
+
+   {
+       "command": "subnet6-delta-del",
+       "arguments": {
+           "subnet6": [ {
+               ...
+               "id": 234,
+               "subnet": "2001:db8:1::/64",
+               "option-data" [
+                   ...
+                   { "code": 23 },
+                   { "code": 31 }
+               ]
+               "pd-pools": [
+                   ...
+                   {
+                       ...
+                       "prefix": "2001:db8:3::",
+                       "prefix-len": 48,
+                       "delegated-len": 64,
+                       "option-data": [
+                           ...
+                           { "code": 23 },
+                           { "code": 31 }
+                       ]
+                   },
+                   {
+                       "prefix": "2001:db8:4::",
+                       "prefix-len": 48,
+                       "delegated-len": 64,
+                   }
+               ],
+               "pools": [
+                   ...
+                   {
+                       ...
+                       "option-data": [
+                           ...
+                           { "code": 23 },
+                           { "code": 31 }
+                       ]
+                       "pool": "2001:db8:1::11-2001:db8:1::20"
+                   },
+                   {
+                       "pool": "2001:db8:1::21-2001:db8:1::30"
+                   }
+               ]
+           } ]
+       }
+   }
+
+The response to this command has the following structure:
+
+::
+
+   {
+       "result": 0,
+       "text": "IPv6 subnet updated",
+       "arguments": {
+           "subnet6": [
+               {
+                   "id": 234,
+                   "subnet": "2001:db8:1::/64"
+               }
+           ]
+       }
+   }
+
 .. _command-network4-list:
 
 .. _command-network6-list:
@@ -596,8 +902,8 @@ An example response for ``network4-list`` looks as follows:
        "text": "2 IPv4 network(s) found"
    }
 
-``network6-list`` follows exactly the same syntax for both the query and
-the response.
+The ``network6-list`` command uses exactly the same syntax for both the
+command and the response.
 
 .. _command-network4-get:
 
@@ -868,8 +1174,8 @@ return a response similar to the following:
        "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor13'"
    }
 
-The ``network6-subnet-add`` command uses exactly the same syntax for
-both the command and the response.
+The ``network6-subnet-add`` command uses exactly the same syntax for both the
+command and the response.
 
 .. note::
 
@@ -919,5 +1225,5 @@ following:
        "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'"
    }
 
-The ``network6-subnet-del`` command uses exactly the same syntax for
-both the command and the response.
+The ``network6-subnet-del`` command uses exactly the same syntax for both the
+command and the response.
index 506e65c7450155b1e0ad8bd49c82c8fe4aa79b01..ce78e56bf0cd1735ad4a2c5e42c63be638d65b1a 100644 (file)
@@ -458,7 +458,7 @@ OptionDefinition::convertToBool(const std::string& value_str) const {
     // if it is not an integer wrapped in a string.
     int result;
     try {
-       result = boost::lexical_cast<int>(value_str);
+        result = boost::lexical_cast<int>(value_str);
 
     } catch (const boost::bad_lexical_cast&) {
         isc_throw(BadDataTypeCast, "unable to covert the value '"
index 19837d4f3de2163060d045c1b93d4c873734a18d..d309d09b2a587441f0a7a8ff2fdfc08d8cccabf0 100644 (file)
@@ -403,7 +403,7 @@ PoolParser::parse(PoolStoragePtr pools,
                 isc_throw(OutOfRange, "");
             }
             len = static_cast<uint8_t>(val_len);
-        } catch (...)  {
+        } catch (...) {
             isc_throw(DhcpConfigError, "Failed to parse pool "
                       "definition: " << txt << " ("
                       << text_pool->getPosition() << ")");
@@ -428,7 +428,7 @@ PoolParser::parse(PoolStoragePtr pools,
             try {
                 min = isc::asiolink::IOAddress(txt.substr(0, pos));
                 max = isc::asiolink::IOAddress(txt.substr(pos + 1));
-            } catch (...)  {
+            } catch (...) {
                 isc_throw(DhcpConfigError, "Failed to parse pool "
                           "definition: " << txt << " ("
                           << text_pool->getPosition() << ")");
@@ -503,7 +503,7 @@ PoolParser::parse(PoolStoragePtr pools,
 
 boost::shared_ptr<OptionDataListParser>
 PoolParser::createOptionDataListParser(const uint16_t address_family) const {
-    auto parser =  boost::make_shared<OptionDataListParser>(address_family);
+    auto parser = boost::make_shared<OptionDataListParser>(address_family);
     return (parser);
 }
 
@@ -622,7 +622,7 @@ SubnetConfigParser::createSubnet(ConstElementPtr params) {
         ConstElementPtr elem = params->get("subnet");
         isc_throw(BadValue,
                   "Invalid prefix length specified for subnet: " << len
-                  << " (" <<  elem->getPosition() << ")");
+                  << " (" << elem->getPosition() << ")");
     }
 
     // Call the subclass's method to instantiate the subnet
@@ -1573,7 +1573,7 @@ D2ClientConfigParser::parse(isc::data::ConstElementPtr client_config) {
                   "D2ClientConfig error: address family mismatch: "
                   << "server-ip: " << server_ip.toText()
                   << " is: " << (server_ip.isV4() ? "IPv4" : "IPv6")
-                  << " while sender-ip: "  << sender_ip.toText()
+                  << " while sender-ip: " << sender_ip.toText()
                   << " is: " << (sender_ip.isV4() ? "IPv4" : "IPv6")
                   << " (" << getPosition("sender-ip", client_config) << ")");
     }
@@ -1596,7 +1596,7 @@ D2ClientConfigParser::parse(isc::data::ConstElementPtr client_config) {
                                             max_queue_size,
                                             ncr_protocol,
                                             ncr_format));
-    }  catch (const std::exception& ex) {
+    } catch (const std::exception& ex) {
         isc_throw(DhcpConfigError, ex.what() << " ("
                   << client_config->getPosition() << ")");
     }
index b5c5053e2bd735a8f741864d043a81e4aeafe81e..b3a980e889a68c632f071a3386aae235404cc0dc 100644 (file)
@@ -973,12 +973,12 @@ protected:
     bool check_iface_;
 };
 
-/// @brief Parser for  D2ClientConfig
+/// @brief Parser for D2ClientConfig
 ///
 /// This class parses the configuration element "dhcp-ddns" common to the
 /// config files for both dhcp4 and dhcp6. It creates an instance of a
 /// D2ClientConfig.
-class D2ClientConfigParser : public  isc::data::SimpleParser {
+class D2ClientConfigParser : public isc::data::SimpleParser {
 public:
 
     /// @brief Parses a given dhcp-ddns element into D2ClientConfig.
index 3c4d470ba1aab890da4d8853985473ce90982aae..cc05aba4f2ac39cee04b4a05e2b52b22167edf1c 100644 (file)
@@ -175,11 +175,15 @@ api_files += $(top_srcdir)/src/share/api/statistic-sample-count-set.json
 api_files += $(top_srcdir)/src/share/api/status-get.json
 api_files += $(top_srcdir)/src/share/api/subnet4-add.json
 api_files += $(top_srcdir)/src/share/api/subnet4-del.json
+api_files += $(top_srcdir)/src/share/api/subnet4-delta-add.json
+api_files += $(top_srcdir)/src/share/api/subnet4-delta-del.json
 api_files += $(top_srcdir)/src/share/api/subnet4-get.json
 api_files += $(top_srcdir)/src/share/api/subnet4-list.json
 api_files += $(top_srcdir)/src/share/api/subnet4-update.json
 api_files += $(top_srcdir)/src/share/api/subnet6-add.json
 api_files += $(top_srcdir)/src/share/api/subnet6-del.json
+api_files += $(top_srcdir)/src/share/api/subnet6-delta-add.json
+api_files += $(top_srcdir)/src/share/api/subnet6-delta-del.json
 api_files += $(top_srcdir)/src/share/api/subnet6-get.json
 api_files += $(top_srcdir)/src/share/api/subnet6-list.json
 api_files += $(top_srcdir)/src/share/api/subnet6-update.json
index 11c34f403e7461e2a84fb2ef15d5a75a7365d623..a11feae7741fffd371417de2c7232213992146a7 100644 (file)
@@ -17,6 +17,7 @@
     "name": "network4-del",
     "resp-syntax": [
         "{",
+        "    \"command\": \"network4-del\",",
         "    \"arguments\": {",
         "        \"shared-networks\": [",
         "            {",
index 670317048e95733ea76b67c12a718178eecbb175..41f3844b4798c8d0364c84a39ffc56f8c5763897 100644 (file)
         "                {",
         "                    \"subnet\": \"192.0.2.0/24\",",
         "                    \"id\": 5,",
-        "                    // many other subnet-specific details here",
+        "                    // many other subnet specific details here",
         "                },",
         "                {",
         "                    \"subnet\": \"192.0.3.0/31\",",
         "                    \"id\": 6,",
-        "                    // many other subnet-specific details here",
+        "                    // many other subnet specific details here",
         "                }",
         "            ],",
         "            \"valid-lifetime\": 120",
index faadffcc02cd49c3b1348f36e1e3edcb1b285d87..aa74f758345219b4bf1c8ac3eef8f297cc32858e 100644 (file)
@@ -4,35 +4,32 @@
     "brief": [
         "This command adds a new shared network."
     ],
-    "cmd-comment": [
-        "The ``network6-add`` command uses the same syntax as ``network4-add`` for both the query and the response. However, there are some parameters that are IPv4-only (e.g. match-client-id) and some that are IPv6-only (e.g. interface-id)."
-    ],
     "cmd-syntax": [
         "{",
-        "    \"command\": \"network4-add\",",
+        "    \"command\": \"network6-add\",",
         "    \"arguments\": {",
         "        \"shared-networks\": [ {",
         "            \"name\": \"floor13\",",
-        "            \"subnet4\": [",
+        "            \"subnet6\": [",
         "            {",
         "                \"id\": 100,",
-        "                \"pools\": [ { \"pool\": \"192.0.2.2-192.0.2.99\" } ],",
-        "                \"subnet\": \"192.0.2.0/24\",",
+        "                \"pools\": [ { \"pool\": \"2003:db8:1::1-2003:db8:1::ff\" } ],",
+        "                \"subnet\": \"2003:db8:1::/64\",",
         "                \"option-data\": [",
         "                    {",
-        "                        \"name\": \"routers\",",
-        "                        \"data\": \"192.0.2.1\"",
+        "                        \"name\": \"dns-servers\",",
+        "                        \"data\": \"2005:db8:1::1\"",
         "                    }",
         "                ]",
         "            },",
         "            {",
         "                \"id\": 101,",
-        "                \"pools\": [ { \"pool\": \"192.0.3.2-192.0.3.99\" } ],",
-        "                \"subnet\": \"192.0.3.0/24\",",
+        "                \"pools\": [ { \"pool\": \"2003:db8:2::1-2003:db8:2::ff\" } ],",
+        "                \"subnet\": \"2003:db8:2::/64\",",
         "                \"option-data\": [",
         "                    {",
-        "                        \"name\": \"routers\",",
-        "                        \"data\": \"192.0.3.1\"",
+        "                        \"name\": \"dns-servers\",",
+        "                        \"data\": \"2006:db8:1::1\"",
         "                    }",
         "                ]",
         "            } ]",
@@ -49,7 +46,7 @@
         "        \"shared-networks\": [ { \"name\": \"floor13\" } ]",
         "    },",
         "    \"result\": 0,",
-        "    \"text\": \"A new IPv4 shared network 'floor13' added\"",
+        "    \"text\": \"A new IPv6 shared network 'floor13' added\"",
         "}"
     ],
     "support": [
index 244add23e2a7c4d2aecb4da78f2a353dfcf78987..12eae7a17e51bb675caa48fdc0ceaa8ea769b14d 100644 (file)
@@ -4,28 +4,29 @@
     "brief": [
         "This command deletes existing shared networks."
     ],
-    "cmd-comment": [
-        "The ``network6-del`` command uses exactly the same syntax as ``network4-del`` for",
-        "both the query and the response."
-    ],
     "cmd-syntax": [
         "{",
-        "    \"command\": \"network4-del\",",
+        "    \"command\": \"network6-del\",",
         "    \"arguments\": {",
         "        \"name\": \"floor13\"",
         "    }",
         "}"
     ],
-    "description": "See <xref linkend=\"command-network6-del\"/>",
+    "description": "See <xref linkend=\"idp76\"/>",
     "hook": "subnet_cmds",
     "name": "network6-del",
     "resp-syntax": [
         "{",
-        "    \"command\": \"network4-del\",",
+        "    \"command\": \"network6-del\",",
         "    \"arguments\": {",
-        "        \"name\": \"floor13\",",
-        "        \"subnets-action\": \"delete\"",
-        "    }",
+        "        \"shared-networks\": [",
+        "            {",
+        "                \"name\": \"floor13\"",
+        "            }",
+        "        ]",
+        "    },",
+        "    \"result\": 0,",
+        "    \"text\": \"IPv6 shared network 'floor13' deleted\"",
         "}"
     ],
     "support": [
index c24f0b519b7d522b1e4b0a246df272cf3621ee80..9dd727dccb836b79acf4342b57bfe02754d8869f 100644 (file)
@@ -2,7 +2,7 @@
     "access": "read",
     "avail": "1.3.0",
     "brief": [
-        "The network6-get command retrieves detailed information about shared networks, including subnets that are currently part of a given network."
+        "This command retrieves detailed information about shared networks, including subnets that are currently part of a given network."
     ],
     "cmd-syntax": [
         "{",
@@ -21,7 +21,7 @@
     "resp-syntax": [
         "{",
         "    \"result\": 0,",
-        "    \"text\": \"Info about IPv4 shared network 'floor13' returned\",",
+        "    \"text\": \"Info about IPv6 shared network 'floor13' returned\",",
         "    \"arguments\": {",
         "        \"shared-networks\": [",
         "        {",
         "            \"option-data\": [ ],",
         "            \"rebind-timer\": 90,",
         "            \"relay\": {",
-        "                \"ip-address\": \"0.0.0.0\"",
+        "                \"ip-address\": \"::\"",
         "            },",
         "            \"renew-timer\": 60,",
-        "            \"subnet4\": [",
+        "            \"subnet6\": [",
         "                {",
-        "                    \"subnet\": \"192.0.2.0/24\",",
+        "                    \"subnet\": \"2003:db8:1::/64\",",
         "                    \"id\": 5,",
         "                    // many other subnet specific details here",
         "                },",
         "                {",
-        "                    \"subnet\": \"192.0.3.0/31\",",
+        "                    \"subnet\": \"2003:db8:2::/71\",",
         "                    \"id\": 6,",
         "                    // many other subnet specific details here",
         "                }",
index 72c4cc36a2913ceba42cafd3e80469dbb519e662..98a64e27405601af0843b07ef33647be4f97a9e8 100644 (file)
@@ -4,12 +4,9 @@
     "brief": [
         "This command retrieves the full list of currently configured shared networks."
     ],
-    "cmd-comment": [
-        "The ``network6-list`` command uses exactly the same syntax as ``network4-list`` for both the query and the response."
-    ],
     "cmd-syntax": [
         "{",
-        "    \"command\": \"network4-list\"",
+        "    \"command\": \"network6-list\"",
         "}"
     ],
     "description": "See <xref linkend=\"command-network6-list\"/>",
@@ -24,7 +21,7 @@
         "        ]",
         "    },",
         "    \"result\": 0,",
-        "    \"text\": \"2 IPv4 network(s) found\"",
+        "    \"text\": \"2 IPv6 network(s) found\"",
         "}"
     ],
     "support": [
index 02635129a6622ba5088ffb3e2a0df052169cd986..09d9086b05823282a9a06ff77344dde3feef3730 100644 (file)
@@ -4,12 +4,9 @@
     "brief": [
         "This command adds existing subnets to existing shared networks."
     ],
-    "cmd-comment": [
-        "The ``network6-subnet-add`` command uses exactly the same syntax as ``network4-subnet-add`` for both the query and the response."
-    ],
     "cmd-syntax": [
         "{",
-        "    \"command\": \"network4-subnet-add\",",
+        "    \"command\": \"network6-subnet-add\",",
         "    \"arguments\": {",
         "        \"name\": \"floor13\",",
         "        \"id\": 5",
@@ -22,7 +19,7 @@
     "resp-syntax": [
         "{",
         "    \"result\": 0,",
-        "    \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'\"",
+        "    \"text\": \"IPv6 subnet 2003:db8::/64 (id 5) is now part of shared network 'floor1'\"",
         "}"
     ],
     "support": [
index 0a40c21f7a7bbf2bd5f4c8d2073d8067f49fa0a9..d766f891f2997d156477e1dfbe740d24f9ab7403 100644 (file)
@@ -4,12 +4,9 @@
     "brief": [
         "This command removes a subnet that is part of an existing shared network and demotes it to a plain, stand-alone subnet."
     ],
-    "cmd-comment": [
-        "The ``network6-subnet-del`` command uses exactly the same syntax as ``network4-subnet-del`` for both the query and the response."
-    ],
     "cmd-syntax": [
         "{",
-        "    \"command\": \"network4-subnet-del\",",
+        "    \"command\": \"network6-subnet-del\",",
         "    \"arguments\": {",
         "        \"name\": \"floor13\",",
         "        \"id\": 5",
@@ -22,7 +19,7 @@
     "resp-syntax": [
         "{",
         "    \"result\": 0,",
-        "    \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'\"",
+        "    \"text\": \"IPv6 subnet 2003:db8::/64 (id 5) is now removed from shared network 'floor13'\"",
         "}"
     ],
     "support": [
index 1ee9125909061b3985e90b3708dd6341ae411212..7b1ea8b0b54871b86920a4db9f9d8526cd9c90c6 100644 (file)
@@ -8,7 +8,7 @@
         "{",
         "    \"command\": \"subnet4-add\",",
         "    \"arguments\": {",
-        "        \"subnets\": [ {",
+        "        \"subnet4\": [ {",
         "            \"id\": 123,",
         "            \"subnet\": \"10.20.30.0/24\",",
         "            ...",
diff --git a/src/share/api/subnet4-delta-add.json b/src/share/api/subnet4-delta-add.json
new file mode 100644 (file)
index 0000000..fb66313
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "2.1.7",
+    "brief": [
+        "This command updates (adds or overwrites) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"subnet4-delta-add\",",
+        "    \"arguments\": {",
+        "        \"subnet4\": [ {",
+        "            \"id\": 123,",
+        "            \"subnet\": \"10.20.30.0/24\",",
+        "            ...",
+        "        } ]",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"idp69\"/>",
+    "hook": "subnet_cmds",
+    "name": "subnet4-delta-add",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"IPv4 subnet updated\",",
+        "    \"arguments\": {",
+        "        \"subnets\": [",
+        "            {",
+        "                \"id\": 123,",
+        "                \"subnet\": \"10.20.30.0/24\"",
+        "            }",
+        "        ]",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
diff --git a/src/share/api/subnet4-delta-del.json b/src/share/api/subnet4-delta-del.json
new file mode 100644 (file)
index 0000000..16c60d7
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "2.1.7",
+    "brief": [
+        "This command updates (removes) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"subnet4-delta-del\",",
+        "    \"arguments\": {",
+        "        \"subnet4\": [ {",
+        "            \"id\": 123,",
+        "            \"subnet\": \"10.20.30.0/24\",",
+        "            ...",
+        "        } ]",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"idp69\"/>",
+    "hook": "subnet_cmds",
+    "name": "subnet4-delta-del",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"IPv4 subnet updated\",",
+        "    \"arguments\": {",
+        "        \"subnets\": [",
+        "            {",
+        "                \"id\": 123,",
+        "                \"subnet\": \"10.20.30.0/24\"",
+        "            }",
+        "        ]",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp4"
+    ]
+}
index cb084f400bb2fa5e419d73d69df907ccb14392c6..f131b9e815cca99b29ace02b209c4c2783636144 100644 (file)
@@ -8,7 +8,7 @@
         "{",
         "    \"command\": \"subnet4-update\",",
         "    \"arguments\": {",
-        "        \"subnets\": [ {",
+        "        \"subnet4\": [ {",
         "            \"id\": 123,",
         "            \"subnet\": \"10.20.30.0/24\",",
         "            ...",
index 034c094bd731c848ccf1ee3067f85421cc3347e5..77418d55cd5d6b41ee27b5fc06eee944bdbf0392 100644 (file)
@@ -24,7 +24,7 @@
         "    \"result\": 0,",
         "    \"text\": \"IPv6 subnet added\",",
         "    \"arguments\": {",
-        "        \"subnet6\": [",
+        "        \"subnets\": [",
         "            {",
         "                \"id\": 234,",
         "                \"subnet\": \"2001:db8:1::/64\"",
diff --git a/src/share/api/subnet6-delta-add.json b/src/share/api/subnet6-delta-add.json
new file mode 100644 (file)
index 0000000..0b48c99
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "2.1.7",
+    "brief": [
+        "This command updates (adds or overwrites) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"subnet6-delta-add\",",
+        "    \"arguments\": {",
+        "        \"subnet6\": [ {",
+        "            \"id\": 234,",
+        "            \"subnet\": \"2001:db8:1::/64\",",
+        "            ...",
+        "        } ]",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"idp70\"/>",
+    "hook": "subnet_cmds",
+    "name": "subnet6-delta-add",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"IPv6 subnet updated\",",
+        "    \"arguments\": {",
+        "        \"subnets\": [",
+        "            {",
+        "                \"id\": 234,",
+        "                \"subnet\": \"2001:db8:1::/64\"",
+        "            }",
+        "        ]",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}
diff --git a/src/share/api/subnet6-delta-del.json b/src/share/api/subnet6-delta-del.json
new file mode 100644 (file)
index 0000000..39118bf
--- /dev/null
@@ -0,0 +1,39 @@
+{
+    "access": "write",
+    "avail": "2.1.7",
+    "brief": [
+        "This command updates (removes) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets."
+    ],
+    "cmd-syntax": [
+        "{",
+        "    \"command\": \"subnet6-delta-del\",",
+        "    \"arguments\": {",
+        "        \"subnet6\": [ {",
+        "            \"id\": 234,",
+        "            \"subnet\": \"2001:db8:1::/64\",",
+        "            ...",
+        "        } ]",
+        "    }",
+        "}"
+    ],
+    "description": "See <xref linkend=\"idp70\"/>",
+    "hook": "subnet_cmds",
+    "name": "subnet6-delta-del",
+    "resp-syntax": [
+        "{",
+        "    \"result\": 0,",
+        "    \"text\": \"IPv6 subnet updated\",",
+        "    \"arguments\": {",
+        "        \"subnets\": [",
+        "            {",
+        "                \"id\": 234,",
+        "                \"subnet\": \"2001:db8:1::/64\"",
+        "            }",
+        "        ]",
+        "    }",
+        "}"
+    ],
+    "support": [
+        "kea-dhcp6"
+    ]
+}
index e6dfd6912cbe5bf71d25b985c033093289242161..3d5725da989707dcdd165430e2c10dc421acf22a 100644 (file)
@@ -24,7 +24,7 @@
         "    \"result\": 0,",
         "    \"text\": \"IPv6 subnet updated\",",
         "    \"arguments\": {",
-        "        \"subnet6\": [",
+        "        \"subnets\": [",
         "            {",
         "                \"id\": 234,",
         "                \"subnet\": \"2001:db8:1::/64\"",