Commit 7efc0e2e authored by Marcin Siodelski's avatar Marcin Siodelski

[#1041] Renamed status get handler in HA

The new name is processStatusGet instead of generic commandProcessed
parent 104b3361
...@@ -277,7 +277,7 @@ HAImpl::commandProcessed(hooks::CalloutHandle& callout_handle) { ...@@ -277,7 +277,7 @@ HAImpl::commandProcessed(hooks::CalloutHandle& callout_handle) {
// Add the ha servers info to arguments. // Add the ha servers info to arguments.
ElementPtr mutable_resp_args = ElementPtr mutable_resp_args =
boost::const_pointer_cast<Element>(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); mutable_resp_args->set("ha-servers", ha_servers);
} }
} }
......
...@@ -953,7 +953,7 @@ HAService::logFailedLeaseUpdates(const PktPtr& query, ...@@ -953,7 +953,7 @@ HAService::logFailedLeaseUpdates(const PktPtr& query,
} }
ConstElementPtr ConstElementPtr
HAService::commandProcessed() const { HAService::processStatusGet() const {
ElementPtr ha_servers = Element::createMap(); ElementPtr ha_servers = Element::createMap();
// Local part // Local part
......
...@@ -511,7 +511,7 @@ public: ...@@ -511,7 +511,7 @@ public:
/// ///
/// @c HAImpl::commandProcessed calls this to add HA servers info /// @c HAImpl::commandProcessed calls this to add HA servers info
/// into the status-get response. /// into the status-get response.
data::ConstElementPtr commandProcessed() const; data::ConstElementPtr processStatusGet() const;
protected: protected:
......
...@@ -1066,7 +1066,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisPrimary) { ...@@ -1066,7 +1066,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisPrimary) {
service.runModel(HAService::NOP_EVT); service.runModel(HAService::NOP_EVT);
// Check the reported info about servers. // Check the reported info about servers.
ConstElementPtr ha_servers = service.commandProcessed(); ConstElementPtr ha_servers = service.processStatusGet();
ASSERT_TRUE(ha_servers); ASSERT_TRUE(ha_servers);
std::string expected = "{ " std::string expected = "{ "
"\"local\": { \"role\": \"primary\", " "\"local\": { \"role\": \"primary\", "
...@@ -1104,7 +1104,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisStandby) { ...@@ -1104,7 +1104,7 @@ TEST_F(HAServiceTest, hotStandbyScopeSelectionThisStandby) {
TestHAService service(io_service_, network_state_, config_storage); TestHAService service(io_service_, network_state_, config_storage);
// Check the reported info about servers. // Check the reported info about servers.
ConstElementPtr ha_servers = service.commandProcessed(); ConstElementPtr ha_servers = service.processStatusGet();
ASSERT_TRUE(ha_servers); ASSERT_TRUE(ha_servers);
std::string expected = "{ " std::string expected = "{ "
"\"local\": { \"role\": \"standby\", " "\"local\": { \"role\": \"standby\", "
...@@ -3044,7 +3044,7 @@ TEST_F(HAServiceStateMachineTest, waitingParterDownLoadBalancingPartnerDown) { ...@@ -3044,7 +3044,7 @@ TEST_F(HAServiceStateMachineTest, waitingParterDownLoadBalancingPartnerDown) {
ASSERT_FALSE(isFailureDetected()); ASSERT_FALSE(isFailureDetected());
// Check the reported info about servers. // Check the reported info about servers.
ConstElementPtr ha_servers = service_->commandProcessed(); ConstElementPtr ha_servers = service_->processStatusGet();
ASSERT_TRUE(ha_servers); ASSERT_TRUE(ha_servers);
std::cout << ha_servers->str() << "\n"; std::cout << ha_servers->str() << "\n";
std::string expected = "{ " std::string expected = "{ "
......
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