node.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:dcos-e2e 作者: mesosphere 项目源码 文件源码
def run(
        self,
        args: List[str],
        user: str,
        log_output_live: bool = False,
        env: Optional[Dict] = None,
    ) -> CompletedProcess:
        """
        Run a command on this node the given user.

        Args:
            args: The command to run on the node.
            user: The username to SSH as.
            log_output_live: If `True`, log output live. If `True`, stderr is
                merged into stdout in the return value.
            env: Environment variables to be set on the node before running
                the command. A mapping of environment variable names to
                values.

        Returns:
            The representation of the finished process.

        Raises:
            CalledProcessError: The process exited with a non-zero code.
        """
        ssh_args = self._compose_ssh_command(args=args, user=user, env=env)
        return run_subprocess(args=ssh_args, log_output_live=log_output_live)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号