def __init__(self, app, data, storage, payload, instclass): """ :see: pyanaconda.ui.tui.base.UIScreen :see: pyanaconda.ui.tui.base.App :param app: reference to application which is a main class for TUI screen handling, it is responsible for mainloop control and keeping track of the stack where all TUI screens are scheduled :type app: instance of pyanaconda.ui.tui.base.App :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload :param instclass: distribution-specific information :type instclass: pyanaconda.installclass.BaseInstallClass """ NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.done = False
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._ready = False self.selected_disks = self.data.ignoredisk.onlyuse[:] self.selection = None self.autopart = None self.clearPartType = None # This list gets set up once in initialize and should not be modified # except perhaps to add advanced devices. It will remain the full list # of disks that can be included in the install. self.disks = [] self.errors = [] self.warnings = [] if self.data.zerombr.zerombr and arch.isS390(): # if zerombr is specified in a ks file and there are unformatted # dasds, automatically format them. pass in storage.devicetree here # instead of storage.disks since mediaPresent is checked on disks; # a dasd needing dasdfmt will fail this media check though to_format = storage.devicetree.make_unformatted_dasd_list(getDisks(self.storage.devicetree)) if to_format: self.run_dasdfmt(to_format) if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True
def __init__(self, data, storage, payload, instclass): FirstbootSpokeMixIn.__init__(self) NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.initialize_start() self.title = N_("User creation") self._container = None if self.data.user.userList: self._user_data = self.data.user.userList[0] self._create_user = True else: self._user_data = self.data.UserData() self._create_user = False self._use_password = self._user_data.isCrypted or self._user_data.password self._groups = "" self._is_admin = False self._policy = self.data.anaconda.pwpolicy.get_policy("user", fallback_to_default=True) self.errors = [] self._users_module = USERS.get_observer() self._users_module.connect() self.initialize_done()
def __init__(self, app, data, storage, payload, instclass, roots): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._root = None self._roots = roots # default to selecting the first root in the list self._selection = 0
def __init__(self, app, data, storage, payload, instclass, device): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) SourceSwitchHandler.__init__(self) self.selection = None self.args = self.data.method self._device = device self._mount_device() self._isos = self._getISOs()
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.partschemes = OrderedDict() pre_select = self.data.autopart.type or DEFAULT_AUTOPART_TYPE for i, item in enumerate(AUTOPART_CHOICES): self.partschemes[item[0]] = item[1] if item[1] == pre_select: self._selection = i
def __init__(self, app, data, storage, payload, instclass, message=None): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._password = "" if message: self._message = message else: self._message = _("Please provide VNC password. You will have to type it twice. \n" "Leave blank for no password")
def __init__(self, data, storage, payload, instclass, protocol): NormalTUISpoke.__init__(self, data, storage, payload, instclass) SourceSwitchHandler.__init__(self) self.title = N_("Specify Repo Options") self.protocol = protocol self._container = None self._url = self.data.url.url
def __init__(self, app, data, storage, payload, instclass, message=None): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._password = "" if message: self._message = message else: self._message = _("Please provide VNC password (must be six to eight characters long).\n" "You will have to type it twice. Leave blank for no password")
def __init__(self, data, storage, payload, instclass, device): NormalTUISpoke.__init__(self, data, storage, payload, instclass) SourceSwitchHandler.__init__(self) self.title = N_("Select an ISO to use as install source") self._container = None self.args = self.data.method self._device = device self._mount_device() self._isos = self._getISOs()
def __init__(self, app, data, storage=None, payload=None, instclass=None): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) if flags.automatedInstall: self._ro = data.rescue.romount else: self._ro = False self._root = None self._choices = (_("Continue"), _("Read-only mount"), _("Skip to shell"), ("Quit (Reboot)"))
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) SourceSwitchHandler.__init__(self) self.title = N_("Installation source") self._container = None self._ready = False self._error = False self._cdrom = None self._hmc = False
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Partition Scheme Options") self._container = None self.part_schemes = OrderedDict() pre_select = self.data.autopart.type or DEFAULT_AUTOPART_TYPE for item in AUTOPART_CHOICES: self.part_schemes[item[0]] = item[1] if item[1] == pre_select: self._selected_scheme_value = item[1]
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Network configuration") self._network_module = NETWORK.get_observer() self._network_module.connect() self._container = None self._value = self._network_module.proxy.Hostname self.supported_devices = [] self.errors = [] self._apply = False
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._langs = [localization.get_english_name(lang) for lang in localization.get_available_translations()] self._langs_and_locales = dict((localization.get_english_name(lang), lang) for lang in localization.get_available_translations()) self._locales = dict((lang, localization.get_language_locales(lang)) for lang in self._langs_and_locales.values()) self._selected = self.data.lang.lang
def __init__(self, data, storage, payload): NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_("Time settings") self._timezone_spoke = None self._container = None # we use an ordered dict to keep the NTP server insertion order self._ntp_servers = OrderedDict() self._ntp_servers_lock = RLock() self._timezone_module = TIMEZONE.get_observer() self._timezone_module.connect()
def __init__(self, app, data, storage=None, payload=None, instclass=None, message=""): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.initialize_start() # The TUI hasn't been initialized with the message handlers yet. Add an # exception message handler so that the TUI exits if anything goes wrong # at this stage. self._app.register_event_handler(hubQ.HUB_CODE_EXCEPTION, exception_msg_handler_and_exit) self._message = message self._choices = (_(USEVNC), _(USETEXT)) self._usevnc = False self.initialize_done()
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) # it's stupid to call get_all_regions_and_timezones twice, but regions # needs to be unsorted in order to display in the same order as the GUI # so whatever self._regions = list(timezone.get_all_regions_and_timezones().keys()) self._timezones = dict((k, sorted(v)) for k, v in timezone.get_all_regions_and_timezones().items()) self._lower_regions = [r.lower() for r in self._timezones] self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]] # for lowercase lookup self._lower_zones = [z.lower().replace("_", " ") for region in self._timezones for z in self._timezones[region]] self._selection = ""
def __init__(self, data, storage=None, payload=None, instclass=None, message=""): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.input_required = True self.initialize_start() self._container = None # The TUI hasn't been initialized with the message handlers yet. Add an # exception message handler so that the TUI exits if anything goes wrong # at this stage. loop = App.get_event_loop() loop.register_signal_handler(ExceptionSignal, exception_msg_handler_and_exit) self._message = message self._usevnc = False self.initialize_done()
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Language settings") self.initialize_start() self._container = None self._langs = [localization.get_english_name(lang) for lang in localization.get_available_translations()] self._langs_and_locales = dict((localization.get_english_name(lang), lang) for lang in localization.get_available_translations()) self._locales = dict((lang, localization.get_language_locales(lang)) for lang in self._langs_and_locales.values()) self._selected = self.data.lang.lang self.initialize_done()
def __init__(self, data, storage, payload): NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_("Network configuration") self._network_module = NETWORK.get_proxy() self.nm_client = network.get_nm_client() if not self.nm_client and conf.system.provides_system_bus: self.nm_client = NM.Client.new(None) self._container = None self.hostname = self._network_module.Hostname self.editable_configurations = [] self.errors = [] self._apply = False
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._ready = False self.errors = [] self._tx_id = None # default to first selection (Gnome) in list of environments self._selection = 0 self.environment = None # for detecting later whether any changes have been made self._origEnv = None # are we taking values (package list) from a kickstart file? self._kickstarted = flags.automatedInstall and self.data.packages.seen
def __init__(self, data, storage, payload): NormalTUISpoke.__init__(self, data, storage, payload) self.initialize_start() self.title = N_("Root password") self.input_required = False self._policy = self.data.anaconda.pwpolicy.get_policy( "root", fallback_to_default=True) self._password = None self._users_module = USERS.get_proxy() self._services_module = SERVICES.get_proxy() self.initialize_done()
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) # it's stupid to call get_all_regions_and_timezones twice, but regions # needs to be unsorted in order to display in the same order as the GUI # so whatever self._regions = list(timezone.get_all_regions_and_timezones().keys()) self._timezones = dict((k, sorted(v)) for k, v in timezone.get_all_regions_and_timezones().items()) self._lower_regions = [r.lower() for r in self._regions] self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]] # for lowercase lookup self._lower_zones = [z.lower().replace("_", " ") for region in self._timezones for z in self._timezones[region]] self._selection = ""
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.initialize_start() self._langs = [ localization.get_english_name(lang) for lang in localization.get_available_translations() ] self._langs_and_locales = dict( (localization.get_english_name(lang), lang) for lang in localization.get_available_translations()) self._locales = dict((lang, localization.get_language_locales(lang)) for lang in self._langs_and_locales.values()) self._selected = self.data.lang.lang self.initialize_done()
def __init__(self, data, storage, payload, instclass, error): NormalTUISpoke.__init__(self, data, storage, payload, instclass) SourceSwitchHandler.__init__(self) self.title = N_("Specify Repo Options") self._container = None self._error = error nfs = self.data.method self._nfs_opts = "" self._nfs_server = "" if nfs.method == "nfs" and (nfs.server and nfs.dir): self._nfs_server = "%s:%s" % (nfs.server, nfs.dir) self._nfs_opts = nfs.opts
def __init__(self, data, storage, payload): NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_("Network configuration") self._network_module = NETWORK.get_observer() self._network_module.connect() self.nm_client = network.get_nm_client() if not self.nm_client and conf.system.provides_system_bus: self.nm_client = NM.Client.new(None) self._container = None self.hostname = self._network_module.proxy.Hostname self.editable_configurations = [] self.errors = [] self._apply = False
def __init__(self, app, data, storage=None, payload=None, instclass=None, message=None): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) if message: self._message = message else: self._message = _("X was unable to start on your " "machine. Would you like to " "start VNC to connect to " "this computer from another " "computer and perform a " "graphical installation or continue " "with a text mode installation?") self._choices = (USEVNC, USETEXT) self._usevnc = False
def __init__(self, data, storage, payload): """ :see: simpleline.render.screen.UIScreen :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload """ NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_("Hello World") self._entered_text = ""
def __init__(self, data, storage, payload): NormalTUISpoke.__init__(self, data, storage, payload) self.initialize_start() self.title = N_("Root password") self.input_required = False self._policy = self.data.anaconda.pwpolicy.get_policy("root", fallback_to_default=True) self._password = None self._users_module = USERS.get_observer() self._users_module.connect() self._services_module = SERVICES.get_observer() self._services_module.connect() self.initialize_done()
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.errors = [] self._tx_id = None self._selection = None self.environment = None # for detecting later whether any changes have been made self._origEnv = None # are we taking values (package list) from a kickstart file? self._kickstarted = flags.automatedInstall and self.data.packages.seen # Register event listeners to update our status on payload events payloadMgr.addListener(payloadMgr.STATE_START, self._payload_start) payloadMgr.addListener(payloadMgr.STATE_FINISHED, self._payload_finished) payloadMgr.addListener(payloadMgr.STATE_ERROR, self._payload_error)
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Partitioning Options") self._container = None self.parttypelist = sorted(PARTTYPES.keys()) # remember the original values so that we can detect a change self._orig_clearpart_type = self.data.clearpart.type self._orig_mount_assign = len(self.data.mount.dataList()) != 0 # default to mount point assignment if it is already (partially) # configured self._do_mount_assign = self._orig_mount_assign if not self._do_mount_assign: self.clearPartType = self.data.clearpart.type or CLEARPART_TYPE_ALL else: self.clearPartType = CLEARPART_TYPE_NONE
def __init__(self, app, data, storage=None, payload=None, instclass=None, message=""): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) # The TUI hasn't been initialized with the message handlers yet. Add an # exception message handler so that the TUI exits if anything goes wrong # at this stage. self._app.register_event_handler(hubQ.HUB_CODE_EXCEPTION, exception_msg_handler_and_exit) self._message = message self._choices = (_(USEVNC), _(USETEXT)) self._usevnc = False
def __init__(self, data, storage, payload, instclass): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Language settings") self.initialize_start() self._container = None self._langs = [localization.get_english_name(lang) for lang in localization.get_available_translations()] self._langs_and_locales = dict((localization.get_english_name(lang), lang) for lang in localization.get_available_translations()) self._locales = dict((lang, localization.get_language_locales(lang)) for lang in self._langs_and_locales.values()) self._l12_module = LOCALIZATION.get_observer() self._l12_module.connect() self._selected = self._l12_module.proxy.Language self.initialize_done()
def __init__(self, data, storage, payload, instclass): """ :see: simpleline.render.screen.UIScreen :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload :param instclass: distribution-specific information :type instclass: pyanaconda.installclass.BaseInstallClass """ NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Hello World") self._entered_text = ""
def __init__(self, data, storage, payload, instclass): """ :see: simpleline.render.screen.UIScreen :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload :param instclass: distribution-specific information :type instclass: pyanaconda.installclass.BaseInstallClass """ NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Amahi Server Setup") self._entered_text = ""
def __init__(self, data, storage, payload): """ :see: simpleline.render.screen.UIScreen :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload """ NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_('Удаление пакетов') self._package_remove_module = PACKAGE_REMOVE.get_proxy() self._remove = {} self._list = []
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._ready = False self.selected_disks = self.data.ignoredisk.onlyuse[:] self.autopart = None self.clearPartType = None # This list gets set up once in initialize and should not be modified # except perhaps to add advanced devices. It will remain the full list # of disks that can be included in the install. self.disks = [] self.errors = [] self.warnings = [] if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True
def __init__(self, data, storage, payload): """ :see: simpleline.render.screen.UIScreen :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload """ NormalTUISpoke.__init__(self, data, storage, payload) self.title = N_("Hello World Edit") self._container = None # values for user to set self._checked = False self._unconditional_input = "" self._conditional_input = ""
def __init__(self, data, storage, payload): FirstbootSpokeMixIn.__init__(self) NormalTUISpoke.__init__(self, data, storage, payload) self.initialize_start() # connect to the Users DBus module self._users_module = USERS.get_proxy() self.title = N_("User creation") self._container = None # was user creation requested by the Users DBus module # - at the moment this basically means user creation was # requested via kickstart # - note that this does not currently update when user # list is changed via DBus self._user_requested = False self._user_cleared = False # should a user be created ? self._create_user = False self._user_list = get_user_list(self._users_module, add_default=True) # if user has a name, it's an actual user that has been requested, # rather than a default user added by us if self.user.name: self._user_requested = True self._create_user = True self._use_password = self.user.is_crypted or self.user.password self._groups = "" self._is_admin = False self._policy = self.data.anaconda.pwpolicy.get_policy( "user", fallback_to_default=True) self.errors = [] self._users_module = USERS.get_proxy() self.initialize_done()
def __init__(self, app, data, storage=None, payload=None, instclass=None, message=None): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) # The TUI hasn't been initialized with the message handlers yet. Add an # exception message handler so that the TUI exits if anything goes wrong # at this stage. self._app.register_event_handler(hubQ.HUB_CODE_EXCEPTION, exception_msg_handler_and_exit) if message: self._message = message else: self._message = _("X was unable to start on your " "machine. Would you like to " "start VNC to connect to " "this computer from another " "computer and perform a " "graphical installation or continue " "with a text mode installation?") self._choices = (_(USEVNC), _(USETEXT)) self._usevnc = False
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._ready = False self.selected_disks = self.data.ignoredisk.onlyuse[:] # This list gets set up once in initialize and should not be modified # except perhaps to add advanced devices. It will remain the full list # of disks that can be included in the install. self.disks = [] self.errors = [] self.warnings = [] if self.data.zerombr.zerombr and arch.isS390(): # if zerombr is specified in a ks file and there are unformatted # dasds, automatically format them to_format = make_unformatted_dasd_list(self.selected_disks) if to_format: self.run_dasdfmt(to_format) if not flags.automatedInstall: # default to using autopart for interactive installs self.data.autopart.autopart = True
def __init__(self, app, data, storage, payload, instclass): """ :see: pyanaconda.ui.tui.base.UIScreen :see: pyanaconda.ui.tui.base.App :param app: reference to application which is a main class for TUI screen handling, it is responsible for mainloop control and keeping track of the stack where all TUI screens are scheduled :type app: instance of pyanaconda.ui.tui.base.App :param data: data object passed to every spoke to load/store data from/to it :type data: pykickstart.base.BaseHandler :param storage: object storing storage-related information (disks, partitioning, bootloader, etc.) :type storage: blivet.Blivet :param payload: object storing packaging-related information :type payload: pyanaconda.packaging.Payload :param instclass: distribution-specific information :type instclass: pyanaconda.installclass.BaseInstallClass """ NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
def __init__(self, app, data, storage, payload, instclass, timezone_spoke): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._time_spoke = timezone_spoke self._ntp_server_index = None
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self.clearPartType = self.data.clearpart.type self.parttypelist = sorted(PARTTYPES.keys())
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
def __init__(self, *args, **kwargs): NormalTUISpoke.__init__(self, *args, **kwargs) self.title = _("License information") self._container = None
def __init__(self, data, storage, payload, instclass, timezone_spoke): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("Select an NTP server to remove") self._time_spoke = timezone_spoke self._ntp_server_index = None
def __init__(self, data, storage, payload, instclass, time_spoke): NormalTUISpoke.__init__(self, data, storage, payload, instclass) self.title = N_("NTP configuration") self._container = None self._time_spoke = time_spoke
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._currentISOFile = None self._mountable_devices = self._get_mountable_devices() self._device = None
def __init__(self, app, data, storage, payload, instclass, time_spoke): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._time_spoke = time_spoke
def __init__(self, app, data, storage, payload, instclass): NormalTUISpoke.__init__(self, app, data, storage, payload, instclass) self._timezone_spoke = None # we use an ordered dict to keep the NTP server insertion order self._ntp_servers = OrderedDict() self._ntp_servers_lock = RLock()