def get_all_device_status():

    """
    :return: Get all status of all device, return a hash list with key is a device name
    """

    status_list = {}
    dev_list = accessdb.get_device_list()
    for row in dev_list:
        # logger.debug(row.id)
        key = 'dev%s' % row.id
        result = get_device_status(row.id)
        status_list[key] = result

    return status_list
def update_device_status_interval():
    dev_list = accessdb.get_device_list()
    for row in dev_list:
        result = get_device_status(row.id)
        if result != row.status:
            update_status_device(row, result)