OLTBase.py 900 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. class OLTBase:
  2. model = None
  3. ssh = None
  4. def __init__(self, model, ssh):
  5. self.model = model
  6. self.ssh = ssh
  7. def get_expected_name(self):
  8. return "name:"
  9. def get_expected_password(self):
  10. return "password:"
  11. def get_expected_cardinal(self):
  12. return "#"
  13. def get_expected_initial(self):
  14. return ">"
  15. def run_enable(self):
  16. return False
  17. def run_enable_password(self):
  18. return True
  19. def get_write_enable(self):
  20. return "enable"
  21. def get_expected_enable_password(self):
  22. return "Password:"
  23. def get_write_exit(self):
  24. return "exit"
  25. def get_expected_exit(self):
  26. return None
  27. def get_expected_exit_with_confirmation(self):
  28. return None
  29. def get_write_exit_confirmation(self):
  30. return None
  31. def get_character_error(self):
  32. return "^"