def check_device_state(self):
"""Attempts to connect to the shell retries number of times.
Raises:
Exception: device is not ready
"""
if not (self.switch.cli.conn.check_client() and self.switch.cli.conn.check_shell()):
try:
self.switch.ui.connect()
except (CLISSHException, SSHException, SocketError):
self.switch.ui.disconnect()
raise Exception("Device is not ready.")
# Add cli application check
# Platform
评论列表
文章目录