Remove TimeOwner Feature
The TimeOwner feature is confusing from feedback from the community and
hence removing the feature.
Remove the TimeOwner feature in the phosphor-time-manager repo and
needed settings objects.
Tested: Manually set the date time on the web and successfully update
the date time of BMC (eg: 2020/01/01 08:07:50).
busctrl get-property xyz.openbmc_project.Time.Manager
/xyz/openbmc_project/time/bmc
xyz.openbmc_project.Time.EpochTime Elapsed
t 1577837156385836
Refer: https://lists.ozlabs.org/pipermail/openbmc/2020-April/021409.html
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id47eb0a03e0e94eeff29d2b77dccefb89cded7b8
diff --git a/manager.hpp b/manager.hpp
index 0c672fa..2d5d131 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -61,15 +61,9 @@
/** @brief The requested time mode when host is on*/
std::string requestedMode;
- /** @brief The requested time owner when host is on*/
- std::string requestedOwner;
-
/** @brief The current time mode */
Mode timeMode = DEFAULT_TIME_MODE;
- /** @brief The current time owner */
- Owner timeOwner = DEFAULT_TIME_OWNER;
-
/** @brief Restore saved settings */
void restoreSettings();
@@ -96,15 +90,6 @@
*/
bool setCurrentTimeMode(const std::string& mode);
- /** @brief Set current time owner from the time owner string
- *
- * @param[in] owner - The string of time owner
- *
- * @return - true if the owner is updated
- * false if it's the same as before
- */
- bool setCurrentTimeOwner(const std::string& owner);
-
/** @brief Called on time mode is changed
*
* Notify listeners that time mode is changed and update ntp setting
@@ -113,12 +98,6 @@
*/
void onTimeModeChanged(const std::string& mode);
- /** @brief Called on time owner is changed
- *
- * Notify listeners that time owner is changed
- */
- void onTimeOwnerChanged();
-
/** @brief Callback to handle change in a setting
*
* @param[in] msg - sdbusplus dbusmessage
@@ -146,7 +125,7 @@
*/
void onHostState(bool on);
- /** @brief Set the property as requested time mode/owner
+ /** @brief Set the property as requested time mode
*
* @param[in] key - The property name
* @param[in] value - The property value
@@ -161,13 +140,6 @@
*/
void setRequestedMode(const std::string& mode);
- /** @brief Set the current owner to user requested one
- * if conditions allow it
- *
- * @param[in] owner - The string of time owner
- */
- void setRequestedOwner(const std::string& owner);
-
/** @brief Update the NTP setting to systemd time service
*
* @param[in] value - The time mode value, e.g. "NTP" or "MANUAL"
@@ -186,9 +158,6 @@
/** @brief The string of time mode property */
static constexpr auto PROPERTY_TIME_MODE = "TimeSyncMethod";
- /** @brief The string of time owner property */
- static constexpr auto PROPERTY_TIME_OWNER = "TimeOwner";
-
using Updater = std::function<void(const std::string&)>;
/** @brief Map the property string to functions that shall
@@ -196,23 +165,15 @@
*/
const std::map<std::string, Updater> propertyUpdaters = {
{PROPERTY_TIME_MODE,
- std::bind(&Manager::setCurrentTimeMode, this, std::placeholders::_1)},
- {PROPERTY_TIME_OWNER, std::bind(&Manager::setCurrentTimeOwner, this,
- std::placeholders::_1)}};
+ std::bind(&Manager::setCurrentTimeMode, this, std::placeholders::_1)}};
/** @brief The properties that manager shall notify the
* listeners when changed
*/
static const std::set<std::string> managedProperties;
- /** @brief The map that maps the string to Owners */
- static const std::map<std::string, Owner> ownerMap;
-
/** @brief The file name of saved time mode */
static constexpr auto modeFile = "/var/lib/obmc/saved_time_mode";
-
- /** @brief The file name of saved time owner */
- static constexpr auto ownerFile = "/var/lib/obmc/saved_time_owner";
};
} // namespace time