All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/acceptance: linux-related tests fix
@ 2021-02-19 11:04 Pavel Dovgalyuk
  2021-02-19 15:43 ` Willian Rampazzo
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Dovgalyuk @ 2021-02-19 11:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: pavel.dovgalyuk, philmd, wrampazz, crosa, pbonzini, alex.bennee

This patch allows cloudinit images download when ssh
key is not specified.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
---
 tests/acceptance/avocado_qemu/__init__.py |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index df167b142c..4ac9f72876 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -304,8 +304,10 @@ def prepare_cloudinit(self, ssh_pubkey=None):
         try:
             cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
             self.phone_home_port = network.find_free_port()
-            with open(ssh_pubkey) as pubkey:
-                pubkey_content = pubkey.read()
+            pubkey_content = None
+            if ssh_pubkey:
+                with open(ssh_pubkey) as pubkey:
+                    pubkey_content = pubkey.read()
             cloudinit.iso(cloudinit_iso, self.name,
                           username='root',
                           password='password',



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/acceptance: linux-related tests fix
  2021-02-19 11:04 [PATCH] tests/acceptance: linux-related tests fix Pavel Dovgalyuk
@ 2021-02-19 15:43 ` Willian Rampazzo
  0 siblings, 0 replies; 2+ messages in thread
From: Willian Rampazzo @ 2021-02-19 15:43 UTC (permalink / raw)
  To: Pavel Dovgalyuk
  Cc: Alex Bennée, Paolo Bonzini, Philippe Mathieu Daude,
	qemu-devel, Cleber Rosa Junior

On Fri, Feb 19, 2021 at 8:07 AM Pavel Dovgalyuk
<pavel.dovgalyuk@ispras.ru> wrote:
>
> This patch allows cloudinit images download when ssh
> key is not specified.
>
> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
> ---
>  tests/acceptance/avocado_qemu/__init__.py |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-19 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 11:04 [PATCH] tests/acceptance: linux-related tests fix Pavel Dovgalyuk
2021-02-19 15:43 ` Willian Rampazzo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.