# Path: pyanaconda/installclass.py
# class BaseInstallClass(object):
#     # default to not being hidden
#     hidden = 0
#     name = "base"
#     bootloaderTimeoutDefault = None
#     bootloaderExtraArgs = []
# 
#     # Anaconda flags several packages to be installed based on the configuration
#     # of the system -- things like fs utilities, bootloader, &c. This is a list
#     # of packages that we should not try to install using the aforementioned
#     # mechanism.
#     ignoredPackages = []
# 
#     # This flag controls whether or not Anaconda should provide an option to
#     # install the latest updates during installation source selection.
#     installUpdates = True
# 
#     _l10n_domain = None
# 
#     # The default filesystem type to use.  If None, we will use whatever
#     # Blivet uses by default.
#     defaultFS = None
# 
#     # don't select this class by default
#     default = 0
# 
#     @property
#     def l10n_domain(self):
#         if self._l10n_domain is None:
#             raise RuntimeError("Localization domain for '%s' not set." %
#                                self.name)
#         return self._l10n_domain
# 
#     def setPackageSelection(self, anaconda):
#         pass
# 
#     def getBackend(self):
#         # The default is to return None here, which means anaconda should
#         # use live or yum (whichever can be detected).  This method is
#         # provided as a way for other products to specify their own.
#         return None
# 
#     def setDefaultPartitioning(self, storage):
#         autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
#                                  size=1024, maxSize=50*1024, grow=True,
#                                  btr=True, lv=True, thin=True, encrypted=True),
#                         PartSpec(mountpoint="/home", fstype=storage.defaultFSType,
#                                  size=500, grow=True, requiredSpace=50*1024,
#                                  btr=True, lv=True, thin=True, encrypted=True)]
# 
#         bootreqs = platform.setDefaultPartitioning()
#         if bootreqs:
#             autorequests.extend(bootreqs)
# 
# 
#         disk_space = getAvailableDiskSpace(storage)
#         swp = swap.swapSuggestion(disk_space=disk_space)
#         autorequests.append(PartSpec(fstype="swap", size=swp, grow=False,
#                                      lv=True, encrypted=True))
# 
#         for autoreq in autorequests:
#             if autoreq.fstype is None:
#                 if autoreq.mountpoint == "/boot":
#                     autoreq.fstype = storage.defaultBootFSType
#                 else:
#                     autoreq.fstype = storage.defaultFSType
# 
#         storage.autoPartitionRequests = autorequests
# 
#     def configure(self, anaconda):
#         anaconda.bootloader.timeout = self.bootloaderTimeoutDefault
#         anaconda.bootloader.boot_args.update(self.bootloaderExtraArgs)
# 
#     # sets default ONBOOT values and updates ksdata accordingly
#     def setNetworkOnbootDefault(self, ksdata):
#         pass
# 
#     def __init__(self):
#         pass


from pyanaconda.i18n import N_
from pyanaconda.installclass import BaseInstallClass
from pyanaconda.product import productName
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#


class InstallClass(BaseInstallClass):
    # name has underscore used for mnemonics, strip if you dont need it
    id = "rhel"
    name = N_("Red Hat Enterprise Linux")
    sortPriority = 10000
    hidden = 1
    defaultFS = "xfs"

    bootloaderTimeoutDefault = 5
    bootloaderExtraArgs = []

    ignoredPackages = ["ntfsprogs"]

    installUpdates = False

    _l10n_domain = "comps"

    efi_dir = "redhat"

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)

    def __init__(self):

# Path: pyanaconda/installclass.py
# class BaseInstallClass(object):
#     # default to not being hidden
#     hidden = 0
#     name = "base"
#     bootloaderTimeoutDefault = None
#     bootloaderExtraArgs = []
# 
#     # Anaconda flags several packages to be installed based on the configuration
#     # of the system -- things like fs utilities, bootloader, &c. This is a list
#     # of packages that we should not try to install using the aforementioned
#     # mechanism.
#     ignoredPackages = []
# 
#     # This flag controls whether or not Anaconda should provide an option to
#     # install the latest updates during installation source selection.
#     installUpdates = True
# 
#     _l10n_domain = None
# 
#     # The default filesystem type to use.  If None, we will use whatever
#     # Blivet uses by default.
#     defaultFS = None
# 
#     # don't select this class by default
#     default = 0
# 
#     @property
#     def l10n_domain(self):
#         if self._l10n_domain is None:
#             raise RuntimeError("Localization domain for '%s' not set." %
#                                self.name)
#         return self._l10n_domain
# 
#     def setPackageSelection(self, anaconda):
#         pass
# 
#     def getBackend(self):
#         # The default is to return None here, which means anaconda should
#         # use live or yum (whichever can be detected).  This method is
#         # provided as a way for other products to specify their own.
#         return None
# 
#     def setDefaultPartitioning(self, storage):
#         autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
#                                  size=1024, maxSize=50*1024, grow=True,
#                                  btr=True, lv=True, thin=True, encrypted=True),
#                         PartSpec(mountpoint="/home", fstype=storage.defaultFSType,
#                                  size=500, grow=True, requiredSpace=50*1024,
#                                  btr=True, lv=True, thin=True, encrypted=True)]
# 
#         bootreqs = platform.setDefaultPartitioning()
#         if bootreqs:
#             autorequests.extend(bootreqs)
# 
# 
#         disk_space = getAvailableDiskSpace(storage)
#         swp = swap.swapSuggestion(disk_space=disk_space)
#         autorequests.append(PartSpec(fstype="swap", size=swp, grow=False,
#                                      lv=True, encrypted=True))
# 
#         for autoreq in autorequests:
#             if autoreq.fstype is None:
#                 if autoreq.mountpoint == "/boot":
#                     autoreq.fstype = storage.defaultBootFSType
#                 else:
#                     autoreq.fstype = storage.defaultFSType
# 
#         storage.autoPartitionRequests = autorequests
# 
#     def configure(self, anaconda):
#         anaconda.bootloader.timeout = self.bootloaderTimeoutDefault
#         anaconda.bootloader.boot_args.update(self.bootloaderExtraArgs)
# 
#     # sets default ONBOOT values and updates ksdata accordingly
#     def setNetworkOnbootDefault(self, ksdata):
#         pass
# 
#     def __init__(self):
#         pass


# Path: pyanaconda/installclasses/rhel.py
from pyanaconda.i18n import N_
from pyanaconda.installclass import BaseInstallClass
from pyanaconda.product import productName

#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#


class InstallClass(BaseInstallClass):
    # name has underscore used for mnemonics, strip if you dont need it
    id = "rhel"
    name = N_("Red Hat Enterprise Linux")
    sortPriority = 10000
    hidden = 1
    defaultFS = "xfs"

    bootloaderTimeoutDefault = 5
    bootloaderExtraArgs = []

    ignoredPackages = ["ntfsprogs"]

    installUpdates = False

    _l10n_domain = "comps"

    efi_dir = "redhat"

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage)

    def __init__(self):

        BaseInstallClass.__init__(self)