Fix problem requiring two Delete calls to remove an image
- Remove Delete inheritance and method from Version object.
- Add Delete inheritance and method to Activation object.
- Add a listener in the image Manager for deleted Versions and remove
its 'backup' copy of the Version.
Resolves openbmc/openbmc#2086
Change-Id: If41783319cf1ff5b840b747ba457d0570bc52918
Signed-off-by: Eddie James <eajames@us.ibm.com>
diff --git a/activation.hpp b/activation.hpp
index d22ed91..cf4b5c2 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -6,6 +6,7 @@
#include "xyz/openbmc_project/Software/RedundancyPriority/server.hpp"
#include "xyz/openbmc_project/Software/ActivationProgress/server.hpp"
#include "org/openbmc/Associations/server.hpp"
+#include "xyz/openbmc_project/Object/Delete/server.hpp"
namespace phosphor
{
@@ -18,7 +19,8 @@
std::vector<std::tuple<std::string, std::string, std::string>>;
using ActivationInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Software::server::Activation,
- sdbusplus::org::openbmc::server::Associations>;
+ sdbusplus::org::openbmc::server::Associations,
+ sdbusplus::xyz::openbmc_project::Object::server::Delete>;
using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Software::server::ActivationBlocksTransition>;
using RedundancyPriorityInherit = sdbusplus::server::object::object<
@@ -263,6 +265,11 @@
*/
void unsubscribeFromSystemdSignals();
+ /**
+ * @brief delete the d-bus object.
+ */
+ void delete_() override;
+
/** @brief Persistent sdbusplus DBus bus connection */
sdbusplus::bus::bus& bus;