// Enumeration specifying server's mode of operation when it
// fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// List of client classes which must be evaluated when this shared
// network is selected for client assignments.
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// Subnet level compute T1 and T2 timers.
"calculate-tee-times": true,
},
// Fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// Global compute T1 and T2 timers.
"calculate-tee-times": true,
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// List of client classes which must be evaluated when this shared
// network is selected for client assignments.
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// Subnet level compute T1 and T2 timers.
"calculate-tee-times": true,
},
// Fetches host reservations.
- // It is deprecated by the "reservation-modes" map.
+ // It is deprecated by the "reservations-out-of-pool",
+ // reservations-in-subnet and reservations-global parameters.
// "reservation-mode": "all",
- // Reservation modes specifying server's mode of operation when it
- // fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
// Data directory.
"data-directory": "/tmp",
}
Since Kea 1.9.1, the ``reservation-mode`` is deprecated by the
-``reservation-modes`` map.
-The map contains ``global``, ``in-subnet`` and ``out-of-pool`` boolean flags.
+``reservations-out-of-pool``, ``reservations-in-subnet`` and
+``reservations-global`` flags.
The flags can be activated independently and can produce various combinations,
some of them being unsuported by the deprecated ``reservation-mode``.
"Dhcp4": {
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": false
- }
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
+ ...
}
``global``:
"Dhcp4": {
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- }
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
+ ...
}
``out-of-pool``:
"Dhcp4": {
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": true
- }
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": true,
+ ...
}
``all``:
"Dhcp4": {
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- }
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true,
+ ...
}
To activate both ``global`` and ``all``, the following combination can be used:
"Dhcp4": {
- "reservation-modes": {
- "global": true,
- "in-subnet": true,
- "out-of-pool": true
- }
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true,
+ ...
}
The parameter can be specified at global, subnet, and shared-network
"subnet4": [
{
"subnet": "192.0.2.0/24",
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": false
- },
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
...
}
]
"Dhcp4": {
-
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
"reservations": [
{
"hw-address": "01:bb:cc:dd:ee:ff",
"valid-lifetime": 600,
"subnet4": [ {
"subnet": "10.0.0.0/24",
- # It is deprecated by the "reservation-modes" map.
+ # It is deprecated by the "reservations-out-of-pool",
+ # reservations-in-subnet and reservations-global parameters.
# "reservation-mode": "global",
- # Reservation modes specifying server's mode of operation when it
- # fetches host reservations.
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ # Specify if server should lookup global reservations.
+ "reservations-global": true,
+ # Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+ # Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": false,
"pools": [ { "pool": "10.0.0.10-10.0.0.100" } ]
} ]
}
"hw-address": "aa:bb:cc:dd:ee:fe",
"client-classes": [ "reserved_class" ]
}],
- # It is deprecated by the "reservation-modes" map.
+ # It is deprecated by the "reservations-out-of-pool",
+ # reservations-in-subnet and reservations-global parameters.
# "reservation-mode": "global",
- # Reservation modes specifying server's mode of operation when it
- # fetches host reservations.
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ # Specify if server should lookup global reservations.
+ "reservations-global": true,
+ # Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+ # Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": false,
"shared-networks": [{
"subnet4": [
{
a reservation for the ``reserved_class`` will be assigned an address from
the subnet 192.0.2.0/24. The subnets must belong to the same shared network.
In addition, the reservation for the client class must be specified at the
-global scope (global reservation) and the ``reservation-modes`` must
-set ``global`` to true.
+global scope (global reservation) and the ``reservations-global`` must be
+set to true.
In the example above the ``client-class`` could also be specified at the
subnet level rather than pool level yielding the same effect.
+-----------------------------+----------------------------+-------------+-------------+-------------+
| reservation-mode | yes | yes | yes | n/a |
+-----------------------------+----------------------------+-------------+-------------+-------------+
- | reservation-modes | yes | yes | yes | n/a |
+ | reservations-out-of-pool | yes | yes | yes | n/a |
+ +-----------------------------+----------------------------+-------------+-------------+-------------+
+ | reservations-in-subnet | yes | yes | yes | n/a |
+ +-----------------------------+----------------------------+-------------+-------------+-------------+
+ | reservations-global | yes | yes | yes | n/a |
+-----------------------------+----------------------------+-------------+-------------+-------------+
| t1-percent | yes | yes | yes | n/a |
+-----------------------------+----------------------------+-------------+-------------+-------------+
}
Since Kea 1.9.1, the ``reservation-mode`` is deprecated by the
-``reservation-modes`` map.
-The map contains ``global``, ``in-subnet`` and ``out-of-pool`` boolean flags.
+``reservations-out-of-pool``, ``reservations-in-subnet`` and
+``reservations-global`` flags.
The flags can be activated independently and can produce various combinations,
some of them being unsuported by the deprecated ``reservation-mode``.
"Dhcp6": {
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": false
- }
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
+ ...
}
``global``:
"Dhcp6": {
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- }
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
+ ...
}
``out-of-pool``:
"Dhcp6": {
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": true
- }
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": true,
+ ...
}
``all``:
"Dhcp6": {
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- }
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true,
+ ...
}
To activate both ``global`` and ``all``, the following combination can be used:
"Dhcp6": {
- "reservation-modes": {
- "global": true,
- "in-subnet": true,
- "out-of-pool": true
- }
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true,
+ ...
}
The parameter can be specified at global, subnet, and shared-network
"subnet6": [
{
"subnet": "2001:db8:1::/64",
- "reservation-modes": {
- "global": false,
- "in-subnet": false,
- "out-of-pool": false
- },
+ "reservations-global": false,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
...
}
]
"Dhcp6": {
-
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations-out-of-pool": false,
"reservations": [
{
"duid": "00:03:00:01:11:22:33:44:55:66",
"valid-lifetime": 600,
"subnet4": [ {
"subnet": "2001:db8:1::/64",
- # It is deprecated by the "reservation-modes" map.
+ # It is deprecated by the "reservations-out-of-pool",
+ # reservations-in-subnet and reservations-global parameters.
# "reservation-mode": "global",
- # Reservation modes specifying server's mode of operation when it
- # fetches host reservations.
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ # Specify if server should lookup global reservations.
+ "reservations-global": true,
+ # Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+ # Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": false,
"pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
} ]
}
"hw-address": "aa:bb:cc:dd:ee:fe",
"client-classes": [ "reserved_class" ]
}],
- # It is deprecated by the "reservation-modes" map.
+ # It is deprecated by the "reservations-out-of-pool",
+ # reservations-in-subnet and reservations-global parameters.
# "reservation-mode": "global",
- # Reservation modes specifying server's mode of operation when it
- # fetches host reservations.
- "reservation-modes": {
- "global": true,
- "in-subnet": false,
- "out-of-pool": false
- },
+ # Specify if server should lookup global reservations.
+ "reservations-global": true,
+ # Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+ # Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": false,
"shared-networks": [{
"subnet6": [
{
a reservation for the ``reserved_class`` will be assigned an address from
the subnet 2001:db8:1::/64. The subnets must belong to the same shared network.
In addition, the reservation for the client class must be specified at the
-global scope (global reservation) and the ``reservation-modes`` must
-set ``global`` to true.
+global scope (global reservation) and the ``reservations-global`` must be
+set to true.
In the example above the ``client-class`` could also be specified at the
subnet level rather than pool level yielding the same effect.
+-----------------------------+----------------------------+-----------+-----------+-----------+------------+
| reservation-mode | yes | yes | yes | n/a | n/a |
+-----------------------------+----------------------------+-----------+-----------+-----------+------------+
- | reservation-modes | yes | yes | yes | n/a | n/a |
+ | reservations-out-of-pool | yes | yes | yes | n/a | n/a |
+ +-----------------------------+----------------------------+-----------+-----------+-----------+------------+
+ | reservations-in-subnet | yes | yes | yes | n/a | n/a |
+ +-----------------------------+----------------------------+-----------+-----------+-----------+------------+
+ | reservations-global | yes | yes | yes | n/a | n/a |
+-----------------------------+----------------------------+-----------+-----------+-----------+------------+
| t1-percent | yes | yes | yes | n/a | n/a |
+-----------------------------+----------------------------+-----------+-----------+-----------+------------+
"ip-address": "0.0.0.0"
},
"renew-timer": 60,
- # It is deprecated by the "reservation-modes" map.
+ # It is deprecated by the "reservations-out-of-pool",
+ # reservations-in-subnet and reservations-global parameters.
# "reservation-mode": "all",
- # Reservation modes specifying server's mode of operation when it
- # fetches host reservations.
- "reservation-modes": {
- "global": false,
- "in-subnet": true,
- "out-of-pool": true
- },
+ # Specify if server should lookup global reservations.
+ "reservations-global": false,
+ # Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+ # Specify if server should lookup out-of-pool reservations.
+ "reservations-out-of-pool": true,
"subnet4": [
{
"subnet": "192.0.2.0/24",
return isc::dhcp::Dhcp4Parser::make_SUB_HOOKS_LIBRARY(driver.loc_);
case Parser4Context::PARSER_DHCP_DDNS:
return isc::dhcp::Dhcp4Parser::make_SUB_DHCP_DDNS(driver.loc_);
- case Parser4Context::PARSER_RESERVATION_MODES:
- return isc::dhcp::Dhcp4Parser::make_SUB_RESERVATION_MODES(driver.loc_);
case Parser4Context::PARSER_CONFIG_CONTROL:
return isc::dhcp::Dhcp4Parser::make_SUB_CONFIG_CONTROL(driver.loc_);
}
}
}
-\"reservation-modes\" {
+\"reservations-out-of-pool\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
case isc::dhcp::Parser4Context::SUBNET4:
case isc::dhcp::Parser4Context::SHARED_NETWORK:
- return isc::dhcp::Dhcp4Parser::make_RESERVATION_MODES(driver.loc_);
+ return isc::dhcp::Dhcp4Parser::make_RESERVATIONS_OUT_OF_POOL(driver.loc_);
default:
- return isc::dhcp::Dhcp4Parser::make_STRING("reservation-modes", driver.loc_);
+ return isc::dhcp::Dhcp4Parser::make_STRING("reservations-out-of-pool", driver.loc_);
+ }
+}
+
+\"reservations-in-subnet\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::DHCP4:
+ case isc::dhcp::Parser4Context::SUBNET4:
+ case isc::dhcp::Parser4Context::SHARED_NETWORK:
+ return isc::dhcp::Dhcp4Parser::make_RESERVATIONS_IN_SUBNET(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("reservations-in-subnet", driver.loc_);
+ }
+}
+
+\"reservations-global\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::DHCP4:
+ case isc::dhcp::Parser4Context::SUBNET4:
+ case isc::dhcp::Parser4Context::SHARED_NETWORK:
+ return isc::dhcp::Dhcp4Parser::make_RESERVATIONS_GLOBAL(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("reservations-global", driver.loc_);
}
}
\"out-of-pool\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RESERVATION_MODE:
- case isc::dhcp::Parser4Context::RESERVATION_MODES:
return isc::dhcp::Dhcp4Parser::make_OUT_OF_POOL(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("out-of-pool", driver.loc_);
\"global\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::RESERVATION_MODE:
- case isc::dhcp::Parser4Context::RESERVATION_MODES:
return isc::dhcp::Dhcp4Parser::make_GLOBAL(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("global", driver.loc_);
}
}
-\"in-subnet\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser4Context::RESERVATION_MODES:
- return isc::dhcp::Dhcp4Parser::make_IN_SUBNET(driver.loc_);
- default:
- return isc::dhcp::Dhcp4Parser::make_STRING("in-subnet", driver.loc_);
- }
-}
-
\"code\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OPTION_DEF:
INTERFACE "interface"
ID "id"
RESERVATION_MODE "reservation-mode"
- RESERVATION_MODES "reservation-modes"
+ RESERVATIONS_OUT_OF_POOL "reservations-out-of-pool"
+ RESERVATIONS_IN_SUBNET "reservations-in-subnet"
+ RESERVATIONS_GLOBAL "reservations-global"
DISABLED "disabled"
OUT_OF_POOL "out-of-pool"
- IN_SUBNET "in-subnet"
GLOBAL "global"
ALL "all"
SUB_OPTION_DATA
SUB_HOOKS_LIBRARY
SUB_DHCP_DDNS
- SUB_RESERVATION_MODES
SUB_CONFIG_CONTROL
;
| SUB_OPTION_DATA { ctx.ctx_ = ctx.OPTION_DATA; } sub_option_data
| SUB_HOOKS_LIBRARY { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } sub_hooks_library
| SUB_DHCP_DDNS { ctx.ctx_ = ctx.DHCP_DDNS; } sub_dhcp_ddns
- | SUB_RESERVATION_MODES { ctx.ctx_ = ctx.RESERVATION_MODES; } sub_reservation_modes
| SUB_CONFIG_CONTROL { ctx.ctx_ = ctx.CONFIG_CONTROL; } sub_config_control
;
| config_control
| server_tag
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| calculate_tee_times
| t1_percent
| t2_percent
};
host_reservation_identifiers_list: host_reservation_identifier
- | host_reservation_identifiers_list COMMA host_reservation_identifier
- ;
+ | host_reservation_identifiers_list COMMA host_reservation_identifier
+ ;
host_reservation_identifier: duid_id
| hw_address_id
| flex_id
;
-duid_id : DUID {
+duid_id: DUID {
ElementPtr duid(new StringElement("duid", ctx.loc2pos(@1)));
ctx.stack_.back()->add(duid);
};
-hw_address_id : HW_ADDRESS {
+hw_address_id: HW_ADDRESS {
ElementPtr hwaddr(new StringElement("hw-address", ctx.loc2pos(@1)));
ctx.stack_.back()->add(hwaddr);
};
-circuit_id : CIRCUIT_ID {
+circuit_id: CIRCUIT_ID {
ElementPtr circuit(new StringElement("circuit-id", ctx.loc2pos(@1)));
ctx.stack_.back()->add(circuit);
};
-client_id : CLIENT_ID {
+client_id: CLIENT_ID {
ElementPtr client(new StringElement("client-id", ctx.loc2pos(@1)));
ctx.stack_.back()->add(client);
};
;
not_empty_hooks_libraries_list: hooks_library
- | not_empty_hooks_libraries_list COMMA hooks_library
- ;
+ | not_empty_hooks_libraries_list COMMA hooks_library
+ ;
hooks_library: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
| require_client_classes
| reservations
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| relay
| match_client_id
| authoritative
ctx.leave();
};
-reservation_modes: RESERVATION_MODES {
- ctx.unique("reservation-modes", ctx.loc2pos(@1));
- ElementPtr m(new MapElement(ctx.loc2pos(@1)));
- ctx.stack_.back()->set("reservation-modes", m);
- ctx.stack_.push_back(m);
- ctx.enter(ctx.RESERVATION_MODES);
-} COLON LCURLY_BRACKET reservation_modes_params RCURLY_BRACKET {
- ctx.stack_.pop_back();
- ctx.leave();
-};
-
-sub_reservation_modes: LCURLY_BRACKET {
- // Parse the reservation-modes map
- ElementPtr m(new MapElement(ctx.loc2pos(@1)));
- ctx.stack_.push_back(m);
-} reservation_modes_params RCURLY_BRACKET {
- // No reservation_modes params are required
- // parsing completed
-};
-
-reservation_modes_params: reservation_modes_param
- | reservation_modes_params COMMA reservation_modes_param
- ;
-
-reservation_modes_param: hr_global
- | hr_in_subnet
- | hr_out_of_pool
- ;
-
-hr_global: GLOBAL COLON BOOLEAN {
- ctx.unique("global", ctx.loc2pos(@1));
+reservations_out_of_pool: RESERVATIONS_OUT_OF_POOL COLON BOOLEAN {
+ ctx.unique("reservations-out-of-pool", ctx.loc2pos(@1));
ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("global", b);
+ ctx.stack_.back()->set("reservations-out-of-pool", b);
};
-hr_in_subnet: IN_SUBNET COLON BOOLEAN {
- ctx.unique("in-subnet", ctx.loc2pos(@1));
+reservations_in_subnet: RESERVATIONS_IN_SUBNET COLON BOOLEAN {
+ ctx.unique("reservations-in-subnet", ctx.loc2pos(@1));
ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("in-subnet", b);
+ ctx.stack_.back()->set("reservations-in-subnet", b);
};
-hr_out_of_pool: OUT_OF_POOL COLON BOOLEAN {
- ctx.unique("out-of-pool", ctx.loc2pos(@1));
+reservations_global: RESERVATIONS_GLOBAL COLON BOOLEAN {
+ ctx.unique("reservations-global", ctx.loc2pos(@1));
ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("out-of-pool", b);
+ ctx.stack_.back()->set("reservations-global", b);
};
reservation_mode: RESERVATION_MODE {
| boot_file_name
| relay
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| client_class
| require_client_classes
| valid_lifetime
// Those parameters can either be a single parameter or
// a list of parameters separated by comma.
not_empty_option_data_params: option_data_param
- | not_empty_option_data_params COMMA option_data_param
- ;
+ | not_empty_option_data_params COMMA option_data_param
+ ;
// Each single option-data parameter can be one of the following
// expressions.
;
not_empty_reservation_params: reservation_param
- | not_empty_reservation_params COMMA reservation_param
- ;
+ | not_empty_reservation_params COMMA reservation_param
+ ;
/// @todo probably need to add mac-address as well here
reservation_param: duid
;
not_empty_client_class_params: client_class_param
- | not_empty_client_class_params COMMA client_class_param
- ;
+ | not_empty_client_class_params COMMA client_class_param
+ ;
client_class_param: client_class_name
| client_class_test
ConstElementPtr reservation_mode = mutable_cfg->get("reservation-mode");
if (reservation_mode) {
// log warning for deprecated option
- reservation_mode = mutable_cfg->get("reservation-modes");
+ bool found = false;
+ reservation_mode = mutable_cfg->get("reservations-out-of-pool");
if (reservation_mode) {
+ found = true;
+ }
+ reservation_mode = mutable_cfg->get("reservations-in-subnet");
+ if (reservation_mode) {
+ found = true;
+ }
+ reservation_mode = mutable_cfg->get("reservations-global");
+ if (reservation_mode) {
+ found = true;
+ }
+ if (found) {
isc_throw(DhcpConfigError, "invalid use of both 'reservation-mode'"
- " and 'reservation-modes' parameters");
+ " and one of 'reservations-out-of-pool'"
+ " , 'reservations-in-subnet' or"
+ " 'reservations-global' parameters");
}
}
(config_pair.first == "boot-file-name") ||
(config_pair.first == "server-tag") ||
(config_pair.first == "reservation-mode") ||
- (config_pair.first == "reservation-modes") ||
+ (config_pair.first == "reservations-out-of-pool") ||
+ (config_pair.first == "reservations-in-subnet") ||
+ (config_pair.first == "reservations-global") ||
(config_pair.first == "calculate-tee-times") ||
(config_pair.first == "t1-percent") ||
(config_pair.first == "t2-percent") ||
"\"subnet4\": [ { "
" \"pools\": [ { \"pool\": \"192.0.1.0/24\" } ],"
" \"subnet\": \"192.0.1.0/24\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true"
" },"
" {"
" \"pools\": [ { \"pool\": \"192.0.2.0/24\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
- " \"reservation-modes\": {"
- " \"out-of-pool\": true"
+ " \"reservations-out-of-pool\": true"
" }"
" },"
" {"
" \"pools\": [ { \"pool\": \"192.0.3.0/24\" } ],"
" \"subnet\": \"192.0.3.0/24\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": false,"
- " \"out-of-pool\": false,"
- " \"global\": false"
+ " \"reservations-out-of-pool\": false,"
+ " \"reservations-in-subnet\": false,"
+ " \"reservations-global\": false"
" }"
" },"
" {"
" \"pools\": [ { \"pool\": \"192.0.4.0/24\" } ],"
" \"subnet\": \"192.0.4.0/24\", "
- " \"reservation-modes\": {"
- " \"global\": true"
+ " \"reservations-global\": true"
" }"
" },"
" {"
" {"
" \"pools\": [ { \"pool\": \"192.0.6.0/24\" } ],"
" \"subnet\": \"192.0.6.0/24\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true,"
- " \"global\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-global\": true"
" } ],"
"\"valid-lifetime\": 4000 }";
"{ "
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
- "\"reservation-modes\": {"
- " \"out-of-pool\": true"
- " },"
+ "\"reservations-out-of-pool\": true,"
"\"subnet4\": [ { "
" \"pools\": [ { \"pool\": \"192.0.2.0/24\" } ],"
" \"subnet\": \"192.0.2.0/24\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true"
" },"
" {"
" \"pools\": [ { \"pool\": \"192.0.3.0/24\" } ],"
" \"relay\": {\n"
" \"ip-address\": \"5.6.7.8\"\n"
" },\n"
- " \"reservation-modes\": {"
- " \"out-of-pool\": true"
- " },\n"
+ " \"reservations-out-of-pool\": true,"
" \"renew-timer\": 10,\n"
" \"rebind-timer\": 20,\n"
" \"valid-lifetime\": 40,\n"
" \"relay\": {\n"
" \"ip-address\": \"55.66.77.88\"\n"
" },\n"
- " \"reservation-modes\": {"
- " \"global\": false"
- " }"
+ " \"reservations-global\": false"
" }\n"
" ]\n"
" },\n"
"\"valid-lifetime\": 600,\n"
"\"subnet4\": [ { \n"
" \"subnet\": \"10.0.0.0/24\", \n"
- " \"reservation-modes\": { \"global\": true },"
+ " \"reservations-global\": true,\n"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]\n"
"} ]\n"
"}\n"
" \"id\": 20,"
" \"pools\": [ { \"pool\": \"192.0.2.10-192.0.2.63\" } ],\n"
" \"interface\": \"eth1\",\n"
- " \"reservation-modes\": { \"global\": true },"
+ " \"reservations-global\": true,\n"
" \"reservations\": [ \n"
" {\n"
" \"hw-address\": \"aa:bb:cc:dd:ee:ff\",\n"
" \"id\": 10,"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ],\n"
" \"interface\": \"eth0\",\n"
- " \"reservation-modes\": { \"out-of-pool\": true },"
+ " \"reservations-out-of-pool\": true,\n"
" \"reservations\": [ \n"
" {\n"
" \"hw-address\": \"aa:bb:cc:dd:ee:ff\",\n"
" \"id\": 10,"
" \"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ],\n"
" \"interface\": \"eth0\",\n"
- " \"reservation-modes\": { \"in-subnet\": true, \"out-of-pool\": true },"
+ " \"reservations-out-of-pool\": true,\n"
+ " \"reservations-in-subnet\": true,\n"
" \"reservations\": [ \n"
" {\n"
" \"hw-address\": \"aa:bb:cc:dd:ee:ff\",\n"
" \"test\": \"not member('reserved_class')\""
"}"
"],\n"
- "\"reservation-modes\": { \"global\": true },"
+ "\"reservations-global\": true,\n"
"\"valid-lifetime\": 600,\n"
"\"reservations\": [ \n"
"{\n"
" \"test\": \"not member('reserved_class')\""
"}"
"],\n"
- "\"reservation-modes\": { \"global\": true },"
+ "\"reservations-global\": true,\n"
"\"valid-lifetime\": 600,\n"
"\"reservations\": [ \n"
"{\n"
return isc::dhcp::Dhcp6Parser::make_SUB_HOOKS_LIBRARY(driver.loc_);
case Parser6Context::PARSER_DHCP_DDNS:
return isc::dhcp::Dhcp6Parser::make_SUB_DHCP_DDNS(driver.loc_);
- case Parser6Context::PARSER_RESERVATION_MODES:
- return isc::dhcp::Dhcp6Parser::make_SUB_RESERVATION_MODES(driver.loc_);
case Parser6Context::PARSER_CONFIG_CONTROL:
return isc::dhcp::Dhcp6Parser::make_SUB_CONFIG_CONTROL(driver.loc_);
}
return isc::dhcp::Dhcp6Parser::make_STRING(tmp, driver.loc_);
}
-\"Dhcp6\" {
+\"Dhcp6\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::CONFIG:
return isc::dhcp::Dhcp6Parser::make_DHCP6(driver.loc_);
}
}
-\"reservation-modes\" {
+\"reservations-out-of-pool\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
case isc::dhcp::Parser6Context::SUBNET6:
case isc::dhcp::Parser6Context::SHARED_NETWORK:
- return isc::dhcp::Dhcp6Parser::make_RESERVATION_MODES(driver.loc_);
+ return isc::dhcp::Dhcp6Parser::make_RESERVATIONS_OUT_OF_POOL(driver.loc_);
default:
- return isc::dhcp::Dhcp6Parser::make_STRING("reservation-modes", driver.loc_);
+ return isc::dhcp::Dhcp6Parser::make_STRING("reservations-out-of-pool", driver.loc_);
+ }
+}
+
+\"reservations-in-subnet\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::DHCP6:
+ case isc::dhcp::Parser6Context::SUBNET6:
+ case isc::dhcp::Parser6Context::SHARED_NETWORK:
+ return isc::dhcp::Dhcp6Parser::make_RESERVATIONS_IN_SUBNET(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("reservations-in-subnet", driver.loc_);
+ }
+}
+
+\"reservations-global\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::DHCP6:
+ case isc::dhcp::Parser6Context::SUBNET6:
+ case isc::dhcp::Parser6Context::SHARED_NETWORK:
+ return isc::dhcp::Dhcp6Parser::make_RESERVATIONS_GLOBAL(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("reservations-global", driver.loc_);
}
}
\"out-of-pool\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATION_MODE:
- case isc::dhcp::Parser6Context::RESERVATION_MODES:
return isc::dhcp::Dhcp6Parser::make_OUT_OF_POOL(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("out-of-pool", driver.loc_);
\"global\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::RESERVATION_MODE:
- case isc::dhcp::Parser6Context::RESERVATION_MODES:
return isc::dhcp::Dhcp6Parser::make_GLOBAL(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("global", driver.loc_);
}
}
-\"in-subnet\" {
- switch(driver.ctx_) {
- case isc::dhcp::Parser6Context::RESERVATION_MODES:
- return isc::dhcp::Dhcp6Parser::make_IN_SUBNET(driver.loc_);
- default:
- return isc::dhcp::Dhcp6Parser::make_STRING("in-subnet", driver.loc_);
- }
-}
-
\"code\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OPTION_DEF:
ID "id"
RAPID_COMMIT "rapid-commit"
RESERVATION_MODE "reservation-mode"
- RESERVATION_MODES "reservation-modes"
+ RESERVATIONS_OUT_OF_POOL "reservations-out-of-pool"
+ RESERVATIONS_IN_SUBNET "reservations-in-subnet"
+ RESERVATIONS_GLOBAL "reservations-global"
DISABLED "disabled"
OUT_OF_POOL "out-of-pool"
- IN_SUBNET "in-subnet"
GLOBAL "global"
ALL "all"
SUB_OPTION_DATA
SUB_HOOKS_LIBRARY
SUB_DHCP_DDNS
- SUB_RESERVATION_MODES
SUB_CONFIG_CONTROL
;
| SUB_OPTION_DATA { ctx.ctx_ = ctx.OPTION_DATA; } sub_option_data
| SUB_HOOKS_LIBRARY { ctx.ctx_ = ctx.HOOKS_LIBRARIES; } sub_hooks_library
| SUB_DHCP_DDNS { ctx.ctx_ = ctx.DHCP_DDNS; } sub_dhcp_ddns
- | SUB_RESERVATION_MODES { ctx.ctx_ = ctx.RESERVATION_MODES; } sub_reservation_modes
| SUB_CONFIG_CONTROL { ctx.ctx_ = ctx.CONFIG_CONTROL; } sub_config_control
;
| config_control
| server_tag
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| calculate_tee_times
| t1_percent
| t2_percent
};
host_reservation_identifiers_list: host_reservation_identifier
- | host_reservation_identifiers_list COMMA host_reservation_identifier
- ;
+ | host_reservation_identifiers_list COMMA host_reservation_identifier
+ ;
host_reservation_identifier: duid_id
| hw_address_id
;
not_empty_hooks_libraries_list: hooks_library
- | not_empty_hooks_libraries_list COMMA hooks_library
- ;
+ | not_empty_hooks_libraries_list COMMA hooks_library
+ ;
hooks_library: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
| require_client_classes
| reservations
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| relay
| user_context
| comment
ctx.leave();
};
+reservations_out_of_pool: RESERVATIONS_OUT_OF_POOL COLON BOOLEAN {
+ ctx.unique("reservations-out-of-pool", ctx.loc2pos(@1));
+ ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("reservations-out-of-pool", b);
+};
+
+reservations_in_subnet: RESERVATIONS_IN_SUBNET COLON BOOLEAN {
+ ctx.unique("reservations-in-subnet", ctx.loc2pos(@1));
+ ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("reservations-in-subnet", b);
+};
+
+reservations_global: RESERVATIONS_GLOBAL COLON BOOLEAN {
+ ctx.unique("reservations-global", ctx.loc2pos(@1));
+ ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("reservations-global", b);
+};
+
reservation_mode: RESERVATION_MODE {
ctx.unique("reservation-mode", ctx.loc2pos(@1));
ctx.enter(ctx.RESERVATION_MODE);
| ALL { $$ = ElementPtr(new StringElement("all", ctx.loc2pos(@1))); }
;
-reservation_modes: RESERVATION_MODES {
- ctx.unique("reservation-modes", ctx.loc2pos(@1));
- ElementPtr m(new MapElement(ctx.loc2pos(@1)));
- ctx.stack_.back()->set("reservation-modes", m);
- ctx.stack_.push_back(m);
- ctx.enter(ctx.RESERVATION_MODES);
-} COLON LCURLY_BRACKET reservation_modes_params RCURLY_BRACKET {
- ctx.stack_.pop_back();
- ctx.leave();
-};
-
-sub_reservation_modes: LCURLY_BRACKET {
- // Parse the reservation-modes map
- ElementPtr m(new MapElement(ctx.loc2pos(@1)));
- ctx.stack_.push_back(m);
-} reservation_modes_params RCURLY_BRACKET {
- // No reservation_modes params are required
- // parsing completed
-};
-
-reservation_modes_params: reservation_modes_param
- | reservation_modes_params COMMA reservation_modes_param
- ;
-
-reservation_modes_param: hr_global
- | hr_in_subnet
- | hr_out_of_pool
- ;
-
-hr_global: GLOBAL COLON BOOLEAN {
- ctx.unique("global", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("global", b);
-};
-
-hr_in_subnet: IN_SUBNET COLON BOOLEAN {
- ctx.unique("in-subnet", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("in-subnet", b);
-};
-
-hr_out_of_pool: OUT_OF_POOL COLON BOOLEAN {
- ctx.unique("out-of-pool", ctx.loc2pos(@1));
- ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
- ctx.stack_.back()->set("out-of-pool", b);
-};
-
id: ID COLON INTEGER {
ctx.unique("id", ctx.loc2pos(@1));
ElementPtr id(new IntElement($3, ctx.loc2pos(@3)));
// This allows 0 or more shared network definitions.
shared_networks_content: %empty
- | shared_networks_list
- ;
+ | shared_networks_list
+ ;
// This allows 1 or more shared network definitions.
shared_networks_list: shared_network
| option_data_list
| relay
| reservation_mode
- | reservation_modes
+ | reservations_out_of_pool
+ | reservations_in_subnet
+ | reservations_global
| client_class
| require_client_classes
| preferred_lifetime
// Those parameters can either be a single parameter or
// a list of parameters separated by comma.
not_empty_option_data_params: option_data_param
- | not_empty_option_data_params COMMA option_data_param
- ;
+ | not_empty_option_data_params COMMA option_data_param
+ ;
// Each single option-data parameter can be one of the following
// expressions.
;
not_empty_reservation_params: reservation_param
- | not_empty_reservation_params COMMA reservation_param
- ;
+ | not_empty_reservation_params COMMA reservation_param
+ ;
/// @todo probably need to add mac-address as well here
reservation_param: duid
;
not_empty_client_class_params: client_class_param
- | not_empty_client_class_params COMMA client_class_param
- ;
+ | not_empty_client_class_params COMMA client_class_param
+ ;
client_class_param: client_class_name
| client_class_test
ConstElementPtr reservation_mode = mutable_cfg->get("reservation-mode");
if (reservation_mode) {
// log warning for deprecated option
- reservation_mode = mutable_cfg->get("reservation-modes");
+ bool found = false;
+ reservation_mode = mutable_cfg->get("reservations-out-of-pool");
if (reservation_mode) {
+ found = true;
+ }
+ reservation_mode = mutable_cfg->get("reservations-in-subnet");
+ if (reservation_mode) {
+ found = true;
+ }
+ reservation_mode = mutable_cfg->get("reservations-global");
+ if (reservation_mode) {
+ found = true;
+ }
+ if (found) {
isc_throw(DhcpConfigError, "invalid use of both 'reservation-mode'"
- " and 'reservation-modes' parameters");
+ " and one of 'reservations-out-of-pool'"
+ " , 'reservations-in-subnet' or"
+ " 'reservations-global' parameters");
}
}
(config_pair.first == "dhcp4o6-port") ||
(config_pair.first == "server-tag") ||
(config_pair.first == "reservation-mode") ||
- (config_pair.first == "reservation-modes") ||
+ (config_pair.first == "reservations-out-of-pool") ||
+ (config_pair.first == "reservations-in-subnet") ||
+ (config_pair.first == "reservations-global") ||
(config_pair.first == "calculate-tee-times") ||
(config_pair.first == "t1-percent") ||
(config_pair.first == "t2-percent") ||
"\"subnet6\": [ { "
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
" \"subnet\": \"2001:db8:1::/48\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true"
" },"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:2::/64\" } ],"
" \"subnet\": \"2001:db8:2::/48\", "
- " \"reservation-modes\": {"
- " \"out-of-pool\": true"
+ " \"reservations-out-of-pool\": true"
" }"
" },"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:3::/64\" } ],"
" \"subnet\": \"2001:db8:3::/48\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": false,"
- " \"out-of-pool\": false,"
- " \"global\": false"
- " }"
+ " \"reservations-out-of-pool\": false,"
+ " \"reservations-in-subnet\": false,"
+ " \"reservations-global\": false"
" },"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:4::/64\" } ],"
" \"subnet\": \"2001:db8:4::/48\", "
- " \"reservation-modes\": {"
- " \"global\": true"
- " }"
+ " \"reservations-global\": true"
" },"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:5::/64\" } ],"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:6::/64\" } ],"
" \"subnet\": \"2001:db8:6::/48\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true,"
- " \"global\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-global\": true"
" } ],"
"\"valid-lifetime\": 4000 }";
"\"preferred-lifetime\": 3000,"
"\"rebind-timer\": 2000, "
"\"renew-timer\": 1000, "
- "\"reservation-modes\": {"
- " \"out-of-pool\": true"
- " },"
+ "\"reservations-out-of-pool\": true,"
"\"subnet6\": [ { "
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ],"
" \"subnet\": \"2001:db8:1::/48\", "
- " \"reservation-modes\": {"
- " \"in-subnet\": true,"
- " \"out-of-pool\": true"
- " }"
+ " \"reservations-out-of-pool\": true,"
+ " \"reservations-in-subnet\": true"
" },"
" {"
" \"pools\": [ { \"pool\": \"2001:db8:2::/64\" } ],"
" \"ip-address\": \"1111::1\"\n"
" },\n"
" \"rapid-commit\": true,\n"
- " \"reservation-modes\": {"
- " \"global\": false"
- " },\n"
+ " \"reservations-global\": false,"
" \"subnet6\": [\n"
" { \n"
" \"subnet\": \"2001:db1::/48\",\n"
" \"max-valid-lifetime\": 500, \n"
" \"interface-id\": \"twotwo\",\n"
" \"rapid-commit\": true,\n"
- " \"reservation-modes\": {"
- " \"out-of-pool\": true"
- " }"
+ " \"reservations-out-of-pool\": true"
" }\n"
" ]\n"
" },\n"
" \"subnet\": \"2001:db8:1::/48\", \n"
" \"pools\": [ { \"pool\": \"2001:db8:1::/64\" } ], \n"
" \"interface\" : \"eth0\", \n"
- " \"reservation-modes\": { \"global\": true } \n"
+ " \"reservations-global\": true\n"
" },"
" { \n"
" \"subnet\": \"2001:db8:2::/48\", \n"
" { \n"
" \"subnet\": \"2001:db8:1::/48\", \n"
" \"interface\" : \"eth0\", \n"
- " \"reservation-modes\": { \"global\": true },"
+ " \"reservations-global\": true,\n"
" \"pd-pools\": [ \n"
" { \n"
" \"prefix\": \"3000::\", \n"
" \"test\": \"not member('reserved_class')\""
"}"
"],\n"
- "\"reservation-modes\": { \"global\": true },"
+ "\"reservations-global\": true,\n"
"\"valid-lifetime\": 4000,\n"
"\"reservations\": [ \n"
"{\n"
" \"test\": \"not member('reserved_class')\""
"}"
"],\n"
- "\"reservation-modes\": { \"global\": true },"
+ "\"reservations-global\": true,\n"
"\"valid-lifetime\": 4000,\n"
"\"reservations\": [ \n"
"{\n"
// specific options.
//
// When using reservations, it is useful to configure
- // reservation-modes (subnet specific parameter) and
+ // reservations-out-of-pool, reservations-in-subnet,
+ // reservations-global (subnet specific parameters) and
// host-reservation-identifiers (global parameter).
{
"client-id": "01:12:23:34:45:56:67",
x.reset(new DoubleElement(dbl_value, pos));
break;
}
- case Element::map: {
- auto data = Element::fromJSON(def_value.value_);
- if (data->getType() != Element::map) {
- isc_throw(BadValue,
- "Internal error. Incorrect map value type for "
- << def_value.name_ << " : " << def_value.value_);
- }
- x = data;
- break;
- }
- case Element::list: {
- auto data = Element::fromJSON(def_value.value_);
- if (data->getType() != Element::list) {
- isc_throw(BadValue,
- "Internal error. Incorrect list value type for "
- << def_value.name_ << " : " << def_value.value_);
- }
- x = data;
- break;
- }
default:
// No default values for null, list or map
isc_throw(DhcpConfigError,
if (hrmode & Network::HR_OUT_OF_POOL) {
hr_out_of_pool = true;
}
- ElementPtr reservation_modes = Element::createMap();
if (hrmode == Network::HR_DISABLED) {
- reservation_modes->set("global", Element::create(false));
- reservation_modes->set("in-subnet", Element::create(false));
- reservation_modes->set("out-of-pool", Element::create(false));
+ map->set("reservations-global", Element::create(false));
+ map->set("reservations-in-subnet", Element::create(false));
+ map->set("reservations-out-of-pool", Element::create(false));
} else {
if (hr_global) {
- reservation_modes->set("global", Element::create(true));
+ map->set("reservations-global", Element::create(true));
}
if (hr_in_subnet) {
- reservation_modes->set("in-subnet", Element::create(true));
+ map->set("reservations-in-subnet", Element::create(true));
}
if (hr_out_of_pool) {
- reservation_modes->set("out-of-pool", Element::create(true));
+ map->set("reservations-out-of-pool", Element::create(true));
}
}
-
- map->set("reservation-modes", reservation_modes);
}
// Set options
/// @brief Specifies allowed host reservation mode.
///
- typedef enum : uint8_t {
-
- /// None - host reservation is disabled. No reservation types
- /// are allowed.
- HR_DISABLED = 0,
-
- /// Only out-of-pool reservations is allowed. This mode
- /// allows AllocEngine to skip reservation checks when
- /// dealing with with addresses that are in pool.
- /// When HR_IN_SUBNET is set, this is always enabled as well.
- HR_OUT_OF_POOL = 1 << 0,
-
- /// The in-pool reservations is allowed. This mode actually
- /// behaves as if out-of-pool reservations are active as well.
- HR_IN_SUBNET = 1 << 1,
-
- /// Only global reservations are allowed. This mode
- /// instructs AllocEngine to only look at global reservations.
- HR_GLOBAL = 1 << 2,
-
- /// Both out-of-pool and in-pool reservations are allowed. This is the
- /// most flexible mode, where sysadmin have biggest liberty. However,
- /// there is a non-trivial performance penalty for it, as the
- /// AllocEngine code has to check whether there are reservations, even
- /// when dealing with reservations from within the dynamic pools.
- HR_ALL = HR_IN_SUBNET | HR_OUT_OF_POOL
- } HRModeFlag;
+ /// None - host reservation is disabled. No reservation types
+ /// are allowed.
+ const uint8_t HR_DISABLED = 0;
+
+ /// Only out-of-pool reservations is allowed. This mode
+ /// allows AllocEngine to skip reservation checks when
+ /// dealing with with addresses that are in pool.
+ /// When HR_IN_SUBNET is set, this is always enabled as well.
+ const uint8_t HR_OUT_OF_POOL = 1 << 0;
+
+ /// The in-pool reservations is allowed. This mode actually
+ /// behaves as if out-of-pool reservations are active as well.
+ const uint8_t HR_IN_SUBNET = 1 << 1;
+
+ /// Only global reservations are allowed. This mode
+ /// instructs AllocEngine to only look at global reservations.
+ const uint8_t HR_GLOBAL = 1 << 2;
+
+ /// Both out-of-pool and in-pool reservations are allowed. This is the
+ /// most flexible mode, where sysadmin have biggest liberty. However,
+ /// there is a non-trivial performance penalty for it, as the
+ /// AllocEngine code has to check whether there are reservations, even
+ /// when dealing with reservations from within the dynamic pools.
+ const uint8_t HR_ALL = HR_IN_SUBNET | HR_OUT_OF_POOL;
/// @brief Bitset used to store @ref HRModeFlag flags.
typedef uint8_t HRMode;
uint8_t flags = 0;
util::Optional<bool> hr_mode_global;
hr_mode_global = getGlobalProperty(hr_mode_global,
- "reservation-modes.global");
+ "reservations-global");
if (!hr_mode_global.unspecified()) {
if (hr_mode_global.get()) {
flags |= Network::HR_GLOBAL;
}
util::Optional<bool> hr_mode_in_subnet;
hr_mode_in_subnet = getGlobalProperty(hr_mode_in_subnet,
- "reservation-modes.in-subnet");
+ "reservations-in-subnet");
if (!hr_mode_in_subnet.unspecified()) {
if (hr_mode_in_subnet.get()) {
flags |= Network::HR_IN_SUBNET;
}
util::Optional<bool> hr_mode_out_of_pool;
hr_mode_out_of_pool = getGlobalProperty(hr_mode_out_of_pool,
- "reservation-modes.out-of-pool");
+ "reservations-out-of-pool");
if (!hr_mode_out_of_pool.unspecified()) {
if (hr_mode_out_of_pool.get()) {
flags |= Network::HR_OUT_OF_POOL;
template<typename ReturnType>
ReturnType getGlobalProperty(ReturnType property,
const std::string& global_name) const {
- std::string member_name;
- std::string search_name = global_name;
- auto found = global_name.find('.');
- if (found != std::string::npos) {
- if (std::count(global_name.begin(), global_name.end(), '.') > 1) {
- isc_throw(BadValue, "more than one level of indirection found in: "
- << global_name);
- }
- member_name = global_name.substr(found + 1, global_name.length() - found - 1);
- search_name = global_name.substr(0, found);
- }
- if (!search_name.empty() && fetch_globals_fn_) {
+ if (!global_name.empty() && fetch_globals_fn_) {
data::ConstElementPtr globals = fetch_globals_fn_();
if (globals && (globals->getType() == data::Element::map)) {
- data::ConstElementPtr global_param = globals->get(search_name);
+ data::ConstElementPtr global_param = globals->get(global_name);
if (global_param) {
- if (!member_name.empty()) {
- if (global_param->getType() != data::Element::map) {
- isc_throw(BadValue, "the parameter: " << global_name
- << " must be a map");
- }
- auto member_element = global_param->get(member_name);
- if (member_element) {
- // If there is a global parameter with the specified
- // member, convert the member to the optional value
- // of the given type and return.
- return (data::ElementValue<typename ReturnType::ValueType>()(member_element));
- }
- } else {
- // If there is a global parameter, convert it to the
- // optional value of the given type and return.
- return (data::ElementValue<typename ReturnType::ValueType>()(global_param));
- }
+ // If there is a global parameter, convert it to the
+ // optional value of the given type and return.
+ return (data::ElementValue<typename ReturnType::ValueType>()(global_param));
}
}
}
BaseNetworkParser::parseHostReservationMode(const data::ConstElementPtr& network_data,
NetworkPtr& network) {
if (network_data->contains("reservation-mode")) {
- if (network_data->contains("reservation-modes")) {
+ bool found = false;
+ if (network_data->contains("reservations-out-of-pool")) {
+ found = true
+ }
+ if (network_data->contains("reservations-in-subnet")) {
+ found = true
+ }
+ if (network_data->contains("reservations-global")) {
+ found = true
+ }
+ if (found)
isc_throw(DhcpConfigError, "invalid use of both 'reservation-mode'"
- " and 'reservation-modes' parameters");
+ " and one of 'reservations-out-of-pool'"
+ " , 'reservations-in-subnet' or"
+ " 'reservations-global' parameters");
}
try {
std::string hr_mode = getString(network_data, "reservation-mode");
BaseNetworkParser::parseHostReservationModes(const data::ConstElementPtr& network_data,
NetworkPtr& network) {
if (network_data->contains("reservation-modes")) {
- if (network_data->contains("reservation-mode")) {
+ bool found = false;
+ if (network_data->contains("reservations-out-of-pool")) {
+ found = true
+ }
+ if (network_data->contains("reservations-in-subnet")) {
+ found = true
+ }
+ if (network_data->contains("reservations-global")) {
+ found = true
+ }
+ if (found)
isc_throw(DhcpConfigError, "invalid use of both 'reservation-mode'"
- " and 'reservation-modes' parameters");
+ " and one of 'reservations-out-of-pool'"
+ " , 'reservations-in-subnet' or"
+ " 'reservations-global' parameters");
}
try {
- auto reservation_modes = network_data->get("reservation-modes");
HostReservationModesParser parser;
- Network::HRMode flags = parser.parse(reservation_modes);
+ Network::HRMode flags = parser.parse(network_data);
network->setHostReservationMode(flags);
} catch (const BadValue& ex) {
- isc_throw(DhcpConfigError, "invalid reservation-modes parameter: "
- << ex.what() << " (" << getPosition("reservation-modes",
- network_data) << ")");
+ isc_throw(DhcpConfigError, "invalid parameter: " << ex.what());
}
}
}
}
}
- // reservation-modes
+ // reservation modes
parseHostReservationModes(params, network);
// Let's set host reservation mode. If not specified, the default value of
subnet6->setIface(iface);
}
- // reservation-modes
+ // reservation modes
parseHostReservationModes(params, network);
// Let's set host reservation mode. If not specified, the default value of
namespace dhcp {
Network::HRMode
-HostReservationModesParser::parse(const ConstElementPtr& control_elem) {
- if (control_elem->getType() != Element::map) {
- isc_throw(DhcpConfigError, "reservation-modes must be a map");
+HostReservationModesParser::parse(const ConstElementPtr& config_elem) {
+ if (config_elem->getType() != Element::map) {
+ isc_throw(DhcpConfigError, "configuration must be a map");
}
ConstElementPtr elem;
uint8_t flags = 0;
try {
- elem = control_elem->get("global");
+ elem = config_elem->get("reservations-global");
if (elem) {
bool value = elem->boolValue();
if (value) {
}
}
- elem = control_elem->get("in-subnet");
+ elem = config_elem->get("reservations-in-subnet");
if (elem) {
bool value = elem->boolValue();
if (value) {
}
}
- elem = control_elem->get("out-of-pool");
+ elem = config_elem->get("reservations-out-of-pool");
if (elem) {
bool value = elem->boolValue();
if (value) {
}
}
- // reservation-modes
+ // reservation modes
parseHostReservationModes(shared_network_data, network);
// reservation-mode
}
}
- // reservation-modes
+ // reservation modes
parseHostReservationModes(shared_network_data, network);
// reservation-mode
{ "config-control", Element::map },
{ "server-tag", Element::string },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real },
{ "server-hostname", Element::string, "" },
{ "boot-file-name", Element::string, "" },
{ "server-tag", Element::string, "" },
- { "reservation-modes", Element::map, "{\"in-subnet\": true, \"out-of-pool\": true}" },
+ { "reservations-out-of-pool", Element::boolean, "true" },
+ { "reservations-in-subnet", Element::boolean, "true" },
+ { "reservations-global", Element::boolean, "false" },
{ "calculate-tee-times", Element::boolean, "false" },
{ "t1-percent", Element::real, ".50" },
{ "t2-percent", Element::real, ".875" },
{ "require-client-classes", Element::list },
{ "reservations", Element::list },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map, },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "relay", Element::map },
{ "match-client-id", Element::boolean },
{ "authoritative", Element::boolean },
{ "boot-file-name", Element::string },
{ "relay", Element::map },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "client-class", Element::string },
{ "require-client-classes", Element::list },
{ "valid-lifetime", Element::integer },
{ "config-control", Element::map },
{ "server-tag", Element::string },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real },
{ "decline-probation-period", Element::integer, "86400" }, // 24h
{ "dhcp4o6-port", Element::integer, "0" },
{ "server-tag", Element::string, "" },
- { "reservation-modes", Element::map, "{\"in-subnet\": true, \"out-of-pool\": true}" },
+ { "reservations-out-of-pool", Element::boolean, "true" },
+ { "reservations-in-subnet", Element::boolean, "true" },
+ { "reservations-global", Element::boolean, "false" },
{ "calculate-tee-times", Element::boolean, "true" },
{ "t1-percent", Element::real, ".50" },
{ "t2-percent", Element::real, ".80" },
{ "require-client-classes", Element::list },
{ "reservations", Element::list },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "relay", Element::map },
{ "user-context", Element::map },
{ "comment", Element::string },
{ "option-data", Element::list },
{ "relay", Element::map },
{ "reservation-mode", Element::string },
- { "reservation-modes", Element::map },
+ { "reservations-out-of-pool", Element::boolean },
+ { "reservations-in-subnet", Element::boolean },
+ { "reservations-global", Element::boolean },
{ "client-class", Element::string },
{ "require-client-classes", Element::list },
{ "preferred-lifetime", Element::integer },
x.reset(new DoubleElement(dbl_value, pos));
break;
}
- case Element::map: {
- auto data = Element::fromJSON(def_value.value_);
- if (data->getType() != Element::map) {
- isc_throw(BadValue,
- "Internal error. Incorrect map value type for "
- << def_value.name_ << " : " << def_value.value_);
- }
- x = data;
- break;
- }
- case Element::list: {
- auto data = Element::fromJSON(def_value.value_);
- if (data->getType() != Element::list) {
- isc_throw(BadValue,
- "Internal error. Incorrect list value type for "
- << def_value.name_ << " : " << def_value.value_);
- }
- x = data;
- break;
- }
default:
- // No default values for null
+ // No default values for null, list or map
isc_throw(BadValue,
"Internal error. Incorrect default value type for "
<< def_value.name_);
" \"4o6-interface-id\": \"\",\n"
" \"4o6-subnet\": \"\",\n"
" \"authoritative\": false,\n"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"option-data\": [ ],\n"
" \"pools\": [ ]\n,"
" \"require-client-classes\": [ \"foo\", \"bar\" ],\n"
" \"boot-file-name\": \"\", \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"4o6-interface\": \"\", \n"
" \"4o6-interface-id\": \"\", \n"
" \"4o6-subnet\": \"\" \n"
" \"boot-file-name\": \"\", \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"4o6-interface\": \"\", \n"
" \"4o6-interface-id\": \"\", \n"
" \"4o6-subnet\": \"\" \n"
" \"boot-file-name\": \"\", \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"4o6-interface\": \"\", \n"
" \"4o6-interface-id\": \"\", \n"
" \"4o6-subnet\": \"\" \n"
" \"boot-file-name\": \"\", \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"4o6-interface\": \"\", \n"
" \"4o6-interface-id\": \"\", \n"
" \"4o6-subnet\": \"\" \n"
" \"min-valid-lifetime\": 100,\n"
" \"max-valid-lifetime\": 300,\n"
" \"rapid-commit\": false,\n"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"pools\": [ ],\n"
" \"pd-pools\": [ ],\n"
" \"option-data\": [ ],\n"
" \"valid-lifetime\": 300, \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true}\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true\n"
" }";
" \"valid-lifetime\": 300, \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true}\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true\n"
" }";
" \"valid-lifetime\": 300, \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true}\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true\n"
" }";
data::ElementPtr elems;
" \"valid-lifetime\": 300, \n"
" \"client-class\": \"\", \n"
" \"require-client-classes\": [] \n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true}\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true\n"
" }";
data::ElementPtr elems;
globals_->set("cache-max-age", Element::create(20));
globals_->set("ddns-update-on-renew", Element::create(true));
globals_->set("ddns-use-conflict-resolution", Element::create(true));
- auto reservation_modes = Element::createMap();
- reservation_modes->set("global", Element::create(false));
- reservation_modes->set("in-subnet", Element::create(false));
- reservation_modes->set("out-of-pool", Element::create(false));
- globals_->set("reservation-modes", reservation_modes);
+ globals_->set("reservations-out-of-pool", Element::create(false));
+ globals_->set("reservations-in-subnet", Element::create(false));
+ globals_->set("reservations-global", Element::create(false));
// For each parameter for which inheritance is supported run
// the test that checks if the values are inherited properly.
Network::HR_DISABLED);
}
{
- SCOPED_TRACE("reservation-modes");
+ SCOPED_TRACE("reservations-global");
testNetworkInheritance<TestNetwork>(&Network::getHostReservationMode,
&Network::setHostReservationMode,
Network::HR_OUT_OF_POOL,
{
"reservation modes disabled",
"{ \n"
- " \"global\": false, \n"
- " \"in-subnet\": false, \n"
- " \"out-of-pool\": false \n"
+ " \"reservations-global\": false, \n"
+ " \"reservations-in-subnet\": false, \n"
+ " \"reservations-out-of-pool\": false \n"
"} \n",
Network::HR_DISABLED
},
{
"reservation modes global enabled",
"{ \n"
- " \"global\": true, \n"
- " \"in-subnet\": false, \n"
- " \"out-of-pool\": false \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-in-subnet\": false, \n"
+ " \"reservations-out-of-pool\": false \n"
"} \n",
Network::HR_GLOBAL
},
{
"reservation modes in-subnet enabled",
"{ \n"
- " \"global\": false, \n"
- " \"in-subnet\": true, \n"
- " \"out-of-pool\": false \n"
+ " \"reservations-global\": false, \n"
+ " \"reservations-in-subnet\": true, \n"
+ " \"reservations-out-of-pool\": false \n"
"} \n",
Network::HR_IN_SUBNET
},
{
"reservation modes global and in-subnet enabled",
"{ \n"
- " \"global\": true, \n"
- " \"in-subnet\": true, \n"
- " \"out-of-pool\": false \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-in-subnet\": true, \n"
+ " \"reservations-out-of-pool\": false \n"
"} \n",
Network::HR_GLOBAL|Network::HR_IN_SUBNET
},
{
"reservation modes out-of-pool enabled",
"{ \n"
- " \"global\": false, \n"
- " \"in-subnet\": false, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-global\": false, \n"
+ " \"reservations-in-subnet\": false, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_OUT_OF_POOL
},
{
"reservation modes global and out-of-pool enabled",
"{ \n"
- " \"global\": true, \n"
- " \"in-subnet\": false, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-in-subnet\": false, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_GLOBAL|Network::HR_OUT_OF_POOL
},
{
"reservation modes in-subnet and out-of-pool enabled",
"{ \n"
- " \"global\": false, \n"
- " \"in-subnet\": true, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-global\": false, \n"
+ " \"reservations-in-subnet\": true, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_IN_SUBNET|Network::HR_OUT_OF_POOL
},
{
"reservation modes global, in-subnet and out-of-pool enabled",
"{ \n"
- " \"global\": true, \n"
- " \"in-subnet\": true, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-in-subnet\": true, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_GLOBAL|Network::HR_IN_SUBNET|Network::HR_OUT_OF_POOL
},
{
"only global",
"{ \n"
- " \"global\": true \n"
+ " \"reservations-global\": true \n"
"} \n",
Network::HR_GLOBAL
},
{
"only in-subnet",
"{ \n"
- " \"in-subnet\": true \n"
+ " \"reservations-in-subnet\": true \n"
"} \n",
Network::HR_IN_SUBNET
},
{
"only out-of-pool",
"{ \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_OUT_OF_POOL
},
{
"only global and in-subnet",
"{ \n"
- " \"global\": true, \n"
- " \"in-subnet\": true \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-in-subnet\": true \n"
"} \n",
Network::HR_GLOBAL|Network::HR_IN_SUBNET
},
{
"only global and out-of-pool",
"{ \n"
- " \"global\": true, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-global\": true, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_GLOBAL|Network::HR_OUT_OF_POOL
},
{
"only in-subnet and out-of-pool",
"{ \n"
- " \"in-subnet\": true, \n"
- " \"out-of-pool\": true \n"
+ " \"reservations-in-subnet\": true, \n"
+ " \"reservations-out-of-pool\": true \n"
"} \n",
Network::HR_IN_SUBNET|Network::HR_OUT_OF_POOL
},
{
"global not boolean",
"{ \n"
- " \"global\": \"always\" \n"
+ " \"reservations-global\": \"always\" \n"
"} \n"
},
{
"in-subnet not boolean",
"{ \n"
- " \"in-subnet\": \"always\" \n"
+ " \"reservations-in-subnet\": \"always\" \n"
"} \n"
},
{
"out-of-pool not boolean",
"{ \n"
- " \"out-of-pool\": \"always\" \n"
+ " \"reservations-out-of-pool\": \"always\" \n"
"} \n"
}
};
" \"rebind-timer\": 199,"
" \"relay\": { \"ip-addresses\": [ \"10.1.1.1\" ] },"
" \"renew-timer\": 99,"
- " \"reservation-modes\": {\"out-of-pool\": true},"
+ " \"reservations-out-of-pool\": true,"
" \"server-hostname\": \"example.org\","
" \"require-client-classes\": [ \"runner\" ],"
" \"user-context\": { \"comment\": \"example\" },"
" \"boot-file-name\": \"\","
" \"client-class\": \"\","
" \"require-client-classes\": []\n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-out-of-pool\": true,"
" \"4o6-interface\": \"\","
" \"4o6-interface-id\": \"\","
" \"4o6-subnet\": \"\","
" \"boot-file-name\": \"\","
" \"client-class\": \"\","
" \"require-client-classes\": []\n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-out-of-pool\": true,"
" \"4o6-interface\": \"\","
" \"4o6-interface-id\": \"\","
" \"4o6-subnet\": \"\","
" \"relay\": { \"ip-addresses\": [ \"2001:db8:1::1\" ] },"
" \"renew-timer\": 99,"
" \"require-client-classes\": [ \"runner\" ],"
- " \"reservation-modes\": {\"out-of-pool\": true},"
+ " \"reservations-out-of-pool\": true,"
" \"user-context\": { },"
" \"valid-lifetime\": 399,"
" \"min-valid-lifetime\": 299,"
" \"max-valid-lifetime\": 500,"
" \"client-class\": \"\","
" \"require-client-classes\": []\n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-out-of-pool\": true,"
" \"rapid-commit\": false,"
" \"hostname-char-set\": \"\""
" },"
" \"valid-lifetime\": 40,"
" \"client-class\": \"\","
" \"require-client-classes\": []\n,"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,"
+ " \"reservations-out-of-pool\": true,"
" \"rapid-commit\": false"
" }"
" ]"
" },\n"
" \"renew-timer\": 100,\n"
" \"require-client-classes\": [ \"foo\" ],\n"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"subnet4\": [\n"
" {\n"
" \"4o6-interface\": \"\",\n"
" },\n"
" \"renew-timer\": 100,\n"
" \"require-client-classes\": [ \"foo\" ],\n"
- " \"reservation-modes\": {\"in-subnet\": true, \"out-of-pool\": true},"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true,\n"
" \"subnet6\": [\n"
" {\n"
" \"id\": 1,\n"