diff --git a/applications/gui/src/ctrl_window.cpp b/applications/gui/src/ctrl_window.cpp index fc82c45838a568efc8b4e8d456cdb3fbbef2c8b4..3681022bd10c832ea2d722b1eb0bd02877b1af4a 100644 --- a/applications/gui/src/ctrl_window.cpp +++ b/applications/gui/src/ctrl_window.cpp @@ -121,7 +121,7 @@ void ControlWindow::_addNode() { } void ControlWindow::_updateDetails() { - node_details_ = ctrl_->getSlaves(); + node_details_ = ctrl_->getControllers(); node_titles_.clear(); for (auto &d : node_details_) { diff --git a/applications/gui/src/screen.cpp b/applications/gui/src/screen.cpp index d0d9944214343699bd04230b07da47799f1f415f..77c4e4318e61e2916fb47ba1f4f7a5ec08760e3b 100644 --- a/applications/gui/src/screen.cpp +++ b/applications/gui/src/screen.cpp @@ -244,7 +244,7 @@ ftl::gui::Screen::Screen(ftl::Configurable *proot, ftl::net::Universe *pnet, ftl //net_->onConnect([this,popup](ftl::net::Peer *p) { { LOG(INFO) << "NET CONNECT"; - auto node_details = ctrl_->getSlaves(); + auto node_details = ctrl_->getControllers(); for (auto &d : node_details) { LOG(INFO) << "ADDING TITLE: " << d.dump(); diff --git a/components/control/cpp/include/ftl/master.hpp b/components/control/cpp/include/ftl/master.hpp index 15d27ab95c4846cc1c19a496a64db06c30c43ef5..641dfa756d7073fcb580429e8af5d74ed2a37091 100644 --- a/components/control/cpp/include/ftl/master.hpp +++ b/components/control/cpp/include/ftl/master.hpp @@ -50,7 +50,7 @@ class Master { std::vector<std::string> getConfigurables(const ftl::UUID &peer); - std::vector<ftl::config::json_t> getSlaves(); + std::vector<ftl::config::json_t> getControllers(); std::vector<ftl::config::json_t> get(const std::string &uri); diff --git a/components/control/cpp/src/master.cpp b/components/control/cpp/src/master.cpp index d59b61b8544ac21567d7b6cddfcc6bba90ed76b4..13bf861570cb021fe7eacc2117d4b4409f053a18 100644 --- a/components/control/cpp/src/master.cpp +++ b/components/control/cpp/src/master.cpp @@ -131,7 +131,7 @@ void Master::set(const ftl::UUID &peer, const string &uri, const json_t &value) net_->send(peer, "update_cfg", uri, value.dump()); } -vector<json_t> Master::getSlaves() { +vector<json_t> Master::getControllers() { auto response = net_->findAll<string>("node_details"); vector<json_t> result; for (auto &r : response) { diff --git a/components/net/cpp/test/net_configurable_unit.cpp b/components/net/cpp/test/net_configurable_unit.cpp index 9452f7cea40b43d2f09917c046f5b6acd5f184cc..e3fef144490f64ce06375ad8226056afd2f5329f 100644 --- a/components/net/cpp/test/net_configurable_unit.cpp +++ b/components/net/cpp/test/net_configurable_unit.cpp @@ -14,7 +14,7 @@ SCENARIO( "NetConfigurable::set()" ) { net->start(); ftl::ctrl::Master *controller = new ftl::ctrl::Master(root, net); - // Set up a slave, then call getSlaves() to get the UUID string + // Set up a slave, then call getControllers() to get the UUID string nlohmann::json jsonSlave = {{"$id", "slave"}, {"test", {{"peers", {"tcp://localhost:7077"}}}}}; ftl::Configurable *rootSlave; rootSlave = new ftl::Configurable(jsonSlave); @@ -24,10 +24,10 @@ SCENARIO( "NetConfigurable::set()" ) { netSlave->waitConnections(); net->waitConnections(); - auto slaves = controller->getSlaves(); - REQUIRE( slaves.size() == 1 ); + auto controllers = controller->getControllers(); + REQUIRE( controllers.size() == 1 ); - ftl::UUID peer = ftl::UUID(slaves[0]["id"].get<std::string>()); + ftl::UUID peer = ftl::UUID(controllers[0]["id"].get<std::string>()); const std::string suri = "slave_test"; nlohmann::json jsonTest = {{"$id", "slave_test"}, {"test", {{"peers", {"tcp://localhost:7077"}}}}}; NetConfigurable nc(peer, suri, *controller, jsonTest);