diagnostics: Use new component based API for all diagnostic tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-12-30 11:37:46 -05:00
1 parent 1f14c42af5
commit 2ebb565c92
43 files changed
+334 -616

No files matched your search

+6 -8
View File
@@ -63,6 +63,12 @@ class DateTimeApp(app_module.App):
daemon = Daemon('daemon-datetime', managed_services[0])
self.add(daemon)
def diagnose(self):
"""Run diagnostics and return the results."""
results = super().diagnose()
results.append(_diagnose_time_synchronized())
return results
def init():
"""Initialize the date/time module."""
@@ -77,14 +83,6 @@ def setup(helper, old_version=None):
helper.call('post', app.enable)
def diagnose():
"""Run diagnostics and return the results."""
results = []
results.append(_diagnose_time_synchronized())
return results
def _diagnose_time_synchronized():
"""Check whether time is synchronized to NTP server."""
result = 'failed'