|
|
@ -16,11 +16,13 @@ def login(config, user, password, sysid):
|
|
|
|
ssh.run_ssh(config, command, 'scripts')
|
|
|
|
ssh.run_ssh(config, command, 'scripts')
|
|
|
|
sleep(1)
|
|
|
|
sleep(1)
|
|
|
|
filename = sysid + "success.txt"
|
|
|
|
filename = sysid + "success.txt"
|
|
|
|
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
|
|
|
output = ssh.check_for_file(config, filename, 'receivelogin')
|
|
|
|
|
|
|
|
if output == False:
|
|
|
|
filename = sysid + "fail.txt"
|
|
|
|
filename = sysid + "fail.txt"
|
|
|
|
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
|
|
|
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
|
|
|
raise ValueError("Unable to determine login status")
|
|
|
|
raise ValueError("Unable to determine login status")
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
fprint(output)
|