blob: a17bb82635f91610cb9bb86d1caa92e8fb0da169 [file] [log] [blame]
Lei YU9b21efc2019-02-21 15:52:53 +08001#pragma once
2
3#include "activation.hpp"
4
5namespace openpower
6{
7namespace software
8{
9namespace updater
10{
11
12class RedundancyPriorityUbi : public RedundancyPriority
13{
14 public:
15 using RedundancyPriority::RedundancyPriority;
16 virtual ~RedundancyPriorityUbi() = default;
17
18 /** @brief Overloaded Priority property set function
19 *
20 * @param[in] value - uint8_t
21 *
22 * @return Success or exception thrown
23 */
24 uint8_t priority(uint8_t value) override;
25};
26
27/** @class ActivationUbi
28 * @brief OpenBMC activation software management implementation.
29 * @details A concrete implementation for
30 * xyz.openbmc_project.Software.Activation DBus API.
31 */
32class ActivationUbi : public Activation
33{
34 public:
35 using Activation::Activation;
36 virtual ~ActivationUbi() = default;
37
38 /** @brief Overloaded Activation property setter function
39 *
40 * @param[in] value - One of Activation::Activations
41 *
42 * @return Success or exception thrown
43 */
44 Activations activation(Activations value) override;
45
46 RequestedActivations
47 requestedActivation(RequestedActivations value) override;
48
49 private:
50 /** @brief Tracks whether the read-only & read-write volumes have been
51 *created as part of the activation process. **/
52 bool ubiVolumesCreated = false;
53
54 void unitStateChange(sdbusplus::message::message& msg) override;
55 void startActivation() override;
56 void finishActivation() override;
57};
58
59} // namespace updater
60} // namespace software
61} // namespace openpower