Exemplo n.º 1
0
import shutil
import langtable

from pyanaconda import iutil
from pyanaconda import safe_dbus
from pyanaconda import localization
from pyanaconda.constants import DEFAULT_VC_FONT, DEFAULT_KEYBOARD
from pyanaconda.flags import can_touch_runtime_system

import gi
gi.require_version("GLib", "2.0")

from gi.repository import GLib

from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)

LOCALED_SERVICE = "org.freedesktop.locale1"
LOCALED_OBJECT_PATH = "/org/freedesktop/locale1"
LOCALED_IFACE = "org.freedesktop.locale1"

# should match and parse strings like 'cz' or 'cz (qwerty)' regardless of white
# space
LAYOUT_VARIANT_RE = re.compile(r'^\s*([/\w]+)\s*'  # layout plus
                               r'(?:(?:\(\s*([-\w]+)\s*\))'  # variant in parentheses
                               r'|(?:$))\s*')  # or nothing

class KeyboardConfigError(Exception):
    """Exception class for keyboard configuration related problems"""

    pass
Exemplo n.º 2
0
from pyanaconda.modules.storage.installation import MountFilesystemsTask, CreateStorageLayoutTask, \
    WriteConfigurationTask
from pyanaconda.modules.storage.iscsi import ISCSIModule
from pyanaconda.modules.storage.kickstart import StorageKickstartSpecification
from pyanaconda.modules.storage.nvdimm import NVDIMMModule
from pyanaconda.modules.storage.partitioning.constants import PartitioningMethod
from pyanaconda.modules.storage.partitioning.factory import PartitioningFactory
from pyanaconda.modules.storage.partitioning.validate import StorageValidateTask
from pyanaconda.modules.storage.reset import ScanDevicesTask
from pyanaconda.modules.storage.snapshot import SnapshotModule
from pyanaconda.modules.storage.storage_interface import StorageInterface
from pyanaconda.modules.storage.teardown import UnmountFilesystemsTask, TeardownDiskImagesTask
from pyanaconda.modules.storage.zfcp import ZFCPModule

from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)


class StorageService(KickstartService):
    """The Storage service."""

    def __init__(self):
        super().__init__()
        # The storage model.
        self._current_storage = None
        self._storage_playground = None
        self.storage_changed = Signal()

        # The created partitioning modules.
        self._created_partitioning = []
        self.created_partitioning_changed = Signal()