summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/platforms/instances.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-07-27 16:04:08 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-07-27 16:04:08 +0000
commit361ae34d3fd2f5784ddac23c6650ac5a8f2e14cd (patch)
treedd2a634fea8602a87cc85c484bf93f0476431f81 /tests/cloud_tests/platforms/instances.py
parent3146c96a7a740427ac6e65f9b29239f247ecc617 (diff)
downloadvyos-cloud-init-361ae34d3fd2f5784ddac23c6650ac5a8f2e14cd.tar.gz
vyos-cloud-init-361ae34d3fd2f5784ddac23c6650ac5a8f2e14cd.zip
tests: improve LXDInstance trying to workaround or catch bug.
Described in bug 1783198 we have seen some transient failures when using pylxd -> lxd api. This does: * adds a str() representation of LXDInstance * checks the value of the pylxd_container object on instantion * sets pylxd_container object to None on deletion. * adds retry logic to shutdown()
Diffstat (limited to 'tests/cloud_tests/platforms/instances.py')
-rw-r--r--tests/cloud_tests/platforms/instances.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cloud_tests/platforms/instances.py b/tests/cloud_tests/platforms/instances.py
index 95bc3b16..529e79cd 100644
--- a/tests/cloud_tests/platforms/instances.py
+++ b/tests/cloud_tests/platforms/instances.py
@@ -97,7 +97,8 @@ class Instance(TargetBase):
return self._ssh_client
if not self.ssh_ip or not self.ssh_port:
- raise ValueError
+ raise ValueError("Cannot ssh_connect, ssh_ip=%s ssh_port=%s" %
+ (self.ssh_ip, self.ssh_port))
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())