2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 07:55:18 +00:00

[#549] address review comments

This commit is contained in:
Andrei Pavel
2023-04-19 22:06:36 +03:00
parent 416e2d888c
commit c1bc73e9cf
6 changed files with 11 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2017-2022 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // 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 // License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -174,7 +174,7 @@ parseCommand(ConstElementPtr& arg, ConstElementPtr command) {
} }
if (command->getType() != Element::map) { if (command->getType() != Element::map) {
isc_throw(CtrlChannelError, "invalid command: expected toplevel entry to be a map, got " isc_throw(CtrlChannelError, "invalid command: expected toplevel entry to be a map, got "
<< Element::typeToName(command->getType()) << " instead"); << Element::typeToName(command->getType()) << " instead");
} }
if (!command->contains(CONTROL_COMMAND)) { if (!command->contains(CONTROL_COMMAND)) {
isc_throw(CtrlChannelError, isc_throw(CtrlChannelError,
@@ -196,8 +196,8 @@ parseCommand(ConstElementPtr& arg, ConstElementPtr command) {
ConstElementPtr cmd = command->get(CONTROL_COMMAND); ConstElementPtr cmd = command->get(CONTROL_COMMAND);
if (cmd->getType() != Element::string) { if (cmd->getType() != Element::string) {
isc_throw(CtrlChannelError, "invalid command: expected '" isc_throw(CtrlChannelError, "invalid command: expected '"
<< CONTROL_COMMAND << "' to be a string, got " << CONTROL_COMMAND << "' to be a string, got "
<< Element::typeToName(command->getType()) << " instead"); << Element::typeToName(command->getType()) << " instead");
} }
arg = command->get(CONTROL_ARGUMENTS); arg = command->get(CONTROL_ARGUMENTS);
@@ -282,5 +282,5 @@ combineCommandsLists(const ConstElementPtr& response1,
} }
} }
} } // namespace config
} } // namespace isc

View File

@@ -559,7 +559,7 @@ private:
PgSqlHostDataSourceImplPtr impl_; PgSqlHostDataSourceImplPtr impl_;
}; };
} } // namespace dhcp
} } // namespace isc
#endif // PGSQL_HOST_DATA_SOURCE_H #endif // PGSQL_HOST_DATA_SOURCE_H

View File

@@ -698,9 +698,6 @@ public:
return (false); return (false);
} }
void update(HostPtr const&) {
}
std::string getType() const { std::string getType() const {
return ("one"); return ("one");
} }
@@ -996,4 +993,4 @@ TEST_F(NegativeCacheTest, get6withNegativeCaching) {
testGet6(); testGet6();
} }
}; // end of anonymous namespace } // namespace

View File

@@ -5,7 +5,7 @@
"This command adds a new host reservation. The reservation may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more." "This command adds a new host reservation. The reservation may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more."
], ],
"cmd-comment": [ "cmd-comment": [
"Note that ip-address, client-id, next-server, server-hostname, and boot-file-name are IPv4-specific. ip-addresses, and prefixes are IPv6-specific." "Note that boot-file-name, circuit-id, client-id, ip-address, next-server, and server-hostname are IPv4-specific. ip-addresses, and prefixes are IPv6-specific."
], ],
"cmd-syntax": [ "cmd-syntax": [
"{", "{",

View File

@@ -5,7 +5,7 @@
"This command updates an existing host reservation. The reservation has to include host identifiers and a subnet identifier and may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more." "This command updates an existing host reservation. The reservation has to include host identifiers and a subnet identifier and may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more."
], ],
"cmd-comment": [ "cmd-comment": [
"Note that ip-address, client-id, next-server, server-hostname, and boot-file-name are IPv4-specific. ip-addresses, and prefixes are IPv6-specific." "Note that boot-file-name, circuit-id, client-id, ip-address, next-server, and server-hostname are IPv4-specific. ip-addresses, and prefixes are IPv6-specific."
], ],
"cmd-syntax": [ "cmd-syntax": [
"{", "{",