]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#488,!259] Subnet's and Network's toElement do not output optionals.
authorMarcin Siodelski <marcin@isc.org>
Wed, 6 Mar 2019 11:15:04 +0000 (12:15 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 7 Mar 2019 13:00:36 +0000 (08:00 -0500)
12 files changed:
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc.skel
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h
src/lib/dhcpsrv/subnet.cc
src/lib/dhcpsrv/subnet.h
src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc
src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc
src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc
src/lib/dhcpsrv/tests/shared_network_unittest.cc

index e6090558fc7a1b9887e513be7f6c05e317a2c9e4..6a10212aee288b84de9898481198862066c75fd5 100644 (file)
@@ -2167,7 +2167,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -2185,7 +2184,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                },\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2251,7 +2249,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -2269,7 +2266,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2336,7 +2332,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -2355,7 +2350,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2422,7 +2416,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -2441,7 +2434,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2452,7 +2444,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -2471,7 +2462,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2482,7 +2472,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 3,\n"
 "                \"match-client-id\": true,\n"
@@ -2501,7 +2490,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2512,7 +2500,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
 "                \"match-client-id\": true,\n"
@@ -2531,7 +2518,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.5.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2598,7 +2584,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1024,\n"
 "                \"match-client-id\": true,\n"
@@ -2617,7 +2602,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2628,7 +2612,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 100,\n"
 "                \"match-client-id\": true,\n"
@@ -2647,7 +2630,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2658,7 +2640,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -2677,7 +2658,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -2688,7 +2668,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 34,\n"
 "                \"match-client-id\": true,\n"
@@ -2707,7 +2686,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.5.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3038,7 +3016,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3057,7 +3034,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3124,7 +3100,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3143,7 +3118,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3210,7 +3184,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3229,7 +3202,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3240,7 +3212,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": false,\n"
@@ -3259,7 +3230,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3327,7 +3297,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": false,\n"
@@ -3346,7 +3315,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3357,7 +3325,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -3376,7 +3343,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3443,7 +3409,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": true,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3462,7 +3427,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3473,7 +3437,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -3492,7 +3455,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3560,7 +3522,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3579,7 +3540,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3590,7 +3550,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": true,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -3609,7 +3568,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3676,7 +3634,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3695,7 +3652,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3762,7 +3718,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3785,7 +3740,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3796,7 +3750,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -3819,7 +3772,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -3886,7 +3838,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -3905,7 +3856,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -4432,7 +4382,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -4451,7 +4400,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -4518,7 +4466,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -4554,7 +4501,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -4648,7 +4594,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -4667,7 +4612,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -4878,7 +4822,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -4897,7 +4840,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -4973,7 +4915,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5009,7 +4950,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5076,7 +5016,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5104,7 +5043,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5115,7 +5053,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -5143,7 +5080,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5210,7 +5146,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5246,7 +5181,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5313,7 +5247,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5354,7 +5287,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5438,7 +5370,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5457,7 +5388,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5659,7 +5589,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5678,7 +5607,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5760,7 +5688,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5779,7 +5706,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -5865,7 +5791,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -5884,7 +5809,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6061,7 +5985,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -6080,7 +6003,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6147,7 +6069,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -6166,7 +6087,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6233,7 +6153,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -6252,7 +6171,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6319,7 +6237,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"alpha\",\n"
 "                \"id\": 1,\n"
@@ -6339,7 +6256,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6350,7 +6266,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"beta\",\n"
 "                \"id\": 2,\n"
@@ -6370,7 +6285,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6381,7 +6295,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"client-class\": \"gamma\",\n"
 "                \"id\": 3,\n"
@@ -6401,7 +6314,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6412,7 +6324,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
 "                \"match-client-id\": true,\n"
@@ -6431,7 +6342,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.5.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6498,7 +6408,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -6532,7 +6441,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.0.0/16\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6599,7 +6507,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 123,\n"
 "                \"match-client-id\": true,\n"
@@ -6618,7 +6525,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6629,7 +6535,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 234,\n"
 "                \"match-client-id\": true,\n"
@@ -6703,7 +6608,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"server-hostname\": \"\"\n"
 "                    }\n"
 "                ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6714,7 +6618,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 542,\n"
 "                \"match-client-id\": true,\n"
@@ -6781,7 +6684,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"server-hostname\": \"\"\n"
 "                    }\n"
 "                ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6858,7 +6760,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 234,\n"
 "                \"match-client-id\": true,\n"
@@ -6897,7 +6798,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"server-hostname\": \"\"\n"
 "                    }\n"
 "                ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6964,7 +6864,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -6983,7 +6882,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -6994,7 +6892,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -7013,7 +6910,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"out-of-pool\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7024,7 +6920,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 3,\n"
 "                \"match-client-id\": true,\n"
@@ -7043,7 +6938,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"disabled\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7054,7 +6948,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 4,\n"
 "                \"match-client-id\": true,\n"
@@ -7073,7 +6966,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.5.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7141,7 +7033,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7160,7 +7051,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7171,7 +7061,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 2,\n"
 "                \"match-client-id\": true,\n"
@@ -7190,7 +7079,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"out-of-pool\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7465,7 +7353,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7484,7 +7371,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7551,7 +7437,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"2001:db8::123/45\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7570,7 +7455,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7637,7 +7521,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7656,7 +7539,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7723,7 +7605,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"2001:db8::543/21\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7742,7 +7623,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7809,7 +7689,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"vlan123\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7828,7 +7707,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -7921,7 +7799,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -7940,7 +7817,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8007,7 +7883,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -8026,7 +7901,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8093,7 +7967,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -8113,7 +7986,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8180,7 +8052,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -8204,7 +8075,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8271,7 +8141,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 1,\n"
 "                \"match-client-id\": true,\n"
@@ -8295,7 +8164,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8488,13 +8356,13 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"comment\": \"A shared network\",\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": false,\n"
+"                \"interface\": \"\",\n"
 "                \"match-client-id\": true,\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
 "                \"relay\": {\n"
 "                    \"ip-addresses\": [ ]\n"
 "                },\n"
-"                \"reservation-mode\": \"all\",\n"
 "                \"subnet4\": [\n"
 "                    {\n"
 "                        \"comment\": \"A subnet\",\n"
@@ -8502,7 +8370,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
 "                        \"authoritative\": false,\n"
-"                        \"boot-file-name\": \"\",\n"
 "                        \"calculate-tee-times\": false,\n"
 "                        \"id\": 100,\n"
 "                        \"match-client-id\": true,\n"
@@ -8541,7 +8408,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                                \"server-hostname\": \"\"\n"
 "                            }\n"
 "                        ],\n"
-"                        \"server-hostname\": \"\",\n"
 "                        \"subnet\": \"192.0.1.0/24\",\n"
 "                        \"t1-percent\": 0.5,\n"
 "                        \"t2-percent\": 0.875,\n"
@@ -8668,7 +8534,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 123,\n"
 "                \"match-client-id\": true,\n"
@@ -8687,7 +8552,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.2.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8698,7 +8562,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 542,\n"
 "                \"match-client-id\": true,\n"
@@ -8717,7 +8580,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"renew-timer\": 1000,\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.4.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
@@ -8779,20 +8641,19 @@ const char* UNPARSED_CONFIGS[] = {
 "            {\n"
 "                \"authoritative\": false,\n"
 "                \"calculate-tee-times\": true,\n"
+"                \"interface\": \"\",\n"
 "                \"match-client-id\": true,\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
 "                \"relay\": {\n"
 "                    \"ip-addresses\": [ ]\n"
 "                },\n"
-"                \"reservation-mode\": \"all\",\n"
 "                \"subnet4\": [\n"
 "                    {\n"
 "                        \"4o6-interface\": \"\",\n"
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
 "                        \"authoritative\": false,\n"
-"                        \"boot-file-name\": \"\",\n"
 "                        \"calculate-tee-times\": false,\n"
 "                        \"id\": 100,\n"
 "                        \"match-client-id\": true,\n"
@@ -8809,7 +8670,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        },\n"
 "                        \"reservation-mode\": \"all\",\n"
 "                        \"reservations\": [ ],\n"
-"                        \"server-hostname\": \"\",\n"
 "                        \"subnet\": \"192.0.1.0/24\",\n"
 "                        \"t1-percent\": 0.45,\n"
 "                        \"t2-percent\": 0.65,\n"
@@ -8820,7 +8680,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        \"4o6-interface-id\": \"\",\n"
 "                        \"4o6-subnet\": \"\",\n"
 "                        \"authoritative\": false,\n"
-"                        \"boot-file-name\": \"\",\n"
 "                        \"calculate-tee-times\": true,\n"
 "                        \"id\": 200,\n"
 "                        \"match-client-id\": true,\n"
@@ -8837,7 +8696,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                        },\n"
 "                        \"reservation-mode\": \"all\",\n"
 "                        \"reservations\": [ ],\n"
-"                        \"server-hostname\": \"\",\n"
 "                        \"subnet\": \"192.0.2.0/24\",\n"
 "                        \"t1-percent\": 0.4,\n"
 "                        \"t2-percent\": 0.75,\n"
@@ -8855,7 +8713,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                \"4o6-interface-id\": \"\",\n"
 "                \"4o6-subnet\": \"\",\n"
 "                \"authoritative\": false,\n"
-"                \"boot-file-name\": \"\",\n"
 "                \"calculate-tee-times\": false,\n"
 "                \"id\": 300,\n"
 "                \"match-client-id\": true,\n"
@@ -8872,7 +8729,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                },\n"
 "                \"reservation-mode\": \"all\",\n"
 "                \"reservations\": [ ],\n"
-"                \"server-hostname\": \"\",\n"
 "                \"subnet\": \"192.0.3.0/24\",\n"
 "                \"t1-percent\": 0.5,\n"
 "                \"t2-percent\": 0.875,\n"
index 561d4c183a11f5682d73d6e0f8fddfc78b3cf7bb..abb8f461b4a99cd9e175a13cb50741bc988d2b67 100644 (file)
@@ -7475,6 +7475,7 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"shared-networks\": [\n"
 "            {\n"
 "                \"comment\": \"A shared network\",\n"
+"                \"interface\": \"\",\n"
 "                \"name\": \"foo\",\n"
 "                \"option-data\": [ ],\n"
 "                \"preferred-lifetime\": 3600,\n"
@@ -7484,7 +7485,6 @@ const char* UNPARSED_CONFIGS[] = {
 "                    \"ip-addresses\": [ ]\n"
 "                },\n"
 "                \"renew-timer\": 900,\n"
-"                \"reservation-mode\": \"all\",\n"
 "                \"subnet6\": [\n"
 "                    {\n"
 "                        \"comment\": \"A subnet\",\n"
index 09f0b735d3319e164146b8c6133ffad5b86ab6a8..99f6c67bf035591913e174dbc84d2d2b6793b7cf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
index f78612231df8a8087b8cd915cd95cbd307d8b8b5..8666f63e3e9b03de4f699b27db292d3bf100dda1 100644 (file)
@@ -107,9 +107,8 @@ Network::toElement() const {
     contextToElement(map);
 
     // Set interface
-    const std::string& iface = getIface();
-    if (!iface.empty()) {
-        map->set("interface", Element::create(iface));
+    if (!getIface().unspecified()) {
+        map->set("interface", Element::create(getIface().get()));
     }
 
     ElementPtr relay_map = Element::createMap();
@@ -123,9 +122,8 @@ Network::toElement() const {
     map->set("relay", relay_map);
 
     // Set client-class
-    const ClientClass& cclass = getClientClass();
-    if (!cclass.empty()) {
-        map->set("client-class", Element::create(cclass));
+    if (!getClientClass().unspecified()) {
+        map->set("client-class", Element::create(getClientClass().get()));
     }
 
     // Set require-client-classes
@@ -161,26 +159,28 @@ Network::toElement() const {
     }
 
     // Set reservation mode
-    Network::HRMode hrmode = getHostReservationMode();
-    std::string mode;
-    switch (hrmode) {
-    case HR_DISABLED:
-        mode = "disabled";
-        break;
-    case HR_OUT_OF_POOL:
-        mode = "out-of-pool";
-        break;
-    case HR_GLOBAL:
-        mode = "global";
-        break;
-    case HR_ALL:
-        mode = "all";
-        break;
-    default:
-        isc_throw(ToElementError,
-                  "invalid host reservation mode: " << hrmode);
+    Optional<Network::HRMode> hrmode = getHostReservationMode();
+    if (!hrmode.unspecified()) {
+        std::string mode;
+        switch (hrmode.get()) {
+        case HR_DISABLED:
+            mode = "disabled";
+            break;
+        case HR_OUT_OF_POOL:
+            mode = "out-of-pool";
+            break;
+        case HR_GLOBAL:
+            mode = "global";
+            break;
+        case HR_ALL:
+            mode = "all";
+            break;
+        default:
+            isc_throw(ToElementError,
+                      "invalid host reservation mode: " << hrmode.get());
+        }
+        map->set("reservation-mode", Element::create(mode));
     }
-    map->set("reservation-mode", Element::create(mode));
 
     // Set options
     ConstCfgOptionPtr opts = getCfgOption();
@@ -205,15 +205,68 @@ Network::toElement() const {
     return (map);
 }
 
+void
+Network4::setSiaddr(const Optional<IOAddress>& siaddr) {
+    if (!siaddr.get().isV4()) {
+        isc_throw(BadValue, "Can't set siaddr to non-IPv4 address "
+                  << siaddr);
+    }
+    siaddr_ = siaddr;
+}
+
+Optional<IOAddress>
+Network4::getSiaddr() const {
+    return (siaddr_);
+}
+
+void
+Network4::setSname(const Optional<std::string>& sname) {
+    sname_ = sname;
+}
+
+const Optional<std::string>&
+Network4::getSname() const {
+    return (sname_);
+}
+
+void
+Network4::setFilename(const Optional<std::string>& filename) {
+    filename_ = filename;
+}
+
+const Optional<std::string>&
+Network4::getFilename() const {
+    return (filename_);
+}
+
 ElementPtr
 Network4::toElement() const {
     ElementPtr map = Network::toElement();
 
     // Set match-client-id
-    map->set("match-client-id", Element::create(getMatchClientId()));
+    if (!getMatchClientId().unspecified()) {
+        map->set("match-client-id", Element::create(getMatchClientId().get()));
+    }
 
     // Set authoritative
-    map->set("authoritative", Element::create(getAuthoritative()));
+    if (!getAuthoritative().unspecified()) {
+        map->set("authoritative", Element::create(getAuthoritative().get()));
+    }
+
+    // Set next-server
+    if (!getSiaddr().unspecified()) {
+        map->set("next-server", Element::create(getSiaddr().get().toText()));
+    }
+
+    // Set server-hostname
+    if (!getSname().unspecified()) {
+        map->set("server-hostname", Element::create(getSname().get()));
+    }
+
+    // Set boot-file-name
+    if (!getFilename().unspecified()) {
+        map->set("boot-file-name",Element::create(getFilename().get()));
+    }
 
     return (map);
 }
@@ -257,8 +310,9 @@ Network6::toElement() const {
     }
 
     // Set rapid-commit
-    bool rapid_commit = getRapidCommit();
-    map->set("rapid-commit", Element::create(rapid_commit));
+    if (!getRapidCommit().unspecified()) {
+        map->set("rapid-commit", Element::create(getRapidCommit().get()));
+    }
 
     return (map);
 }
index 804684a9bea5abffceb1aa23181e036a6d13b3cc..e864509e7ed31675ee0809c2643a745bea0029be 100644 (file)
@@ -415,7 +415,8 @@ public:
 
     /// @brief Constructor.
     Network4()
-        : Network(), match_client_id_(true, true), authoritative_() {
+        : Network(), match_client_id_(true, true), authoritative_(),
+          siaddr_(), sname_(), filename_() {
     }
 
     /// @brief Returns the flag indicating if the client identifiers should
@@ -453,6 +454,38 @@ public:
         authoritative_ = authoritative;
     }
 
+    /// @brief Sets siaddr for the network.
+    ///
+    /// Will be used for siaddr field (the next server) that typically is used
+    /// as TFTP server. If not specified, the default value of 0.0.0.0 is
+    /// used.
+    void setSiaddr(const util::Optional<asiolink::IOAddress>& siaddr);
+
+    /// @brief Returns siaddr for this network.
+    ///
+    /// @return siaddr value
+    util::Optional<asiolink::IOAddress> getSiaddr() const;
+
+    /// @brief Sets server hostname for the network.
+    ///
+    /// Will be used for server hostname field (may be empty if not defined)
+    void setSname(const util::Optional<std::string>& sname);
+
+    /// @brief Returns server hostname for this network.
+    ///
+    /// @return server hostname value
+    const util::Optional<std::string>& getSname() const;
+
+    /// @brief Sets boot file name for the network.
+    ///
+    /// Will be used for boot file name (may be empty if not defined)
+    void setFilename(const util::Optional<std::string>& filename);
+
+    /// @brief Returns boot file name for this subnet
+    ///
+    /// @return boot file name value
+    const util::Optional<std::string>& getFilename() const;
+
     /// @brief Unparses network object.
     ///
     /// @return A pointer to unparsed network configuration.
@@ -472,6 +505,15 @@ private:
 
     /// @brief Should requests for unknown IP addresses be rejected.
     util::Optional<bool> authoritative_;
+
+    /// @brief siaddr value for this subnet
+    util::Optional<asiolink::IOAddress> siaddr_;
+
+    /// @brief server hostname for this subnet
+    util::Optional<std::string> sname_;
+
+    /// @brief boot file name for this subnet
+    util::Optional<std::string> filename_;
 };
 
 /// @brief Specialization of the @ref Network object for DHCPv6 case.
index c14c2b355321186dae937d88f8307fdb27719c7d..e3ae220549e66e119d0c65cfe7e19d4b32d4d606 100644 (file)
@@ -247,7 +247,7 @@ Subnet4::Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
                  const Triplet<uint32_t>& t2,
                  const Triplet<uint32_t>& valid_lifetime,
                  const SubnetID id)
-    : Subnet(prefix, length, id), Network4(), siaddr_() {
+    : Subnet(prefix, length, id), Network4() {
     if (!prefix.isV4()) {
         isc_throw(BadValue, "Non IPv4 prefix " << prefix.toText()
                   << " specified in subnet4");
@@ -309,33 +309,6 @@ Subnet4::clientSupported(const isc::dhcp::ClientClasses& client_classes) const {
     return (Network4::clientSupported(client_classes));
 }
 
-void Subnet4::setSiaddr(const Optional<IOAddress>& siaddr) {
-    if (!siaddr.get().isV4()) {
-        isc_throw(BadValue, "Can't set siaddr to non-IPv4 address "
-                  << siaddr);
-    }
-    siaddr_ = siaddr;
-}
-
-Optional<IOAddress> Subnet4::getSiaddr() const {
-    return (siaddr_);
-}
-
-void Subnet4::setSname(const Optional<std::string>& sname) {
-    sname_ = sname;
-}
-
-const Optional<std::string>& Subnet4::getSname() const {
-    return (sname_);
-}
-void Subnet4::setFilename(const Optional<std::string>& filename) {
-    filename_ = filename;
-}
-
-const Optional<std::string>& Subnet4::getFilename() const {
-    return (filename_);
-}
-
 const PoolCollection& Subnet::getPools(Lease::Type type) const {
     // check if the type is valid (and throw if it isn't)
     checkType(type);
@@ -716,15 +689,6 @@ Subnet4::toElement() const {
     const Cfg4o6& d4o6 = get4o6();
     isc::data::merge(map, d4o6.toElement());
 
-    // Set next-server
-    map->set("next-server", Element::create(getSiaddr().get().toText()));
-
-    // Set server-hostname
-    map->set("server-hostname", Element::create(getSname()));
-
-    // Set boot-file-name
-    map->set("boot-file-name",Element::create(getFilename()));
-
     // Set pools
     const PoolCollection& pools = getPools(Lease::TYPE_V4);
     ElementPtr pool_list = Element::createList();
index 0e720ede0baf828d67b4d122ac9fc90534e4dee3..31d6680ca75a72d38ca4dd33659e3b3902987bab 100644 (file)
@@ -16,8 +16,6 @@
 #include <dhcpsrv/pool.h>
 #include <dhcpsrv/subnet_id.h>
 #include <dhcpsrv/triplet.h>
-#include <util/optional.h>
-
 #include <boost/multi_index/mem_fun.hpp>
 #include <boost/multi_index/indexed_by.hpp>
 #include <boost/multi_index/ordered_index.hpp>
@@ -532,38 +530,6 @@ public:
     virtual bool
     clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
 
-    /// @brief Sets siaddr for the Subnet4
-    ///
-    /// Will be used for siaddr field (the next server) that typically is used
-    /// as TFTP server. If not specified, the default value of 0.0.0.0 is
-    /// used.
-    void setSiaddr(const util::Optional<asiolink::IOAddress>& siaddr);
-
-    /// @brief Returns siaddr for this subnet
-    ///
-    /// @return siaddr value
-    util::Optional<asiolink::IOAddress> getSiaddr() const;
-
-    /// @brief Sets server hostname for the Subnet4 
-    ///
-    /// Will be used for server hostname field (may be empty if not defined)
-    void setSname(const util::Optional<std::string>& sname);
-
-    /// @brief Returns server hostname for this subnet
-    ///
-    /// @return server hostname value
-    const util::Optional<std::string>& getSname() const;
-
-    /// @brief Sets boot file name for the Subnet4 
-    ///
-    /// Will be used for boot file name (may be empty if not defined)
-    void setFilename(const util::Optional<std::string>& filename);
-
-    /// @brief Returns boot file name for this subnet
-    ///
-    /// @return boot file name value
-    const util::Optional<std::string>& getFilename() const;
-
     /// @brief Returns DHCP4o6 configuration parameters.
     ///
     /// This structure is always available. If the 4o6 is not enabled, its
@@ -608,15 +574,6 @@ private:
     /// @throw BadValue if invalid value is used
     virtual void checkType(Lease::Type type) const;
 
-    /// @brief siaddr value for this subnet
-    util::Optional<asiolink::IOAddress> siaddr_;
-
-    /// @brief server hostname for this subnet
-    util::Optional<std::string> sname_;
-
-    /// @brief boot file name for this subnet
-    util::Optional<std::string> filename_;
-
     /// @brief All the information related to DHCP4o6
     Cfg4o6 dhcp4o6_;
 };
index 5d704fba3b4ddde4b53e68bf5346e5095d022fd7..c8e80d7bec0b7627bb0db1cf45efa41f52ad3c0e 100644 (file)
@@ -142,27 +142,21 @@ TEST(CfgSharedNetworks4Test, unparse) {
     std::string expected =
         "[\n"
         "  {\n"
-        "    \"authoritative\": false,\n"
         "    \"interface\": \"eth1\",\n"
-        "    \"match-client-id\": true,\n"
         "    \"name\": \"dog\",\n"
         "    \"rebind-timer\": 200,\n"
         "    \"option-data\": [ ],\n"
         "    \"renew-timer\": 100,\n"
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
-        "    \"reservation-mode\": \"all\","
         "    \"subnet4\": [ ],\n"
         "    \"valid-lifetime\": 300\n"
         "  },\n"
         "  {\n"
-        "    \"authoritative\": false,\n"
         "    \"calculate-tee-times\": true,\n"
         "    \"interface\": \"eth0\",\n"
-        "    \"match-client-id\": true,\n"
         "    \"name\": \"frog\",\n"
         "    \"option-data\": [ ],\n"
         "    \"relay\": { \"ip-addresses\": [ \"198.16.1.1\", \"198.16.1.2\" ] },\n"
-        "    \"reservation-mode\": \"all\","
         "    \"subnet4\": [ ],\n"
         "    \"t1-percent\": .35,\n"
         "    \"t2-percent\": .655\n"
index 1e9a01eda37f1ed412360c6661a1ab51b1cc97c0..ba2895864fa2b6cc63c982bf1e86a74e37f5e75d 100644 (file)
@@ -129,11 +129,9 @@ TEST(CfgSharedNetworks6Test, unparse) {
         "    \"interface\": \"eth1\",\n"
         "    \"name\": \"dog\",\n"
         "    \"option-data\": [ ],\n"
-        "    \"rapid-commit\": false,\n"
         "    \"rebind-timer\": 200,\n"
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
         "    \"renew-timer\": 100,\n"
-        "    \"reservation-mode\": \"all\","
         "    \"subnet6\": [ ],\n"
         "    \"valid-lifetime\": 300\n"
         "  },\n"
@@ -141,9 +139,7 @@ TEST(CfgSharedNetworks6Test, unparse) {
         "    \"interface\": \"eth0\",\n"
         "    \"name\": \"frog\",\n"
         "    \"option-data\": [ ],\n"
-        "    \"rapid-commit\": false,\n"
         "    \"relay\": { \"ip-addresses\": [ \"2001:db8:1::1\", \"2001:db8:1::2\" ] },\n"
-        "    \"reservation-mode\": \"all\","
         "    \"subnet6\": [ ]\n"
         "  }\n"
         "]\n";
index 59f9cb0705fc89d12f240ce265c6a91c574d3f62..c5206458ae1a092863559e66b5e8182c29d6030d 100644 (file)
@@ -885,6 +885,12 @@ TEST(CfgSubnets4Test, unparseSubnet) {
     subnet3->setCalculateTeeTimes(true);
     subnet3->setT1Percent(0.50);
     subnet3->setT2Percent(0.65);
+    subnet3->setHostReservationMode(Network::HR_ALL);
+    subnet3->setAuthoritative(false);
+    subnet3->setMatchClientId(true);
+    subnet3->setSiaddr(IOAddress("192.0.2.2"));
+    subnet3->setSname("frog");
+    subnet3->setFilename("/dev/null");
 
     data::ElementPtr ctx1 = data::Element::fromJSON("{ \"comment\": \"foo\" }");
     subnet1->setContext(ctx1);
@@ -903,10 +909,6 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"subnet\": \"192.0.2.0/26\",\n"
         "    \"t1-percent\": 0.45,"
         "    \"t2-percent\": 0.7,"
-        "    \"match-client-id\": true,\n"
-        "    \"next-server\": \"0.0.0.0\",\n"
-        "    \"server-hostname\": \"\",\n"
-        "    \"boot-file-name\": \"\",\n"
         "    \"renew-timer\": 1,\n"
         "    \"rebind-timer\": 2,\n"
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
@@ -915,18 +917,12 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"4o6-interface\": \"\",\n"
         "    \"4o6-interface-id\": \"\",\n"
         "    \"4o6-subnet\": \"\",\n"
-        "    \"authoritative\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"option-data\": [ ],\n"
         "    \"pools\": [ ]\n"
         "},{\n"
         "    \"id\": 124,\n"
         "    \"subnet\": \"192.0.2.64/26\",\n"
         "    \"interface\": \"lo\",\n"
-        "    \"match-client-id\": true,\n"
-        "    \"next-server\": \"0.0.0.0\",\n"
-        "    \"server-hostname\": \"\",\n"
-        "    \"boot-file-name\": \"\",\n"
         "    \"renew-timer\": 1,\n"
         "    \"rebind-timer\": 2,\n"
         "    \"relay\": { \"ip-addresses\": [ \"10.0.0.1\" ] },\n"
@@ -934,8 +930,6 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"4o6-interface\": \"\",\n"
         "    \"4o6-interface-id\": \"\",\n"
         "    \"4o6-subnet\": \"\",\n"
-        "    \"authoritative\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"user-context\": {},\n"
         "    \"option-data\": [ ],\n"
         "    \"pools\": [ ]\n"
@@ -944,9 +938,9 @@ TEST(CfgSubnets4Test, unparseSubnet) {
         "    \"subnet\": \"192.0.2.128/26\",\n"
         "    \"interface\": \"eth1\",\n"
         "    \"match-client-id\": true,\n"
-        "    \"next-server\": \"0.0.0.0\",\n"
-        "    \"server-hostname\": \"\",\n"
-        "    \"boot-file-name\": \"\",\n"
+        "    \"next-server\": \"192.0.2.2\",\n"
+        "    \"server-hostname\": \"frog\",\n"
+        "    \"boot-file-name\": \"/dev/null\",\n"
         "    \"renew-timer\": 1,\n"
         "    \"rebind-timer\": 2,\n"
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
@@ -992,10 +986,6 @@ TEST(CfgSubnets4Test, unparsePool) {
         "{\n"
         "    \"id\": 123,\n"
         "    \"subnet\": \"192.0.2.0/24\",\n"
-        "    \"match-client-id\": true,\n"
-        "    \"next-server\": \"0.0.0.0\",\n"
-        "    \"server-hostname\": \"\",\n"
-        "    \"boot-file-name\": \"\",\n"
         "    \"renew-timer\": 1,\n"
         "    \"rebind-timer\": 2,\n"
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
@@ -1003,8 +993,6 @@ TEST(CfgSubnets4Test, unparsePool) {
         "    \"4o6-interface\": \"\",\n"
         "    \"4o6-interface-id\": \"\",\n"
         "    \"4o6-subnet\": \"\",\n"
-        "    \"authoritative\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"option-data\": [],\n"
         "    \"pools\": [\n"
         "        {\n"
index f640299b5e9370952100912fbc3373a94e364e70..4707aac6488ad2a5e94f4d3183ef2db637bc5f09 100644 (file)
@@ -440,6 +440,8 @@ TEST(CfgSubnets6Test, unparseSubnet) {
     subnet3->setIface("eth1");
     subnet3->requireClientClass("foo");
     subnet3->requireClientClass("bar");
+    subnet3->setHostReservationMode(Network::HR_ALL);
+    subnet3->setRapidCommit(false);
 
     data::ElementPtr ctx1 = data::Element::fromJSON("{ \"comment\": \"foo\" }");
     subnet1->setContext(ctx1);
@@ -462,8 +464,6 @@ TEST(CfgSubnets6Test, unparseSubnet) {
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
         "    \"preferred-lifetime\": 3,\n"
         "    \"valid-lifetime\": 4,\n"
-        "    \"rapid-commit\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"client-class\": \"foo\",\n"
         "    \"pools\": [ ],\n"
         "    \"pd-pools\": [ ],\n"
@@ -477,8 +477,6 @@ TEST(CfgSubnets6Test, unparseSubnet) {
         "    \"relay\": { \"ip-addresses\": [ \"2001:db8:ff::2\" ] },\n"
         "    \"preferred-lifetime\": 3,\n"
         "    \"valid-lifetime\": 4,\n"
-        "    \"rapid-commit\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"user-context\": { },\n"
         "    \"pools\": [ ],\n"
         "    \"pd-pools\": [ ],\n"
@@ -536,8 +534,6 @@ TEST(CfgSubnets6Test, unparsePool) {
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
         "    \"preferred-lifetime\": 3,\n"
         "    \"valid-lifetime\": 4,\n"
-        "    \"rapid-commit\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"pools\": [\n"
         "        {\n"
         "            \"comment\": \"foo\",\n"
@@ -591,8 +587,6 @@ TEST(CfgSubnets6Test, unparsePdPool) {
         "    \"relay\": { \"ip-addresses\": [ ] },\n"
         "    \"preferred-lifetime\": 3,\n"
         "    \"valid-lifetime\": 4,\n"
-        "    \"rapid-commit\": false,\n"
-        "    \"reservation-mode\": \"all\",\n"
         "    \"pools\": [ ],\n"
         "    \"pd-pools\": [\n"
         "        {\n"
index 7060d7fd02908257cba5570368b2abe400afe375..490ada609a95d2f625d9de5f148aaebc7a2259d4 100644 (file)
@@ -340,6 +340,9 @@ TEST(SharedNetwork4Test, unparse) {
     network->setContext(ctx);
     network->requireClientClass("foo");
     network->addRelayAddress(IOAddress("192.168.2.1"));
+    network->setAuthoritative(false);
+    network->setMatchClientId(false);
+    network->setHostReservationMode(Network::HR_ALL);
 
     // Add several subnets.
     Subnet4Ptr subnet1(new Subnet4(IOAddress("10.0.0.0"), 8, 10, 20, 30,
@@ -371,12 +374,7 @@ TEST(SharedNetwork4Test, unparse) {
         "        \"4o6-interface\": \"\",\n"
         "        \"4o6-interface-id\": \"\",\n"
         "        \"4o6-subnet\": \"\",\n"
-        "        \"authoritative\": false,\n"
         "        \"id\": 1,\n"
-        "        \"match-client-id\": true,\n"
-        "        \"next-server\": \"0.0.0.0\",\n"
-        "        \"server-hostname\": \"\",\n"
-        "        \"boot-file-name\": \"\",\n"
         "        \"option-data\": [ ],\n"
         "        \"pools\": [ ],\n"
         "        \"rebind-timer\": 20,\n"
@@ -384,7 +382,6 @@ TEST(SharedNetwork4Test, unparse) {
         "           \"ip-addresses\": [ \"10.0.0.1\", \"10.0.0.2\" ]\n"
         "        },\n"
         "        \"renew-timer\": 10,\n"
-        "        \"reservation-mode\": \"all\",\n"
         "        \"subnet\": \"10.0.0.0/8\",\n"
         "        \"valid-lifetime\": 30\n"
         "      },\n"
@@ -392,12 +389,7 @@ TEST(SharedNetwork4Test, unparse) {
         "        \"4o6-interface\": \"\",\n"
         "        \"4o6-interface-id\": \"\",\n"
         "        \"4o6-subnet\": \"\",\n"
-        "        \"authoritative\": false,\n"
         "        \"id\": 2,\n"
-        "        \"match-client-id\": true,\n"
-        "        \"next-server\": \"0.0.0.0\",\n"
-        "        \"server-hostname\": \"\",\n"
-        "        \"boot-file-name\": \"\",\n"
         "        \"option-data\": [ ],\n"
         "        \"pools\": [ ],\n"
         "        \"rebind-timer\": 20,\n"
@@ -405,7 +397,6 @@ TEST(SharedNetwork4Test, unparse) {
         "           \"ip-addresses\": [ ]\n"
         "        },\n"
         "        \"renew-timer\": 10,\n"
-        "        \"reservation-mode\": \"all\",\n"
         "        \"subnet\": \"192.0.2.0/24\",\n"
         "        \"valid-lifetime\": 30\n"
         "      }\n"
@@ -799,6 +790,9 @@ TEST(SharedNetwork6Test, unparse) {
     network->addRelayAddress(IOAddress("2001:db8:1::7"));
     network->addRelayAddress(IOAddress("2001:db8:1::8"));
 
+    network->setRapidCommit(true);
+    network->setHostReservationMode(Network::HR_ALL);
+
     // Add several subnets.
     Subnet6Ptr subnet1(new Subnet6(IOAddress("2001:db8:1::"), 64, 10, 20, 30,
                                    40, SubnetID(1)));
@@ -829,13 +823,11 @@ TEST(SharedNetwork6Test, unparse) {
         "        \"pd-pools\": [ ],\n"
         "        \"pools\": [ ],\n"
         "        \"preferred-lifetime\": 30,\n"
-        "        \"rapid-commit\": false,\n"
         "        \"rebind-timer\": 20,\n"
         "        \"relay\": {\n"
         "           \"ip-addresses\": [ ]\n"
         "        },\n"
         "        \"renew-timer\": 10,\n"
-        "        \"reservation-mode\": \"all\",\n"
         "        \"subnet\": \"2001:db8:1::/64\",\n"
         "        \"valid-lifetime\": 40\n"
         "      },\n"
@@ -845,13 +837,11 @@ TEST(SharedNetwork6Test, unparse) {
         "        \"pd-pools\": [ ],\n"
         "        \"pools\": [ ],\n"
         "        \"preferred-lifetime\": 30,\n"
-        "        \"rapid-commit\": false,\n"
         "        \"rebind-timer\": 20,\n"
         "        \"relay\": {\n"
         "           \"ip-addresses\": [ \"2001:db8:1::8\" ]\n"
         "        },\n"
         "        \"renew-timer\": 10,\n"
-        "        \"reservation-mode\": \"all\",\n"
         "        \"subnet\": \"3000::/16\",\n"
         "        \"valid-lifetime\": 40\n"
         "      }\n"