def enter_config_mode(self):
"""Method that returns to config mode of a switch.
"""
commands = [['configure'], ]
if not self.is_config_mode:
self.is_config_mode = True
self.mode_prompt = 'Switch (config)#'
try:
self.cli_set(commands)
except (CLISSHException, SSHException, SocketError):
self.is_config_mode = False
self.mode_prompt = 'Switch #'
评论列表
文章目录