def _get_sensors_data(driver_info):
    """Get sensors data.

    :param driver_info: node's driver info
    :raises: FailedToGetSensorData when getting the sensor data fails.
    :returns: returns a dict of sensor data group by sensor type.
    """
    try:
        ipmicmd = ipmi_command.Command(bmc=driver_info['address'],
                                       userid=driver_info['username'],
                                       password=driver_info['password'])
        ret = ipmicmd.get_sensor_data()
    except Exception as e:
        LOG.error(_LE("IPMI get sensor data failed for node %(node_id)s "
                  "with the following error: %(error)s"),
                  {'node_id': driver_info['uuid'], 'error': e})
        raise exception.FailedToGetSensorData(
            node=driver_info['uuid'], error=e)

    if not ret:
        return {}

    sensors_data = {}
    for reading in ret:
        # ignore the sensor data which has no sensor reading value
        if not reading.value:
            continue
        sensors_data.setdefault(
            reading.type,
            {})[reading.name] = {
                'Sensor Reading': '%s %s' % (reading.value, reading.units),
                'Sensor ID': reading.name,
                'States': str(reading.states),
                'Units': reading.units,
                'Health': str(reading.health)}

    return sensors_data
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/ipminative.py/_get_sensors_data/original