Skip to content

Commit

Permalink
Merge branch 'huawei-secure-configuration-message' of https://github.…
Browse files Browse the repository at this point in the history
…com/unyc-io/netmiko into huawei-secure-configuration-message
  • Loading branch information
ktbyers committed Oct 17, 2023
2 parents bf7a492 + a7f7ba3 commit 1859ae7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions netmiko/huawei/huawei.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None:
self.write_channel("N" + self.RETURN)
self.read_until_pattern(pattern=self.prompt_pattern)

# Huawei prompts for secure the configuration before displaying the initial base prompt.
if re.search(
r"security\srisks\sin\sthe\sconfiguration\sfile.*\?\s*\[[Yy]\/[nN]\]", data
):
self.send_command("Y", expect_string=r"continue\?\s*\[[Yy]\/[nN]\]")
self.send_command(
"Y", expect_string=r"saved\ssuccessfully", read_timeout=60
)
self.read_until_pattern(pattern=self.prompt_pattern)


class HuaweiTelnet(HuaweiBase):
"""Huawei Telnet driver."""
Expand Down

0 comments on commit 1859ae7

Please sign in to comment.