ciscoTP_example.py 672 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python
  2. '''
  3. Test Netmiko on Cisco TelePresence Video device (C, SX, DX, EX, MX)
  4. '''
  5. from netmiko import ConnectHandler, cisco
  6. mydevice = {
  7. 'device_type': 'cisco_tp',
  8. 'ip': '192.168.105.1',
  9. 'username': 'admin',
  10. 'password': 'Tandberg',
  11. 'verbose':True
  12. }
  13. ssh_conn = ConnectHandler(**mydevice)
  14. print( "\n\n")
  15. command_list = ['help', 'whoami', 'whoaami', 'echo test', 'xconfig']
  16. #command_list = ['help', 'whoami', 'whoaami', 'echo test']
  17. ssh_conn = ConnectHandler(**mydevice)
  18. print( "\n\n")
  19. for command in command_list:
  20. print('>>> running command : ' + command)
  21. output = ssh_conn.send_command(command)
  22. print('Result = ' + output + '\n')