def show_version_queue(a_device, output_q):
 output_dict = {}
 creds = a_device.credentials
 remote_conn = ConnectHandler(device_type=a_device.device_type, ip=a_device.ip_address, username=creds.username, password=creds.password, port=a_device.port, secret='', verbose=False)
 output = (('#' * 80) + '\n')
 output += (remote_conn.send_command_expect('show version') + '\n')
 output += (('#' * 80) + '\n')
 output_dict[a_device.device_name] = output
 output_q.put(output_dict)

def show_version_queue ( a_device , output_q ) : output_dict = { } creds = a_device . credentials remote_conn = ConnectHandler ( device_type = a_device . device_type , ip = a_device . ip_address , username = creds . username , password = creds . password , port = a_device . port , secret = '' , verbose = False ) output = ( ( '#' * 80 ) + '\n' ) output += ( remote_conn . send_command_expect ( 'show version' ) + '\n' ) output += ( ( '#' * 80 ) + '\n' ) output_dict [ a_device . device_name ] = output output_q . put ( output_dict )
use netmiko to execute show version .