diff options
author | Eddie James <eajames@us.ibm.com> | 2017-09-01 11:51:28 -0500 |
---|---|---|
committer | Edward A. James <eajames@us.ibm.com> | 2017-10-12 10:03:30 -0500 |
commit | fa5daf446fd5c8edcc6e8a43364f97aaed99e787 (patch) | |
tree | feb4bfa4b61f14e152c15ef848bfeed39788af02 | |
parent | 2308b8bfaf1307c76c2a50984047a71fdaff7e53 (diff) | |
download | openpower-pnor-code-mgmt-fa5daf446fd5c8edcc6e8a43364f97aaed99e787.tar.gz openpower-pnor-code-mgmt-fa5daf446fd5c8edcc6e8a43364f97aaed99e787.zip |
remove Delete from Version
- Since the Activation object inherits Delete and implements a Delete
method, we don't need to do so for the Version object.
Change-Id: I1da26c3475872c1324a25b92ad8891ff8d3cabbc
Signed-off-by: Eddie James <eajames@us.ibm.com>
-rw-r--r-- | item_updater.cpp | 6 | ||||
-rw-r--r-- | version.cpp | 5 | ||||
-rw-r--r-- | version.hpp | 18 |
3 files changed, 4 insertions, 25 deletions
diff --git a/item_updater.cpp b/item_updater.cpp index 5ef6bd03e..9e558ce29 100644 --- a/item_updater.cpp +++ b/item_updater.cpp @@ -138,8 +138,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& m) path, version, purpose, - filePath, - *this))); + filePath))); } else { @@ -248,8 +247,7 @@ void ItemUpdater::processPNORImage() path, version, purpose, - "", - *this))); + ""))); } else if (0 == iter.path().native().compare(0, PNOR_RW_PREFIX_LEN, PNOR_RW_PREFIX)) diff --git a/version.cpp b/version.cpp index 8e36071fd..5dbab3508 100644 --- a/version.cpp +++ b/version.cpp @@ -93,11 +93,6 @@ std::map<std::string, std::string> Version::getValue( return keys; } -void Version::delete_() -{ - parent.erase(getId(version())); -} - } // namespace updater } // namespace software } // namespace openpower diff --git a/version.hpp b/version.hpp index d2c0624c6..8cb7e371d 100644 --- a/version.hpp +++ b/version.hpp @@ -2,7 +2,6 @@ #include <sdbusplus/bus.hpp> #include "xyz/openbmc_project/Software/Version/server.hpp" -#include "xyz/openbmc_project/Object/Delete/server.hpp" #include "xyz/openbmc_project/Common/FilePath/server.hpp" namespace openpower @@ -16,7 +15,6 @@ class ItemUpdater; using VersionInherit = sdbusplus::server::object::object< sdbusplus::xyz::openbmc_project::Software::server::Version, - sdbusplus::xyz::openbmc_project::Object::server::Delete, sdbusplus::xyz::openbmc_project::Common::server::FilePath>; /** @class Version @@ -34,16 +32,13 @@ class Version : public VersionInherit * @param[in] versionString - The version string * @param[in] versionPurpose - The version purpose * @param[in] filePath - The image filesystem path - * @param[in] parent - The version's parent */ Version(sdbusplus::bus::bus& bus, const std::string& objPath, const std::string& versionString, VersionPurpose versionPurpose, - const std::string& filePath, - ItemUpdater& parent) : - VersionInherit(bus, (objPath).c_str(), true), - parent(parent) + const std::string& filePath) : + VersionInherit(bus, (objPath).c_str(), true) { // Set properties. purpose(versionPurpose); @@ -78,15 +73,6 @@ class Version : public VersionInherit * @return The id. */ static std::string getId(const std::string& version); - - /** @brief Deletes the D-Bus object and removes image. - * - */ - void delete_() override; - - private: - ItemUpdater& parent; - }; } // namespace updater |