From b573644133d883db9236ba8c353f0408ba4149f1 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 27 Feb 2024 17:25:35 +0100 Subject: [PATCH] Remove obsolete SuperNode::getConfigUri() Signed-off-by: Steffen Vogel --- include/villas/config_class.hpp | 2 +- include/villas/super_node.hpp | 6 +----- lib/api/requests/restart.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/villas/config_class.hpp b/include/villas/config_class.hpp index a0b42f268..66ff7f1c7 100644 --- a/include/villas/config_class.hpp +++ b/include/villas/config_class.hpp @@ -90,7 +90,7 @@ public: json_t *load(const std::string &u, bool resolveIncludes = true, bool resolveEnvVars = true); - std::string &getConfigPath() { return configPath; } + std::string const & getConfigPath() const { return configPath; } }; } // namespace node diff --git a/include/villas/super_node.hpp b/include/villas/super_node.hpp index 69968ece6..b9b72c815 100644 --- a/include/villas/super_node.hpp +++ b/include/villas/super_node.hpp @@ -67,8 +67,6 @@ protected: struct timespec started; // The time at which the instance has been started. - std::string uri; // URI of configuration - Config config; // The configuration file. public: @@ -143,9 +141,7 @@ public: json_t *getConfig() { return config.root; } - std::string &getConfigPath() { return config.getConfigPath(); } - - std::string getConfigUri() const { return uri; } + const std::string &getConfigPath() const { return config.getConfigPath(); } int getAffinity() const { return affinity; } diff --git a/lib/api/requests/restart.cpp b/lib/api/requests/restart.cpp index f470bbda4..15b68f063 100644 --- a/lib/api/requests/restart.cpp +++ b/lib/api/requests/restart.cpp @@ -78,7 +78,7 @@ public: throw BadRequest("Parameter 'config' must be either a URL (string) or " "a configuration (object)"); } else // If no config is provided via request, we will use the previous one - configUri = session->getSuperNode()->getConfigUri(); + configUri = session->getSuperNode()->getConfigPath(); logger->info("Restarting to {}", configUri);