Commit 250a2bb1 authored by Thomas Markwalder's avatar Thomas Markwalder

[3358] Addressed review comments.

Added the constant D2ClientConfig::DFT_ALWAYS_INCLUDE_FQDN
parent a8560aef
......@@ -27,6 +27,7 @@ const char *D2ClientConfig::DFT_SERVER_IP = "127.0.0.1";
const size_t D2ClientConfig::DFT_SERVER_PORT = 53001;
const char *D2ClientConfig::DFT_NCR_PROTOCOL = "UDP";
const char *D2ClientConfig::DFT_NCR_FORMAT = "JSON";
const bool D2ClientConfig::DFT_ALWAYS_INCLUDE_FQDN = false;
const bool D2ClientConfig::DFT_OVERRIDE_NO_UPDATE = false;
const bool D2ClientConfig::DFT_OVERRIDE_CLIENT_UPDATE = false;
const bool D2ClientConfig::DFT_REPLACE_CLIENT_NAME = false;
......
......@@ -64,6 +64,7 @@ public:
static const size_t DFT_SERVER_PORT;
static const char *DFT_NCR_PROTOCOL;
static const char *DFT_NCR_FORMAT;
static const bool DFT_ALWAYS_INCLUDE_FQDN;
static const bool DFT_OVERRIDE_NO_UPDATE;
static const bool DFT_OVERRIDE_CLIENT_UPDATE;
static const bool DFT_REPLACE_CLIENT_NAME;
......
......@@ -1301,7 +1301,9 @@ D2ClientConfigParser::build(isc::data::ConstElementPtr client_config) {
DFT_QUALIFYING_SUFFIX);
bool always_include_fqdn = boolean_values_->
getOptionalParam("always-include-fqdn", false);
getOptionalParam("always-include-fqdn",
D2ClientConfig::
DFT_ALWAYS_INCLUDE_FQDN);
bool override_no_update = boolean_values_->
getOptionalParam("override-no-update",
......
......@@ -853,6 +853,8 @@ TEST_F(ParseConfigTest, parserDefaultsD2Config) {
d2_client_config->getNcrProtocol());
EXPECT_EQ(dhcp_ddns::stringToNcrFormat(D2ClientConfig::DFT_NCR_FORMAT),
d2_client_config->getNcrFormat());
EXPECT_EQ(D2ClientConfig::DFT_ALWAYS_INCLUDE_FQDN,
d2_client_config->getAlwaysIncludeFqdn());
EXPECT_EQ(D2ClientConfig::DFT_OVERRIDE_NO_UPDATE,
d2_client_config->getOverrideNoUpdate());
EXPECT_EQ(D2ClientConfig::DFT_OVERRIDE_CLIENT_UPDATE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment