MCPcopy Create free account
hub / github.com/apache/mesos / attach

Method attach

src/python/cli_new/lib/cli/plugins/task/main.py:71–83  ·  view source on GitHub ↗

Attach the stdin/stdout/stderr of the CLI to the STDIN/STDOUT/STDERR of a running task.

(self, argv)

Source from the content-addressed store, hash-verified

69 }
70
71 def attach(self, argv):
72 """
73 Attach the stdin/stdout/stderr of the CLI to the
74 STDIN/STDOUT/STDERR of a running task.
75 """
76 try:
77 master = self.config.master()
78 except Exception as exception:
79 raise CLIException("Unable to get leading master address: {error}"
80 .format(error=exception))
81
82 task_io = TaskIO(master, argv["<task-id>"])
83 return task_io.attach(argv["--no-stdin"])
84
85
86 def exec(self, argv):

Callers

nothing calls this directly

Calls 4

attachMethod · 0.95
CLIExceptionClass · 0.90
TaskIOClass · 0.90
masterMethod · 0.45

Tested by

no test coverage detected