'Check if network bootloaders are installed'

def check_bootloaders(self, status):

    bootloaders = {'menu.c32': ['/usr/share/syslinux/menu.c32', '/usr/lib/syslinux/menu.c32', '/var/lib/cobbler/loaders/menu.c32'], 'yaboot': ['/var/lib/cobbler/loaders/yaboot*'], 'pxelinux.0': ['/usr/share/syslinux/pxelinux.0', '/usr/lib/syslinux/pxelinux.0', '/var/lib/cobbler/loaders/pxelinux.0'], 'efi': ['/var/lib/cobbler/loaders/grub-x86.efi', '/var/lib/cobbler/loaders/grub-x86_64.efi']}
    found_bootloaders = []
    items = bootloaders.keys()
    for loader_name in items:
        patterns = bootloaders[loader_name]
        for pattern in patterns:
            matches = glob.glob(pattern)
            if (len(matches) > 0):
                found_bootloaders.append(loader_name)
    not_found = []
    for loader_name in items:
        if (loader_name not in found_bootloaders):
            not_found.append(loader_name)
    if (len(not_found) > 0):
        status.append("some    network    boot-loaders    are    missing    from    /var/lib/cobbler/loaders,    you    may    run    'cobbler    get-loaders'    to    download    them,    or,    if    you    only    want    to    handle    x86/x86_64    netbooting,    you    may    ensure    that    you    have    installed    a    *recent*    version    of    the    syslinux    package    installed    and    can    ignore    this    message    entirely.        Files    in    this    directory,    should    you    want    to    support    all    architectures,    should    include    pxelinux.0,    menu.c32,    and    yaboot.    The    'cobbler    get-loaders'    command    is    the    easiest    way    to    resolve    these    requirements.")
