diff --git a/IM/ConfManager.py b/IM/ConfManager.py index 75fc4954a..3f87b6be4 100644 --- a/IM/ConfManager.py +++ b/IM/ConfManager.py @@ -756,8 +756,7 @@ def generate_playbook(self, vm, ctxt_elem, tmp_dir): """ recipe_files = [] - conf_filename = tmp_dir + "/" + ctxt_elem.configure + \ - "_" + ctxt_elem.system + "_task.yml" + conf_filename = tmp_dir + "/" + ctxt_elem.configure + "_" + ctxt_elem.system + "_task.yml" if not os.path.isfile(conf_filename): configure = self.inf.radl.get_configure_by_name(ctxt_elem.configure) conf_content = self.add_ansible_header(vm.getOS().lower()) @@ -996,8 +995,7 @@ def generate_playbooks_and_hosts(self): if self.inf.radl.configures: for elem in self.inf.radl.configures: if elem is not None and not os.path.isfile(tmp_dir + "/" + elem.name + ".yml"): - conf_out = open( - tmp_dir + "/" + elem.name + ".yml", 'w') + conf_out = open(tmp_dir + "/" + elem.name + ".yml", 'w') conf_out.write(elem.recipes) conf_out.write("\n\n") conf_out.close() diff --git a/IM/VirtualMachine.py b/IM/VirtualMachine.py index cf90dd072..708a1c040 100644 --- a/IM/VirtualMachine.py +++ b/IM/VirtualMachine.py @@ -920,11 +920,9 @@ def get_ctxt_log(self, remote_dir, ssh, delete=False): self.log_debug("Get File: " + remote_dir + '/ctxt_agent.log') ssh.sftp_get(remote_dir + '/ctxt_agent.log', tmp_dir + '/ctxt_agent.log') with open(tmp_dir + '/ctxt_agent.log') as f: - conf_out = f.read() - - # Remove problematic chars - conf_out = str("".join(list(filter(lambda x: x in string.printable, - conf_out))).encode("ascii", "replace").decode("utf-8")) + # Read removing problematic chars + conf_out = str("".join(list(filter(lambda x: x in string.printable, + f.read()))).encode("ascii", "replace").decode("utf-8")) try: if delete: ssh.sftp_remove(remote_dir + '/ctxt_agent.log') diff --git a/changelog b/changelog index 7e331d02d..9fb11f3f7 100644 --- a/changelog +++ b/changelog @@ -590,4 +590,8 @@ IM 1.9.2: IM 1.9.3: * Support for ex_tenant_domain_id due to change in libcloud. * Error getting EC2 instance types. - * Error deleting SGs in some OpenStack sites. \ No newline at end of file + * Error deleting SGs in some OpenStack sites. + +IM 1.9.4: + * Reduce the number of SSH logins. + * Fix python 3 issues.