MCPcopy Create free account
hub / github.com/apache/cloudstack / is_server_ssh_ready

Function is_server_ssh_ready

tools/marvin/marvin/lib/utils.py:167–190  ·  view source on GitHub ↗

@Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, others information need to be added @Output:object for SshClient Name of the function is little misnomer and is not verifying anything as such mentioned

(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None)

Source from the content-addressed store, hash-verified

165 obj.delete(api_client)
166
167def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None):
168 '''
169 @Name: is_server_ssh_ready
170 @Input: timeout: tcp connection timeout flag,
171 others information need to be added
172 @Output:object for SshClient
173 Name of the function is little misnomer and is not
174 verifying anything as such mentioned
175 '''
176
177 try:
178 ssh = SshClient(
179 host=ipaddress,
180 port=port,
181 user=username,
182 passwd=password,
183 keyPairFiles=keyPairFileLocation,
184 retries=retries,
185 delay=retryinterv,
186 timeout=timeout)
187 except Exception as e:
188 raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, str(e)))
189 else:
190 return ssh
191
192
193def format_volume_to_ext3(ssh_client, device="/dev/sda"):

Callers 5

get_ssh_clientMethod · 0.90
restart_mgmt_serverFunction · 0.90
test_01_configurationMethod · 0.90
restart_mgmt_serverFunction · 0.70

Calls 1

SshClientClass · 0.90