Exemple #1
0
def nrun(cmd, argv, path=CMD_PATH):
	ssh = SSHConnect('esxi-server', password='******')
	args = (reduce(lambda x,y: '%s %s ' % (x,y), argv)).strip()
	cmd = r'%s/%s %s' % (path, cmd, args)
	try:
		ssh.nrun(cmd)
		ssh.close()
	except Exception, e:
		ssh.close()
		print e
Exemple #2
0
def nrun(cmd, argv, path=CMD_PATH):
    ssh = SSHConnect('esxi-server', password='******')
    args = (reduce(lambda x, y: '%s %s ' % (x, y), argv)).strip()
    cmd = r'%s/%s %s' % (path, cmd, args)
    try:
        ssh.nrun(cmd)
        ssh.close()
    except Exception, e:
        ssh.close()
        print e