Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] cetmix_tower_server: Connection test #181

5 changes: 1 addition & 4 deletions cetmix_tower_server/models/cetmix_tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,10 @@ def server_check_ssh_connection(self, server_reference, attempts=5, timeout=15):
elif server.ssh_auth_mode == "k":
ssh_params["ssh_key"] = server.ssh_key_id.sudo().secret_value

# Initialize SSH connection instance
ssh_connection = SSH(**ssh_params)

# Try connecting multiple times
for attempt in range(1, attempts + 1):
try:
ssh_connection.connection()
ssh_connection = SSH(**ssh_params)
ivs-cetmix marked this conversation as resolved.
Show resolved Hide resolved
return {
"code": 0,
"message": _("Connection successful."),
Expand Down
Loading