from mgr_util import get_time_series_rates, get_most_recent_rate
from .. import mgr
+ from ..exceptions import DashboardException
try:
- from typing import Dict, Any # pylint: disable=unused-import
+ from typing import Dict # pylint: disable=unused-import
except ImportError:
pass # For typing only
@staticmethod
def get_smart_data_by_host(hostname):
# type: (str) -> dict
+ """
+ Get the SMART data of all devices on the given host, regardless
+ of the daemon (osd, mon, ...).
+ :param hostname: The name of the host.
+ :return: A dictionary containing the SMART data of every device
+ on the given host. The device name is used as the key in the
+ dictionary.
+ """
devices = CephService.get_devices_by_host(hostname)
- smart_data = {}
+ smart_data = {} # type: dict
if devices:
for device in devices:
if device['devid'] not in smart_data: