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-update``. The commands described in :ref:`hooks-host-cmds` should be used
-to update, remove, and modify static reservations.
+``subnet4-update``. The commands described in :ref:`hooks-host-cmds` should be
+used to update, remove, and modify static reservations.
::
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-update``. The commands described in :ref:`hooks-host-cmds` should be used
-to update, remove, and modify static reservations.
+``subnet6-update``. The commands described in :ref:`hooks-host-cmds` should be
+used to update, remove, and modify static reservations.
::
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.
+This command is used to update by adding or overwriting 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.
+``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": [ {
- ...
+ "valid-lifetime": 120,
"id": 123,
"subnet": "10.20.30.0/24",
"option-data": [
- ...
+ {
+ "always-send": false,
+ "code": 3,
+ "csv-format": true,
+ "data": "192.0.3.1",
+ "name": "routers",
+ "space": "dhcp4"
+ }
],
"pools": [
- ...
{
- ...
"pool": "10.20.30.1-10.20.30.10",
"option-data": [
- ...
+ {
+ "always-send": false,
+ "code": 4,
+ "csv-format": true,
+ "data": "192.0.4.1",
+ "name": "time-servers",
+ "space": "dhcp4"
+ }
]
}
]
}
}
+The command updates subnet "10.20.30.0/24" with id 123 by changing the valid
+lifetime, adding or changing the subnet level option 3 ("routers"), by adding
+or changing the pool "10.20.30.1-10.20.30.10" and by adding or changing the pool
+level option 4 ("time-servers").
+
.. _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.
+This command is used to update by adding or overwriting 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.
+``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": [ {
- ...
+ "valid-lifetime": 120,
"id": 243,
"subnet": "2001:db8:1::/64",
"option-data": [
- ...
+ {
+ "always-send": false,
+ "code": 23,
+ "csv-format": true,
+ "data": "3000::3:1",
+ "name": "dns-servers",
+ "space": "dhcp6"
+ }
],
"pd-pools": [
- ...
{
- ...
"prefix": "2001:db8:2::",
"prefix-len": 48,
"delegated-len": 64,
"option-data": [
- ...
+ {
+ "always-send": false,
+ "code": 22,
+ "csv-format": true,
+ "data": "3000::4:1",
+ "name": "sip-server-addr",
+ "space": "dhcp6"
+ }
]
}
],
"pools": [
- ...
{
- ...
"pool": "2001:db8:1::1-2001:db8:1::10",
"option-data": [
- ...
+ {
+ "always-send": false,
+ "code": 31,
+ "csv-format": true,
+ "data": "3000::5:1",
+ "name": "sntp-servers",
+ "space": "dhcp6"
+ }
]
}
]
}
}
+The command updates subnet "2001:db8:1::/64" with id 243 by changing the valid
+lifetime, adding or changing the subnet level option 23 ("dns-servers"), by
+adding or changing the pool "2001:db8:1::1-2001:db8:1::10", by adding or
+changing the pool level option 31 ("sntp-servers"), by adding or changing the
+pd-pool "2001:db8:2::" with prefix-len 48 and by adding or changing the pd-pool
+level option 22 ("sip-server-addr").
+
.. _command-subnet4-delta-del:
The ``subnet4-delta-del`` Command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This command is used to update (overwrite) parts of a single subnet in the
+This command is used to update by removing 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.
+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.
+``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
"command": "subnet4-delta-del",
"arguments": {
"subnet4": [ {
- ...
+ "valid-lifetime": 120,
"id": 123,
"subnet": "10.20.30.0/24",
"option-data" [
- ...
- { "code": 23 },
- { "code": 31 }
+ { "name": "routers" }
]
"pools": [
- ...
{
- ...
"option-data": [
- ...
- { "code": 23 },
- { "code": 31 }
+ { "code": 4 }
]
"pool": "10.20.30.11-10.20.30.20"
},
}
}
+The command updates subnet "10.20.30.0/24" with id 123 by removing the valid
+lifetime, removing the subnet level option 3 ("routers"), by removing the pool
+"10.20.30.21-10.20.30.30" and by removing the pool level option 4
+("time-servers") in pool "10.20.30.11-10.20.30.20".
+
.. _command-subnet6-delta-del:
The ``subnet6-delta-del`` Command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This command is used to update (overwrite) parts of a single subnet in the
+This command is used to update by removing 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.
+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.
+``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
"command": "subnet6-delta-del",
"arguments": {
"subnet6": [ {
- ...
+ "valid-lifetime": 120,
"id": 234,
"subnet": "2001:db8:1::/64",
"option-data" [
- ...
- { "code": 23 },
- { "code": 31 }
+ { "name": "dns-servers" }
]
"pd-pools": [
- ...
{
- ...
"prefix": "2001:db8:3::",
"prefix-len": 48,
"delegated-len": 64,
"option-data": [
- ...
- { "code": 23 },
- { "code": 31 }
+ { "code": 22 }
]
},
{
}
],
"pools": [
- ...
{
- ...
"option-data": [
- ...
- { "code": 23 },
{ "code": 31 }
]
"pool": "2001:db8:1::11-2001:db8:1::20"
}
}
+The command updates subnet "2001:db8:1::/64" with id 243 by removing the valid
+lifetime, removing the subnet level option 23 ("dns-servers"), by removing the
+pool "2001:db8:1::21-2001:db8:1::30", by removing the pool level option 31
+("sntp-servers") in pool "2001:db8:1::11-2001:db8:1::20", by removing the
+pd-pool "2001:db8:4::" with prefix-len 48, by removing the pd-pool level option
+22 ("sip-server-addr") in pd-pool "2001:db8:3::" with prefix-len 48.
+
.. _command-network4-list:
.. _command-network6-list:
/// Raises a TypeError if a or b are not MapElements
ConstElementPtr removeIdentical(ConstElementPtr a, ConstElementPtr b);
-/// @brief Merges the data from other into element.
-/// (on the first level). Both elements must be
-/// MapElements.
-/// Every string,value pair in other is copied into element
-/// (the ElementPtr of value is copied, this is not a new object)
-/// Unless the value is a NullElement, in which case the
-/// key is removed from element, rather than setting the value to
-/// the given NullElement.
-/// This way, we can remove values from for instance maps with
-/// configuration data (which would then result in reverting back
-/// to the default).
+/// @brief Merges the data from other into element. (on the first level). Both
+/// elements must be MapElements. Every string, value pair in other is copied
+/// into element (the ElementPtr of value is copied, this is not a new object)
+/// Unless the value is a NullElement, in which case the key is removed from
+/// element, rather than setting the value to the given NullElement.
+/// This way, we can remove values from for instance maps with configuration
+/// data (which would then result in reverting back to the default).
/// Raises a TypeError if either ElementPtr is not a MapElement
void merge(ElementPtr element, ConstElementPtr other);
typedef std::map<std::string, HierarchyTraversalTest> FunctionMap;
/// @brief Hierarchy descriptor of the containers in a specific Element
-/// hierarchy tree. The position inside the vector indicates the level on which
+/// hierarchy tree. The position inside the vector indicates the level at which
/// the respective containers are located.
///
/// e.g.
typedef std::vector<FunctionMap> HierarchyDescriptor;
/// @brief Merges the diff data by adding the missing elements from 'other'
-/// to 'element' (recursively). Both elements must be same Element type.
+/// to 'element' (recursively). Both elements must be the same Element type.
/// Raises a TypeError if elements are not the same Element type.
/// @note
/// for non map and list elements the values are updated with the new values
HierarchyDescriptor& hierarchy, std::string key,
size_t idx = 0);
-/// @brief Merges the diff data by removing the existing elements from 'other'
-/// to 'element' (recursively). Both elements must be same Element type.
+/// @brief Merges the diff data by removing the data present in 'other' from
+/// 'element' (recursively). Both elements must be the same Element type.
/// Raises a TypeError if elements are not the same Element type.
/// for non map and list elements the values are set to NullElement
/// for maps:
/// @brief Extends data by adding the specified 'extension' elements from
/// 'other' inside the 'container' element (recursively). Both elements must be
-/// same Element type.
+/// the same Element type.
/// Raises a TypeError if elements are not the same Element type.
///
/// @param container The container holding the data that must be extended.