from typing import List
import json


def get_whitelist(con) -> List[str]:
    """
    Reads a list of hosts which should be ignored. May be absent.
    """
    k, v = con.kv.get("service/rebootmgr/ignore_failed_checks")
    if v and "Value" in v.keys() and v["Value"]:
        return json.loads(v["Value"].decode())
    return []