Browse Source

[trac3808] Updates per review comments

Shawn Routhier 10 years ago
parent
commit
05b30e4040

+ 2 - 2
src/bin/d2/d2_log.cc

@@ -21,8 +21,8 @@ namespace d2 {
 
 /// @brief Defines the logger used within D2.
 isc::log::Logger dctl_logger("dhcpddns");
-isc::log::Logger dhcp_to_d2_logger("dchp_to_d2");
-isc::log::Logger d2_to_dns_logger("d2_to_dns");
+isc::log::Logger dhcp_to_d2_logger("dchp-to-d2");
+isc::log::Logger d2_to_dns_logger("d2-to-dns");
 
 } // namespace d2
 } // namespace isc

+ 4 - 2
src/bin/d2/nc_trans.h

@@ -441,8 +441,10 @@ public:
 
     /// @brief Fetches the request id that identifies this transaction.
     ///
-    /// This is a wrapper around getRequestID which currently returns DHCID
-    /// in the future we may include a distinct request id.
+    /// This is a wrapper around getRequestId from the NCR which currently
+    /// returns DHCID. In the future we may include a distinct request id.
+    /// The primary purpose of this function is to provide a consistent way
+    /// to identify requests for logging purposes.
     ///
     /// @return a string with the the request's request ID (currently DHCID)
     std::string getRequestId() const;

+ 1 - 1
src/bin/d2/tests/nc_trans_unittests.cc

@@ -452,7 +452,7 @@ TEST(NameChangeTransaction, construction) {
 }
 
 /// @brief General testing of member accessors.
-/// Most if not all of these are also tested as a byproduct off larger tests.
+/// Most if not all of these are also tested as a byproduct of larger tests.
 TEST_F(NameChangeTransactionTest, accessors) {
     NameChangeStubPtr name_change;
     ASSERT_NO_THROW(name_change = makeCannedTransaction());

+ 3 - 1
src/lib/dhcp_ddns/ncr_msg.h

@@ -588,7 +588,9 @@ public:
     /// @todo Currently this is the DHCID, in the future we may add a unique ID per
     /// request to allow for correlating messages and events between the DHCP servers
     /// and the D2 server.  If we do that we shall also need to add or update other
-    /// functions to: set the request ID, add it to the JSON strings, etc.
+    /// functions to: set the request ID, add it to the JSON strings, etc.  The
+    /// primary purpose of this function is to provide a consistent way to identify
+    /// requests for logging purposes.
     ///
     /// @return a string with the the request's request ID (currently DHCID)
     std::string getRequestId() const {

+ 1 - 1
src/lib/dhcp_ddns/tests/ncr_unittests.cc

@@ -493,7 +493,7 @@ TEST(NameChangeRequestTest, basicJsonTest) {
 
     // Verify that the request ID matches the string from the DHCID.
     std::string dhcid_str = "010203040A7F8E3D";
-    EXPECT_EQ(ncr->getRequestId(), dhcid_str);
+    EXPECT_EQ(dhcid_str, ncr->getRequestId());
 }
 
 /// @brief Tests a variety of invalid JSON message strings.