@jsonify
def list_records(self, arg_dict):
    """Returns all the stored data at or below the given path for the
    given dom_id. The data is returned as a json-ified dict, with the
    path as the key and the stored value as the value. If the path
    doesn't exist, an empty dict is returned.
    """
    dirpath = "/local/domain/%(dom_id)s/%(path)s" % arg_dict
    cmd = ["xenstore-ls", dirpath.rstrip("/")]
    try:
        ret, recs = _run_command(cmd)
    except pluginlib.PluginError, e:
        if "No such file or directory" in "%s" % e:
            # Path doesn't exist.
            return {}
        return str(e)
        raise
    base_path = arg_dict["path"]
    paths = _paths_from_ls(recs)
    ret = {}
    for path in paths:
        if base_path:
            arg_dict["path"] = "%s/%s" % (base_path, path)
        else:
            arg_dict["path"] = path
        rec = read_record(self, arg_dict)
        try:
            val = json.loads(rec)
        except __HOLE__:
            val = rec
        ret[path] = val
    return ret
dataset/ETHPy150Open nii-cloud/dodai-compute/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py/list_records