]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1041] Renamed status get handler in HA
authorMarcin Siodelski <marcin@isc.org>
Fri, 13 Dec 2019 10:55:19 +0000 (11:55 +0100)
committerMarcin Siodelski <marcin@isc.org>
Fri, 13 Dec 2019 16:01:00 +0000 (17:01 +0100)
The new name is processStatusGet instead of generic commandProcessed

src/hooks/dhcp/high_availability/ha_impl.cc
src/hooks/dhcp/high_availability/ha_service.cc
src/hooks/dhcp/high_availability/ha_service.h
src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc

index dd1ebe7a6a5f3e11ca871d76a7c73224a4a89d43..78fcd62d25a757d11afc61b358e6d7118d2a6ed1 100644 (file)
@@ -277,7 +277,7 @@ HAImpl::commandProcessed(hooks::CalloutHandle& callout_handle) {
         // Add the ha servers info to arguments.
         ElementPtr mutable_resp_args =
             boost::const_pointer_cast<Element>(resp_args);
-        ConstElementPtr ha_servers = service_->commandProcessed();
+        ConstElementPtr ha_servers = service_->processStatusGet();
         mutable_resp_args->set("ha-servers", ha_servers);
     }
 }
index 628f632d0af8ab309d7638bcc70ff4174c2b007e..0014baf09d9dd3e616576e9216bbe583209600e4 100644 (file)
@@ -953,7 +953,7 @@ HAService::logFailedLeaseUpdates(const PktPtr& query,
 }
 
 ConstElementPtr
-HAService::commandProcessed() const {
+HAService::processStatusGet() const {
     ElementPtr ha_servers = Element::createMap();
 
     // Local part
index 96f73d5aa08453949c51c92986cf92115bd29008..e5fe3eb717f828310307416c346fb3978803371b 100644 (file)
@@ -511,7 +511,7 @@ public:
     ///
     /// @c HAImpl::commandProcessed calls this to add HA servers info
     /// into the status-get response.
-    data::ConstElementPtr commandProcessed() const;
+    data::ConstElementPtr processStatusGet() const;
 
 protected:
 
index 5ed46ddd3e5e8aea76fc79bf012ff2659cc0bc44..80d349172faf6e0a65a7ab5db8fce55271e48df5 100644 (file)
@@ -1066,7 +1066,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisPrimary) {
     service.runModel(HAService::NOP_EVT);
 
     // Check the reported info about servers.
-    ConstElementPtr ha_servers = service.commandProcessed();
+    ConstElementPtr ha_servers = service.processStatusGet();
     ASSERT_TRUE(ha_servers);
     std::string expected = "{ "
         "\"local\": { \"role\": \"primary\", "
@@ -1104,7 +1104,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisStandby) {
     TestHAService service(io_service_, network_state_, config_storage);
 
     // Check the reported info about servers.
-    ConstElementPtr ha_servers = service.commandProcessed();
+    ConstElementPtr ha_servers = service.processStatusGet();
     ASSERT_TRUE(ha_servers);
     std::string expected = "{ "
         "\"local\": { \"role\": \"standby\", "
@@ -3044,7 +3044,7 @@ TEST_F(HAServiceStateMachineTest, waitingParterDownLoadBalancingPartnerDown) {
     ASSERT_FALSE(isFailureDetected());
 
     // Check the reported info about servers.
-    ConstElementPtr ha_servers = service_->commandProcessed();
+    ConstElementPtr ha_servers = service_->processStatusGet();
     ASSERT_TRUE(ha_servers);
     std::cout << ha_servers->str() << "\n";
     std::string expected = "{ "