diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-07-27 10:27:14 -0600 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-07-27 10:27:14 -0600 |
commit | ca276f452540f68c08cb3df9049e9e7876364dac (patch) | |
tree | ce26c5fb721f10402669bf761c4e69317d3f3eca /snaps/openstack/create_instance.py | |
parent | fdcd5600bade294ae2a2207ef01da92f22f64327 (diff) |
Ensure library and tests close all necessary resources.
The SNAPS-OO library and tests had left open files, ssh, and scp
connections. These have all now been wrapped with try/finally
blocks.
JIRA: SNAPS-152
Change-Id: I43e09978b5c075bd78ff3279c0799556b8758878
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r-- | snaps/openstack/create_instance.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py index d5917a8..997b5a5 100644 --- a/snaps/openstack/create_instance.py +++ b/snaps/openstack/create_instance.py @@ -618,6 +618,7 @@ class OpenStackVmInstance: if len(self.__floating_ips) > 0: ssh = self.ssh_client() if ssh: + ssh.close() return True return False |