Exemplo n.º 1
0
    def setup(self, environment="anaconda"):
        TUIHub.setup(self, environment=environment)

        if flags.automatedInstall:
            sys.stdout.write(_("Starting automated install"))
            sys.stdout.flush()
            spokes = self._keys.values()
            while not all(spoke.ready for spoke in spokes):
                sys.stdout.write('.')
                sys.stdout.flush()
                time.sleep(1)

            print('')
            for spoke in spokes:
                if spoke.changed:
                    spoke.execute()
Exemplo n.º 2
0
 def prompt(self, args=None):
     if flags.automatedInstall and \
     all(spoke.completed for spoke in self._keys.values() if spoke.mandatory):
         self.close()
         return None
     if not flags.ksprompt:
         errtxt = _("Can't have a question in command line mode!")
         raise RuntimeError(errtxt)
     return TUIHub.prompt(self, args)
Exemplo n.º 3
0
 def prompt(self, args=None):
     if flags.automatedInstall and \
     all(spoke.completed for spoke in self._keys.values() if spoke.mandatory):
         self.close()
         return None
     if not flags.ksprompt:
         errtxt = _("Can't have a question in command line mode!")
         raise RuntimeError(errtxt)
     return TUIHub.prompt(self, args)
Exemplo n.º 4
0
    def prompt(self, args=None):
        incompleteSpokes = [spoke for spoke in self._keys.values()
                                      if spoke.mandatory and not spoke.completed]

        if flags.automatedInstall and not incompleteSpokes:
            self.close()
            return None

        if not flags.ksprompt:
            errtxt = _("The following mandatory spokes are not completed:") + \
                     "\n" + "\n".join(spoke.title for spoke in incompleteSpokes)
            log.error("CmdlineError: %s", errtxt)
            raise CmdlineError(errtxt)

        return TUIHub.prompt(self, args)
Exemplo n.º 5
0
    def setup(self, environment="anaconda"):
        should_schedule = TUIHub.setup(self, environment=environment)
        if not should_schedule:
            return False

        if flags.automatedInstall:
            sys.stdout.write(_("Starting automated install"))
            sys.stdout.flush()
            spokes = self._keys.values()
            while not all(spoke.ready for spoke in spokes):
                sys.stdout.write('.')
                sys.stdout.flush()
                time.sleep(1)

            print('')
            for spoke in spokes:
                if spoke.changed:
                    spoke.execute()

        return True
Exemplo n.º 6
0
    def setup(self, environment="anaconda"):
        should_schedule = TUIHub.setup(self, environment=environment)
        if not should_schedule:
            return False

        if flags.automatedInstall:
            sys.stdout.write(_("Starting automated install"))
            sys.stdout.flush()
            spokes = self._keys.values()
            while not all(spoke.ready for spoke in spokes):
                # Catch any asyncronous events (like storage crashing)
                self._app.process_events()
                sys.stdout.write('.')
                sys.stdout.flush()
                time.sleep(1)

            print('')
            for spoke in spokes:
                if spoke.changed:
                    spoke.execute()

        return True
Exemplo n.º 7
0
    def setup(self, args="anaconda"):
        environment = args
        should_schedule = TUIHub.setup(self, environment)
        if not should_schedule:
            return False

        if flags.automatedInstall:
            sys.stdout.write(_("Starting automated install"))
            sys.stdout.flush()
            spokes = self._spokes.values()

            while not all(spoke.ready for spoke in spokes):
                # Catch any asynchronous events (like storage crashing)
                loop = App.get_event_loop()
                loop.process_signals()
                sys.stdout.write('.')
                sys.stdout.flush()
                time.sleep(1)

            print('')

        return True
Exemplo n.º 8
0
    def setup(self, args="anaconda"):
        environment = args
        should_schedule = TUIHub.setup(self, environment)
        if not should_schedule:
            return False

        if flags.automatedInstall:
            sys.stdout.write(_("Starting automated install"))
            sys.stdout.flush()
            spokes = self._spokes.values()
            while not all(spoke.ready for spoke in spokes):
                # Catch any asynchronous events (like storage crashing)
                loop = App.get_event_loop()
                loop.process_signals()
                sys.stdout.write('.')
                sys.stdout.flush()
                time.sleep(1)

            print('')
            for spoke in spokes:
                if spoke.changed:
                    spoke.execute()

        return True
Exemplo n.º 9
0
 def __init__(self, *args):
     TUIHub.__init__(self, *args)
Exemplo n.º 10
0
 def __init__(self, app, ksdata, storage, payload, instclass):
     TUIHub.__init__(self, app, ksdata, storage, payload, instclass)
     self._stepped = False
Exemplo n.º 11
0
 def __init__(self, *args):
     TUIHub.__init__(self, *args)
     self._environs = [FIRSTBOOT_ENVIRON]
Exemplo n.º 12
0
 def __init__(self, *args):
     TUIHub.__init__(self, *args)
     self._environs = [FIRSTBOOT_ENVIRON]
Exemplo n.º 13
0
 def __init__(self, app, ksdata, storage, payload, instclass):
     TUIHub.__init__(self, app, ksdata, storage, payload, instclass)
     self._stepped = False