Exemplo n.º 1
0
 def on_interactive(self, args):
     self.verbose = args.verbose
     ret = self._registry.find_command("connect").run_cli(args)
     if ret:
         raise exceptions.CommandError("Failed starting interactive mode")
     # dispatch the on connected message
     self.registry.dispatch_message(eventbus.Message.CONNECTED)
Exemplo n.º 2
0
 def require_connected(self):
     if not self.is_connected():
         cprint("You need to be connected to a cluster in order to perform "
                "this operation, either pass a "
                "--admin-server-host/unix-path in CLI mode, or use the "
                "connect command in interactive")
         raise exceptions.CommandError(
             "A connection to a cluster is required!")
Exemplo n.º 3
0
    def on_interactive(self, args):
        self.debug = args.debug
        self.verbose = args.verbose
        self.no_welcome = args.no_welcome
        self._set_gpu_ids(args)

        if not self.no_welcome:
            cprint(self.messages.LOGO_STR, "magenta")
            cprint(self.messages.WELCOME_MESSAGE_STR)

        ret = self._registry.find_command("connect").run_cli(args)
        if ret:
            raise exceptions.CommandError("Failed starting interactive mode")
        # dispatch the on connected message
        self.registry.dispatch_message(eventbus.Message.CONNECTED)
Exemplo n.º 4
0
 def on_interactive(self, args):
     self._set_arguments(args)
     ret = self._registry.find_command("connect").run_cli(args)
     if ret:
         raise exceptions.CommandError("Failed starting interactive mode")