Remove deprecated methods
These methods are no longer used and have been marked as `deprecated`
until 2025-03-30 [1]. This commit removes these methods.
[1]: https://github.com/openbmc/phosphor-host-ipmid/commit/3c1e28e45f7e0b2d5961cd9d2627a5db926dcef9
Change-Id: I47cb37484b29c27250aa6bb3ceafe9b7176dd34d
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/include/ipmid/utils.hpp b/include/ipmid/utils.hpp
index 4547dc0..efc193a 100644
--- a/include/ipmid/utils.hpp
+++ b/include/ipmid/utils.hpp
@@ -188,29 +188,6 @@
sdbusplus::bus_t& bus, const std::string& serviceRoot,
const std::string& interface, const std::string& match = {});
-/** @brief Deletes all the dbus objects from the given service root
- which matches the object identifier.
- * @param[in] bus - DBUS Bus Object.
- * @param[in] serviceRoot - Service root path.
- * @param[in] interface - Dbus interface.
- * @param[in] match - Identifier for object.
- */
-void deleteAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
- const std::string& interface,
- const std::string& match = {})
- __attribute__((deprecated));
-
-/** @brief Gets the ancestor objects of the given object
- which implements the given interface.
- * @param[in] bus - Dbus bus object.
- * @param[in] path - Child Dbus object path.
- * @param[in] interfaces - Dbus interface list.
- * @return map of object path and service info.
- */
-ObjectTree getAllAncestors(sdbusplus::bus_t& bus, const std::string& path,
- InterfaceList&& interfaces)
- __attribute__((deprecated));
-
/********* Begin co-routine yielding alternatives ***************/
/** @brief Get the D-Bus Service name for the input D-Bus path
@@ -352,19 +329,6 @@
return getAllDbusObjects(ctx, serviceRoot, interface, {}, objectTree);
}
-/** @brief Deletes all the D-Bus objects from the given service root
- which matches the object identifier.
- * @param[in] ctx - ipmi::Context::ptr
- * @param[out] ec - boost error code object
- * @param[in] serviceRoot - Service root path.
- * @param[in] interface - D-Bus interface.
- * @param[in] match - Identifier for object.
- */
-boost::system::error_code deleteAllDbusObjects(
- Context::ptr ctx, const std::string& serviceRoot,
- const std::string& interface, const std::string& match = {})
- __attribute__((deprecated));
-
/** @brief Gets all managed objects associated with the given object
* path and service.
* @param[in] ctx - ipmi::Context::ptr
@@ -377,18 +341,6 @@
Context::ptr ctx, const std::string& service, const std::string& objPath,
ObjectValueTree& objects);
-/** @brief Gets the ancestor objects of the given object
- which implements the given interface.
- * @param[in] ctx - ipmi::Context::ptr
- * @param[in] path - Child D-Bus object path.
- * @param[in] interfaces - D-Bus interface list.
- * @param[out] ObjectTree - map of object path and service info.
- * @return - boost error code object
- */
-boost::system::error_code getAllAncestors(
- Context::ptr ctx, const std::string& path, const InterfaceList& interfaces,
- ObjectTree& objectTree) __attribute__((deprecated));
-
/** @brief Gets the value associated with the given object
* and the interface.
* @param[in] ctx - ipmi::Context::ptr
diff --git a/libipmid/utils.cpp b/libipmid/utils.cpp
index 7468cf8..bc70400 100644
--- a/libipmid/utils.cpp
+++ b/libipmid/utils.cpp
@@ -258,61 +258,6 @@
return objectTree;
}
-void deleteAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
- const std::string& interface,
- const std::string& match)
-{
- try
- {
- auto objectTree = getAllDbusObjects(bus, serviceRoot, interface, match);
-
- for (auto& object : objectTree)
- {
- method_no_args::callDbusMethod(bus, object.second.begin()->first,
- object.first, DELETE_INTERFACE,
- "Delete");
- }
- }
- catch (const sdbusplus::exception_t& e)
- {
- lg2::info("sdbusplus exception - Unable to delete the objects, "
- "service: {SERVICE}, interface: {INTERFACE}, error: {ERROR}",
- "SERVICE", serviceRoot, "INTERFACE", interface, "ERROR", e);
- }
-}
-
-static inline std::string convertToString(const InterfaceList& interfaces)
-{
- std::string intfStr;
- for (const auto& intf : interfaces)
- {
- intfStr += "," + intf;
- }
- return intfStr;
-}
-
-ObjectTree getAllAncestors(sdbusplus::bus_t& bus, const std::string& path,
- InterfaceList&& interfaces)
-{
- auto mapperCall = bus.new_method_call(MAPPER_BUS_NAME, MAPPER_OBJ,
- MAPPER_INTF, "GetAncestors");
- mapperCall.append(path, interfaces);
-
- auto mapperReply = bus.call(mapperCall);
- ObjectTree objectTree;
- mapperReply.read(objectTree);
-
- if (objectTree.empty())
- {
- lg2::error("No Object has implemented the interface: {INTERFACE}, "
- "path: {PATH}",
- "INTERFACE", convertToString(interfaces), "PATH", path);
- elog<InternalFailure>();
- }
-
- return objectTree;
-}
-
namespace method_no_args
{
@@ -474,37 +419,6 @@
return ec;
}
-boost::system::error_code deleteAllDbusObjects(
- Context::ptr ctx, const std::string& serviceRoot,
- const std::string& interface, const std::string& match)
-{
- ObjectTree objectTree;
- boost::system::error_code ec =
- getAllDbusObjects(ctx, serviceRoot, interface, match, objectTree);
- if (ec)
- {
- return ec;
- }
-
- for (auto& object : objectTree)
- {
- ctx->bus->yield_method_call(ctx->yield, ec,
- object.second.begin()->first, object.first,
- DELETE_INTERFACE, "Delete");
- if (ec)
- {
- lg2::error("Failed to delete all objects, service: {SERVICE}, "
- "interface: {INTERFACE}, NetFn: {NETFN}, "
- "Cmd: {CMD}, Error: {ERROR}",
- "SERVICE", serviceRoot, "INTERFACE", interface, "NETFN",
- lg2::hex, ctx->netFn, "CMD", lg2::hex, ctx->cmd, "ERROR",
- ec.message());
- break;
- }
- }
- return ec;
-}
-
boost::system::error_code getManagedObjects(
Context::ptr ctx, const std::string& service, const std::string& objPath,
ObjectValueTree& objects)
@@ -516,33 +430,6 @@
return ec;
}
-boost::system::error_code getAllAncestors(
- Context::ptr ctx, const std::string& path, const InterfaceList& interfaces,
- ObjectTree& objectTree)
-{
- std::string interfaceList = convertToString(interfaces);
-
- boost::system::error_code ec;
- objectTree = ctx->bus->yield_method_call<ObjectTree>(
- ctx->yield, ec, MAPPER_BUS_NAME, MAPPER_OBJ, MAPPER_INTF,
- "GetAncestors", path, interfaceList);
-
- if (ec)
- {
- return ec;
- }
-
- if (objectTree.empty())
- {
- lg2::error("No Object has implemented the interface: {INTERFACE}, "
- "path: {PATH}",
- "INTERFACE", interfaceList, "PATH", path);
- elog<InternalFailure>();
- }
-
- return ec;
-}
-
boost::system::error_code callDbusMethod(
Context::ptr ctx, const std::string& service, const std::string& objPath,
const std::string& interface, const std::string& method)