Advertisement
Guest User

Untitled

a guest
Aug 12th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Python modules
  2. import re
  3. ## NOC modules
  4. from noc.sa.profiles import Profile as NOCProfile
  5.  
  6.  
  7. class Profile(NOCProfile):
  8. name = "Orion.Alpha"
  9. supported_schemes = [NOCProfile.TELNET, NOCProfile.SSH]
  10. pattern_more = [
  11. (r"^ --More--", "\n"),
  12. (r"\?\s*\[confirm\]", "\n"),
  13. (r"^.*\[Y/N\][:\ ]?", "Y\n")
  14. ]
  15. pattern_unpriveleged_prompt = r"^\S+?>"
  16. pattern_syntax_error = r"% Invalid input detected at|% Ambiguous command:|% Incomplete command."
  17. command_disable_pager = "terminal length 0"
  18. command_super = "enable"
  19. command_enter_config = "configure terminal"
  20. command_leave_config = "end"
  21. command_exit = "exit"
  22. command_save_config = "write"
  23. pattern_prompt = r"(^(?P<hostname>[a-zA-Z0-9]\S{0,19})(?:[-_\d\w]+)?(?:\(config[^\)]*\))?#)|(close telnet connection!)"
  24. requires_netmask_conversion = True
  25. convert_mac = NOCProfile.convert_mac_to_dashed
  26. command_exit = "exit"
  27. #config_volatile = ["^ntp clock-period .*?^"]
  28.  
  29. #def shutdown_session(self, script):
  30. # script.cli("exit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement