'Generates both pxe and grub boot menus.'

def make_actual_pxe_menu(self):

    default = self.systems.find(name='default')
    if (default is None):
        timeout_action = 'local'
    else:
        timeout_action = default.profile
    menu_items = self.get_menu_items()
    metadata = {'pxe_menu_items': menu_items['pxe'], 'pxe_timeout_profile': timeout_action}
    outfile = os.path.join(self.bootloc, 'pxelinux.cfg', 'default')
    template_src = open(os.path.join(self.settings.boot_loader_conf_template_dir, 'pxedefault.template'))
    template_data = template_src.read()
    self.templar.render(template_data, metadata, outfile, None)
    template_src.close()
    metadata = {'grub_menu_items': menu_items['grub']}
    outfile = os.path.join(self.bootloc, 'grub', 'efidefault')
    template_src = open(os.path.join(self.settings.boot_loader_conf_template_dir, 'efidefault.template'))
    template_data = template_src.read()
    self.templar.render(template_data, metadata, outfile, None)
    template_src.close()
    menu_items = self.get_menu_items_nexenta()
    metadata = {'grub_menu_items': menu_items['grub']}
    outfile = os.path.join(self.bootloc, 'boot', 'grub', 'menu.lst')
    template_src = open(os.path.join(self.settings.boot_loader_conf_template_dir, 'nexenta_grub_menu.template'))
    template_data = template_src.read()
    self.templar.render(template_data, metadata, outfile, None)
    template_src.close()
