diff options
author | Marcin Siodelski <marcin@isc.org> | 2016-08-24 17:01:48 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2016-08-24 17:01:48 +0200 |
commit | efc9d6ff61fd0b211f94b4ced8b664c949920f95 (patch) | |
tree | b67973bba0a260921073a5e347973d16252cb93a /src | |
parent | [4552] Documented reservations for siaddr, sname and file. (diff) | |
download | kea-efc9d6ff61fd0b211f94b4ced8b664c949920f95.tar.xz kea-efc9d6ff61fd0b211f94b4ced8b664c949920f95.zip |
[4552] Renamed parameter "server-name" to "server-hostname".
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/dhcp4/dhcp4.spec | 2 | ||||
-rw-r--r-- | src/bin/dhcp4/tests/dora_unittest.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/parsers/host_reservation_parser.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/dhcp4/dhcp4.spec b/src/bin/dhcp4/dhcp4.spec index 24cb0d6020..05595c1e5b 100644 --- a/src/bin/dhcp4/dhcp4.spec +++ b/src/bin/dhcp4/dhcp4.spec @@ -515,7 +515,7 @@ "item_default": "0.0.0.0" }, { - "item_name": "server-name", + "item_name": "server-hostname", "item_type": "string", "item_optional": true, "item_default": "" diff --git a/src/bin/dhcp4/tests/dora_unittest.cc b/src/bin/dhcp4/tests/dora_unittest.cc index f1471ebc16..9b0cdb99f2 100644 --- a/src/bin/dhcp4/tests/dora_unittest.cc +++ b/src/bin/dhcp4/tests/dora_unittest.cc @@ -73,7 +73,7 @@ namespace { /// /// - Configuration 6: /// - This configuration provides reservations for next-server, -/// server-name and boot-file-name value. +/// server-hostname and boot-file-name value. /// - 1 subnet: 10.0.0.0/24 /// - 1 reservation for this subnet: /// - Client's HW address: aa:bb:cc:dd:ee:ff @@ -257,7 +257,7 @@ const char* DORA_CONFIGS[] = { " {" " \"hw-address\": \"aa:bb:cc:dd:ee:ff\"," " \"next-server\": \"10.0.0.7\"," - " \"server-name\": \"some-name.example.org\"," + " \"server-hostname\": \"some-name.example.org\"," " \"boot-file-name\": \"bootfile.efi\"" " }" " ]" diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc index 5bf627b3d1..f7e7a24680 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc @@ -50,7 +50,7 @@ getSupportedParams4(const bool identifiers_only = false) { params_set.insert("ip-address"); params_set.insert("option-data"); params_set.insert("next-server"); - params_set.insert("server-name"); + params_set.insert("server-hostname"); params_set.insert("boot-file-name"); } return (identifiers_only ? identifiers_set : params_set); @@ -212,7 +212,7 @@ HostReservationParser4::build(isc::data::ConstElementPtr reservation_data) { } else if (element.first == "next-server") { host_->setNextServer(IOAddress(element.second->stringValue())); - } else if (element.first == "server-name") { + } else if (element.first == "server-hostname") { host_->setServerHostname(element.second->stringValue()); } else if (element.first == "boot-file-name") { diff --git a/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc b/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc index ea634b6b7b..c90e309912 100644 --- a/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc +++ b/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc @@ -300,12 +300,12 @@ TEST_F(HostReservationParserTest, dhcp4NoHostname) { } // This test verifies that the parser can parse reservation entry -// containing next-server, server-name and boot-file-name values for +// containing next-server, server-hostname and boot-file-name values for // DHCPv4 message fields. TEST_F(HostReservationParserTest, dhcp4MessageFields) { std::string config = "{ \"hw-address\": \"1:2:3:4:5:6\"," "\"next-server\": \"192.0.2.11\"," - "\"server-name\": \"some-name.example.org\"," + "\"server-hostname\": \"some-name.example.org\"," "\"boot-file-name\": \"/tmp/some-file.efi\" }"; ElementPtr config_element = Element::fromJSON(config); |