Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Python modules
- import re
- ## NOC modules
- from noc.sa.profiles import Profile as NOCProfile
- class Profile(NOCProfile):
- name = "Orion.Alpha"
- supported_schemes = [NOCProfile.TELNET, NOCProfile.SSH]
- pattern_more = [
- (r"^ --More--", "\n"),
- (r"\?\s*\[confirm\]", "\n"),
- (r"^.*\[Y/N\][:\ ]?", "Y\n")
- ]
- pattern_unpriveleged_prompt = r"^\S+?>"
- pattern_syntax_error = r"% Invalid input detected at|% Ambiguous command:|% Incomplete command."
- command_disable_pager = "terminal length 0"
- command_super = "enable"
- command_enter_config = "configure terminal"
- command_leave_config = "end"
- command_exit = "exit"
- command_save_config = "write"
- pattern_prompt = r"(^(?P<hostname>[a-zA-Z0-9]\S{0,19})(?:[-_\d\w]+)?(?:\(config[^\)]*\))?#)|(close telnet connection!)"
- requires_netmask_conversion = True
- convert_mac = NOCProfile.convert_mac_to_dashed
- command_exit = "exit"
- #config_volatile = ["^ntp clock-period .*?^"]
- #def shutdown_session(self, script):
- # script.cli("exit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement