Setup ssh client connection and return connection
(self, ip, username, password, retries=10)
| 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] |
no test coverage detected