From fb7e45079470427a794f33e550db9515a640e277 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 24 Feb 2019 10:58:40 +0100 Subject: Ease copying/pasting the private keys from logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8f1ccdb709dbb3e7a22a404c036714dd848dd87d Signed-off-by: Cédric Ollivier (cherry picked from commit f6b2577f4e052f493f6359265fc473fe98830b62) --- functest/core/singlevm.py | 2 +- functest/opnfv_tests/vnf/ims/heat_ims.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py index ec7f967ec..16c066ef6 100644 --- a/functest/core/singlevm.py +++ b/functest/core/singlevm.py @@ -353,7 +353,7 @@ class SingleVm1(VmReady1): self.keypair = self.cloud.create_keypair( '{}-kp_{}'.format(self.case_name, self.guid)) self.__logger.debug("keypair: %s", self.keypair) - self.__logger.debug("private_key: %s", self.keypair.private_key) + self.__logger.debug("private_key:\n%s", self.keypair.private_key) with open(self.key_filename, 'w') as private_key_file: private_key_file.write(self.keypair.private_key) self.sec = self.cloud.create_security_group( diff --git a/functest/opnfv_tests/vnf/ims/heat_ims.py b/functest/opnfv_tests/vnf/ims/heat_ims.py index 7bd4f207e..9c2fded78 100644 --- a/functest/opnfv_tests/vnf/ims/heat_ims.py +++ b/functest/opnfv_tests/vnf/ims/heat_ims.py @@ -101,7 +101,7 @@ class HeatIms(singlevm.VmReady2): domain=self.project.domain.id) self.keypair = self.cloud.create_keypair( '{}-kp_{}'.format(self.case_name, self.guid)) - self.__logger.info("keypair: %s", self.keypair.private_key) + self.__logger.info("keypair:\n%s", self.keypair.private_key) if self.deploy_vnf() and self.test_vnf(): self.result = 100 -- cgit 1.2.3-korg