86d80419 | 12-Jul-2017 |
Lei YU <mine260309@gmail.com> |
Use elog to throw exceptions
Use elog to throw exceptions and update unit tests
Change-Id: I338ded4403b3b559a84da311eda5ee15e712569a Signed-off-by: Lei YU <mine260309@gmail.com> |
57eab124 | 15-Jun-2017 |
Lei YU <mine260309@gmail.com> |
Change default time mode/owner to MANUAL/BOTH
OPAL gets error on setting host time because the default time mode/owner is NTP/BMC, which disallows host to set its time. As discussed and requested by
Change default time mode/owner to MANUAL/BOTH
OPAL gets error on setting host time because the default time mode/owner is NTP/BMC, which disallows host to set its time. As discussed and requested by OPAL, change the default time mode/owner to MANUAL/BOTH.
Change-Id: Ide55f970b66f3025f67ad2ef093a74a3c8f8b8ea Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
ddd54428 | 18-Apr-2017 |
Lei YU <mine260309@gmail.com> |
Implement mode/owner and string conversions
Move Manager::convertToMode() to utils::strToMode(); Move Manager::convertToOwner() to utils::strToOwner(); Add utils::modeToStr() and utils::ownerToStr()
Implement mode/owner and string conversions
Move Manager::convertToMode() to utils::strToMode(); Move Manager::convertToOwner() to utils::strToOwner(); Add utils::modeToStr() and utils::ownerToStr(); Adjust and add unit tests.
Change-Id: Ied35d0e732c477017e1b2db1a3464b0425b12387 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
a5003ceb | 24-Feb-2017 |
Lei YU <mine260309@gmail.com> |
Use gmock on property_change_listener
1. Mock property_change_listener; 2. Make unit test link against gmock 3. Update TestManager to use mocked property change listener. 4. Fix an issue found by th
Use gmock on property_change_listener
1. Mock property_change_listener; 2. Make unit test link against gmock 3. Update TestManager to use mocked property change listener. 4. Fix an issue found by the updated test case, that when the properties are changed during host is on, and changed back to the same as before, when host becomes off, the properties shall remain the same and listeners shall not be notified.
Change-Id: I815b59cb23edfcac910c2a8c26ea5a71e872d92f Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
a741713c | 23-Feb-2017 |
Lei YU <mine260309@gmail.com> |
Invoke SetNTP and UpdateUseNtpField in time manager
1. When time mode is changed, invoke systemd timedate1's SetNTP method to update NTP settings; 2. When settings use_dhcp_ntp property is changed,
Invoke SetNTP and UpdateUseNtpField in time manager
1. When time mode is changed, invoke systemd timedate1's SetNTP method to update NTP settings; 2. When settings use_dhcp_ntp property is changed, invoke NetworkManager's UpdateUseNtpField method to update its setting; 3. Move the common code of getProperty() into utils.hpp
Change-Id: I981e0e9de9c0430282b3364c38c282312bb2be89 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
7b218796 | 08-Feb-2017 |
Lei YU <mine260309@gmail.com> |
Implement HostEpoch set time logic
1. When setting host epoch, follow below logic:
Mode | Owner | Set Host Time ----- | ----- | ------------- NTP | BMC | Not allowed
Implement HostEpoch set time logic
1. When setting host epoch, follow below logic:
Mode | Owner | Set Host Time ----- | ----- | ------------- NTP | BMC | Not allowed NTP | HOST | Not allowed NTP | SPLIT | OK, and just save offset NTP | BOTH | Not allowed MANUAL| BMC | Not allowed MANUAL| HOST | OK, and set time to BMC MANUAL| SPLIT | OK, and just save offset MANUAL| BOTH | OK, and set time to BMC
2. If owner is SPLIT and BMC time is changed, update the offset accordinly; 3. Use timerfd to get notified on BMC time change, and update host time diff accordingly; 4. Add unit test cases.
Change-Id: I2d60a821f7da9b689c579ae7ab672cc37967322c Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
7f4fca55 | 23-Feb-2017 |
Lei YU <mine260309@gmail.com> |
Save properties to persistent storage when host is on
1. When host is on, set properties as requested properties instead of notify listeners; 2. When host becomes off, and requested properties are n
Save properties to persistent storage when host is on
1. When host is on, set properties as requested properties instead of notify listeners; 2. When host becomes off, and requested properties are not empty, notify the listners and reset the requested properties.
Add unit tests.
Change-Id: I9359c801c698df0c6e5eab43e12427bb5a6da611 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
415b964f | 08-Feb-2017 |
Lei YU <mine260309@gmail.com> |
Add time Manager to handle property changes callback
1. Implement time::Manager who registers property change signal for time mode and owner; 2. Add PropertyChangeListner interface to handle the cal
Add time Manager to handle property changes callback
1. Implement time::Manager who registers property change signal for time mode and owner; 2. Add PropertyChangeListner interface to handle the callback; 3. Make EpochBase to implement the interface.
Change-Id: I185580ae37353e1ed82a47e4905fb22e269ac09d Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
af5abc57 | 07-Mar-2017 |
Lei YU <mine260309@gmail.com> |
Initial implementation of HostEpoch
When host time is set, the diff between the BmcTime and the value is saved to persistent storage; When host time is retrieved, return the BmcTime plus the diff as
Initial implementation of HostEpoch
When host time is set, the diff between the BmcTime and the value is saved to persistent storage; When host time is retrieved, return the BmcTime plus the diff as host's time.
Add the unit test cases for HostEpoch.
Change-Id: Ia55b93bfcba4f226ceaed8491136ea7afda7bd77 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
e7abcdc7 | 16-Jan-2017 |
Lei YU <mine260309@gmail.com> |
Implement BmcEpoch set/get elapsed()
Getting elapsed returns BMC's time; Setting elapsed will check the current time mode/owner, and will return error when mode is NTP or owner is HOST.
Add unit te
Implement BmcEpoch set/get elapsed()
Getting elapsed returns BMC's time; Setting elapsed will check the current time mode/owner, and will return error when mode is NTP or owner is HOST.
Add unit test cases.
Change-Id: Ibf4e90957f3b26b68c4a1b6dc66dc364c66bef10 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
96232827 | 20-Jan-2017 |
Lei YU <mine260309@gmail.com> |
Implement part of BmcEpoch
Add BmcEpoch which inherits EpochBase and will handle times for BMC, it is partly implemented.
Add unit test cases to test basic functions.
Change-Id: Ia5e4d0f884156d238
Implement part of BmcEpoch
Add BmcEpoch which inherits EpochBase and will handle times for BMC, it is partly implemented.
Add unit test cases to test basic functions.
Change-Id: Ia5e4d0f884156d238f3f84df490a2efbce43e89a Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
2f9c0cc2 | 20-Jan-2017 |
Lei YU <mine260309@gmail.com> |
Intialize new phosphor-time-manager
phosphor-time-manager will be refactored to use sdbusplus interfaces. This is a initial commit that EpochBase is implemented based on dbus interface xyz/openbmc_p
Intialize new phosphor-time-manager
phosphor-time-manager will be refactored to use sdbusplus interfaces. This is a initial commit that EpochBase is implemented based on dbus interface xyz/openbmc_project/Time/EpochTime.interface.yaml.
EpochBase is the base class that wraps EpochTime interface, and is initialized with time mode and owner from settingsd.
An initial unit test case is added.
Change-Id: Ic944b70f63ec3c0329762cc8874f0f57b09ddce3 Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|