ui_dcrp_shell.py 文件源码

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

项目:taf 作者: taf3 项目源码 文件源码
def get_node_hostname(self, instance=None):
        """Get node's hostname.

        Returns:
            str:  Hostname of node.

        """
        if instance:
            try:
                hostname_output = instance.cli_send_command('hostname').stdout
            except UICmdException as ex:
                self.class_logger.error(ex)
                pytest.fail('Failed to get hostname, node id {}.'.format(
                    instance.switch.id))
            return hostname_output.strip()
        else:
            raise UIException("UI instance isn't specified.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号