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

Method get_ssh_client

test/integration/smoke/test_scale_vm.py:173–183  ·  view source on GitHub ↗

Setup ssh client connection and return connection

(self, ip, username, password, retries=10)

Source from the content-addressed store, hash-verified

171 return
172
173 def get_ssh_client(self, ip, username, password, retries=10):
174 """ Setup ssh client connection and return connection """
175 try:
176 ssh_client = SshClient(ip, 22, username, password, retries)
177 except Exception as e:
178 raise self.skipTest("Unable to create ssh connection: " % e)
179
180 self.assertIsNotNone(
181 ssh_client, "Failed to setup ssh connection to ip=%s" % ip)
182
183 return ssh_client
184
185 def is_host_xcpng8(self, hostname):
186 return type(hostname) == list and len(hostname) > 0 and 'XCP-ng 8' in hostname[0]

Calls 1

SshClientClass · 0.90

Tested by

no test coverage detected