test_extreme_switch.py 652 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. '''
  3. This will run an ssh command successfully on an extreme switch and so SSH must
  4. be enabled on the device
  5. '''
  6. from __future__ import print_function
  7. from netmiko import ConnectHandler
  8. def main():
  9. '''
  10. This will run an ssh command successfully on an extreme switch and so SSH must
  11. be enabled on the device
  12. '''
  13. extremehandle = {
  14. 'device_type':'extreme',
  15. 'ip' : '10.54.116.175',
  16. 'username':'admin',
  17. 'password':''}
  18. net_connect = ConnectHandler(**extremehandle)
  19. output = net_connect.send_command('show config vlan')
  20. print(output)
  21. if __name__ == "__main__":
  22. main()