MOON
Server: Apache
System: Linux server2.shieldcogroup.com 3.10.0-1160.119.1.el7.tuxcare.els12.x86_64 #1 SMP Fri Nov 8 05:49:38 UTC 2024 x86_64
User: jacom (1029)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //etc/leapp/repos.d/system_upgrade/common/models/grubconfigerror.py
from leapp.models import fields, Model
from leapp.topics import SystemFactsTopic


class GrubConfigError(Model):
    ERROR_CORRUPTED_GRUBENV = 'corrupted grubenv'
    ERROR_MISSING_NEWLINE = 'missing newline'
    ERROR_GRUB_CMDLINE_LINUX_SYNTAX = 'GRUB_CMDLINE_LINUX syntax'

    topic = SystemFactsTopic

    # XXX FIXME(ivasilev) Rename to error_resolvable?
    # If error can be automatically resolved (ex. in addupgradebootentry actor)
    error_detected = fields.Boolean(default=False)
    error_type = fields.StringEnum([ERROR_CORRUPTED_GRUBENV, ERROR_MISSING_NEWLINE, ERROR_GRUB_CMDLINE_LINUX_SYNTAX])
    # Paths to config files
    files = fields.List(fields.String())