diff --git a/src/firewall/Firewall.cpp b/src/firewall/Firewall.cpp
index f95ed39..345747d 100644
--- a/src/firewall/Firewall.cpp
+++ b/src/firewall/Firewall.cpp
@@ -67,17 +67,17 @@
         if (nodeSchemaPath == nodepaths::ace_comment) {
             // We will use the ACE name as a comment inside the rule. However, the comment must be at the end, so we
             // save it for later.
-            comment = velia::utils::getValueAsString(node);
+            comment = velia::utils::asString(node);
         } else if (nodeSchemaPath == nodepaths::ipv4_matches) {
             // Here we save the ip we're matching against.
-            match = " ip saddr "s + velia::utils::getValueAsString(node);
+            match = " ip saddr "s + velia::utils::asString(node);
         } else if (nodeSchemaPath == nodepaths::ipv6_matches) {
             // Here we save the ip we're matching against.
-            match = " ip6 saddr "s + velia::utils::getValueAsString(node);
+            match = " ip6 saddr "s + velia::utils::asString(node);
         } else if (nodeSchemaPath == nodepaths::action) {
             // Action is the last statement we get, so this is where we create the actual rule.
             ss << "add rule inet filter acls" << match;
-            auto action = velia::utils::getValueAsString(node);
+            auto action = velia::utils::asString(node);
             if (action == "ietf-access-control-list:accept") {
                 ss << " accept";
             } else if (action == "ietf-access-control-list:drop") {
diff --git a/src/system/Authentication.cpp b/src/system/Authentication.cpp
index 460e53c..1d8861e 100644
--- a/src/system/Authentication.cpp
+++ b/src/system/Authentication.cpp
@@ -281,8 +281,8 @@
     sysrepo::RpcActionCb changePasswordCb = [this, changePassword] (auto, auto, auto, auto input, auto, auto, auto output) {
 
         auto userNode = utils::getUniqueSubtree(input, authentication_container + "/users").value();
-        auto name = utils::getValueAsString(utils::getUniqueSubtree(userNode, "name").value());
-        auto password = utils::getValueAsString(utils::getUniqueSubtree(userNode, "change-password/password-cleartext").value());
+        auto name = utils::asString(utils::getUniqueSubtree(userNode, "name").value());
+        auto password = utils::asString(utils::getUniqueSubtree(userNode, "change-password/password-cleartext").value());
         m_log->debug("Changing password for {}", name);
         try {
             changePassword(name, password, m_etc_shadow);
@@ -300,8 +300,8 @@
     sysrepo::RpcActionCb addKeyCb = [this] (auto, auto, auto, auto input, auto, auto, auto output) {
 
         auto userNode = utils::getUniqueSubtree(input, authentication_container + "/users").value();
-        auto name = utils::getValueAsString(utils::getUniqueSubtree(userNode, "name").value());
-        auto key = utils::getValueAsString(utils::getUniqueSubtree(userNode, "add-authorized-key/key").value());
+        auto name = utils::asString(utils::getUniqueSubtree(userNode, "name").value());
+        auto key = utils::asString(utils::getUniqueSubtree(userNode, "add-authorized-key/key").value());
         m_log->debug("Adding key for {}", name);
         try {
             addKey(name, key);
@@ -318,8 +318,8 @@
 
     sysrepo::RpcActionCb removeKeyCb = [this] (auto, auto, auto, auto input, auto, auto, auto output) {
         auto userNode = utils::getUniqueSubtree(input, authentication_container + "/users").value();
-        auto name = utils::getValueAsString(utils::getUniqueSubtree(userNode, "name").value());
-        auto key = std::stol(utils::getValueAsString(utils::getUniqueSubtree(userNode, "authorized-keys/index").value()));
+        auto name = utils::asString(utils::getUniqueSubtree(userNode, "name").value());
+        auto key = std::stol(utils::asString(utils::getUniqueSubtree(userNode, "authorized-keys/index").value()));
         m_log->debug("Removing key for {}", name);
         try {
             removeKey(name, key);
diff --git a/src/system/Firmware.cpp b/src/system/Firmware.cpp
index 4b5956c..b1808e4 100644
--- a/src/system/Firmware.cpp
+++ b/src/system/Firmware.cpp
@@ -82,7 +82,7 @@
         auto lock = updateSlotStatus();
 
         try {
-            auto source = utils::getValueAsString(*input.findPath("url"));
+            auto source = utils::asString(*input.findPath("url"));
             m_rauc->install(source);
         } catch (sdbus::Error& e) {
             m_log->warn("RAUC install error: '{}'", e.what());
@@ -95,7 +95,7 @@
     m_srSubscribeRPC = m_srSessionRPC.onRPCAction(CZECHLIGHT_SYSTEM_FIRMWARE_MODULE_PREFIX + "installation/install", cbRPC);
 
     ::sysrepo::RpcActionCb markSlotAs = [this](auto, auto, auto path, auto input, auto, auto, auto) {
-        auto bootName = utils::getValueAsString(*input.parent()->findPath("name"));
+        auto bootName = utils::asString(*input.parent()->findPath("name"));
         std::string action;
         if (path == CZECHLIGHT_SYSTEM_FIRMWARE_MODULE_PREFIX + "firmware-slot/set-active-after-reboot") {
             action = "active";
diff --git a/src/system/IETFInterfacesConfig.cpp b/src/system/IETFInterfacesConfig.cpp
index ab42481..91136a9 100644
--- a/src/system/IETFInterfacesConfig.cpp
+++ b/src/system/IETFInterfacesConfig.cpp
@@ -52,7 +52,7 @@
     const auto xpath = "ietf-ip:" + proto + "/enabled";
 
     if (auto node = velia::utils::getUniqueSubtree(linkEntry, xpath)) {
-        return velia::utils::getValueAsString(node.value()) == "true"s;
+        return velia::utils::asString(node.value()) == "true"s;
     }
 
     return false;
@@ -93,10 +93,10 @@
         for (const auto& linkEntry : linkEntries) {
             std::map<std::string, std::vector<std::string>> configValues;
 
-            auto linkName = utils::getValueAsString(utils::getUniqueSubtree(linkEntry, "name").value());
+            auto linkName = utils::asString(utils::getUniqueSubtree(linkEntry, "name").value());
 
             if (auto node = utils::getUniqueSubtree(linkEntry, "description")) {
-                configValues["Network"].push_back("Description="s + utils::getValueAsString(node.value()));
+                configValues["Network"].push_back("Description="s + utils::asString(node.value()));
             }
 
             // if addresses present, generate them...
@@ -110,8 +110,8 @@
                 const auto addresses = linkEntry.findXPath(IPAddressListXPath);
 
                 for (const auto& ipEntry : addresses) {
-                    auto ipAddress = utils::getValueAsString(utils::getUniqueSubtree(ipEntry, "ip").value());
-                    auto prefixLen = utils::getValueAsString(utils::getUniqueSubtree(ipEntry, "prefix-length").value());
+                    auto ipAddress = utils::asString(utils::getUniqueSubtree(ipEntry, "ip").value());
+                    auto prefixLen = utils::asString(utils::getUniqueSubtree(ipEntry, "prefix-length").value());
 
                     spdlog::get("system")->trace("Link {}: address {}/{} configured", linkName, ipAddress, prefixLen);
                     configValues["Network"].push_back("Address="s + ipAddress + "/" + prefixLen);
@@ -123,7 +123,7 @@
             bool isSlave = false;
 
             if (auto node = utils::getUniqueSubtree(linkEntry, "czechlight-network:bridge")) {
-                configValues["Network"].push_back("Bridge="s + utils::getValueAsString(node.value()));
+                configValues["Network"].push_back("Bridge="s + utils::asString(node.value()));
                 isSlave = true;
             }
 
@@ -132,13 +132,13 @@
             }
 
             // network autoconfiguration
-            if (auto node = utils::getUniqueSubtree(linkEntry, "ietf-ip:ipv6/ietf-ip:autoconf/ietf-ip:create-global-addresses"); protocolEnabled(linkEntry, "ipv6") && utils::getValueAsString(node.value()) == "true"s) {
+            if (auto node = utils::getUniqueSubtree(linkEntry, "ietf-ip:ipv6/ietf-ip:autoconf/ietf-ip:create-global-addresses"); protocolEnabled(linkEntry, "ipv6") && utils::asString(node.value()) == "true"s) {
                 configValues["Network"].push_back("IPv6AcceptRA=true");
             } else {
                 configValues["Network"].push_back("IPv6AcceptRA=false");
             }
 
-            if (auto node = utils::getUniqueSubtree(linkEntry, "ietf-ip:ipv4/czechlight-network:dhcp-client"); protocolEnabled(linkEntry, "ipv4") && utils::getValueAsString(node.value()) == "true"s) {
+            if (auto node = utils::getUniqueSubtree(linkEntry, "ietf-ip:ipv4/czechlight-network:dhcp-client"); protocolEnabled(linkEntry, "ipv4") && utils::asString(node.value()) == "true"s) {
                 configValues["Network"].push_back("DHCP=ipv4");
             } else {
                 configValues["Network"].push_back("DHCP=no");
diff --git a/src/system/JournalUpload.cpp b/src/system/JournalUpload.cpp
index e3c20e9..50239ff 100644
--- a/src/system/JournalUpload.cpp
+++ b/src/system/JournalUpload.cpp
@@ -29,7 +29,7 @@
     std::string url;
 
     auto hostNode = data->findPath(UPLOAD_URL_CONTAINER + "/host"s);
-    auto hostValue = velia::utils::getValueAsString(*hostNode);
+    auto hostValue = velia::utils::asString(*hostNode);
     auto isIpv6 = hostNode->asTerm().valueType().internalPluginId().find("ipv6") != std::string::npos;
 
     url += data->findPath(UPLOAD_URL_CONTAINER + "/protocol"s)->asTerm().valueStr();
diff --git a/src/system/LED.cpp b/src/system/LED.cpp
index 35ac43d..18ec7b2 100644
--- a/src/system/LED.cpp
+++ b/src/system/LED.cpp
@@ -54,7 +54,7 @@
     m_srSubscribe = m_srSession.onRPCAction(
         CZECHLIGHT_SYSTEM_LEDS_MODULE_PREFIX + "uid",
         [this, uidMaxBrightness, triggerFile, brightnessFile](auto session, auto, auto, auto input, auto, auto, auto) {
-            std::string val = utils::getValueAsString(utils::getUniqueSubtree(input, CZECHLIGHT_SYSTEM_LEDS_MODULE_PREFIX + "uid/state").value());
+            std::string val = utils::asString(utils::getUniqueSubtree(input, CZECHLIGHT_SYSTEM_LEDS_MODULE_PREFIX + "uid/state").value());
 
             try {
                 if (val == "on") {
diff --git a/src/utils/libyang.cpp b/src/utils/libyang.cpp
index 79a5e86..800cfe0 100644
--- a/src/utils/libyang.cpp
+++ b/src/utils/libyang.cpp
@@ -5,7 +5,7 @@
 
 namespace velia::utils {
 
-std::string getValueAsString(const libyang::DataNode& node)
+std::string asString(const libyang::DataNode& node)
 {
     if (node.schema().nodeType() != libyang::NodeType::Leaf) {
         throw std::logic_error("retrieveString: invalid node");
diff --git a/src/utils/libyang.h b/src/utils/libyang.h
index e91e82b..b337e5c 100644
--- a/src/utils/libyang.h
+++ b/src/utils/libyang.h
@@ -22,7 +22,7 @@
  * @param node A libyang data node. Mustn't be nullptr. Must be a leaf.
  *
  */
-std::string getValueAsString(const libyang::DataNode& node);
+std::string asString(const libyang::DataNode& node);
 
 /** @brief Gets exactly one node based on `path` starting from `start`. Uses findXPath, so it works even with lists with
  * missing predicates.
diff --git a/tests/sysrepo_ietf-hardware.cpp b/tests/sysrepo_ietf-hardware.cpp
index 003f593..050d5c2 100644
--- a/tests/sysrepo_ietf-hardware.cpp
+++ b/tests/sysrepo_ietf-hardware.cpp
@@ -46,7 +46,7 @@
     auto directLeafNodeQuery = [&](const std::string& xpath) {
         auto val = client.getData(xpath);
         REQUIRE(val);
-        return velia::utils::getValueAsString(*val->findPath(xpath));
+        return velia::utils::asString(*val->findPath(xpath));
     };
 
     auto sysfsTempCpu = std::make_shared<FakeHWMon>();
