From: Cleber Rosa <crosa@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: ldoktor@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel
Date: Tue, 3 Sep 2019 11:47:02 -0400 [thread overview]
Message-ID: <20190903154702.GA16524@localhost.localdomain> (raw)
In-Reply-To: <db34f470-5983-7965-c5b4-2b624fbe8e1b@redhat.com>
On Tue, Sep 03, 2019 at 05:22:48PM +0200, Philippe Mathieu-Daudé wrote:
> On 9/3/19 5:08 PM, Cleber Rosa wrote:
> > On Thu, Aug 29, 2019 at 11:46:15AM +0200, Philippe Mathieu-Daudé wrote:
> >>
> >> class avocado.utils.ssh.Session(address, credentials)
> >>
> >> Parameters:
> >>
> >> credentials (tuple)
> >> username and path to a key for authentication purposes
> >>
> >> The current test uses username + password.
> >> Can we use this credentials with the Avocado module?
> >> (The image used is prebuilt).
> >>
> >
> > I'm working on adding password based authentication. To keep the API
> > the same, I'm thinking of checking if the second credential item is an
> > existing file, if it is, assume one containing a key. If not, assume
> > it's a password.
>
> Why not use a dictionary? Keys would be explicit.
>
Now it's clear that a dict would've been the best option from the
beginning, but I was wrongly optimistic, and biased by the
"avocado.utils.vmimage" + "avocado.utils.cloudinit" combination, that
we'd only have to deal with key based auth.
So the question now is really how to evolve the API, either breaking
the current version or not. At this time, I'd try to keep the API
unchanged, given that it still feels logical that the tuple is about
credentials, just that the second item can be either a path to a key
or password.
Thoughts?
- Cleber.
> > This should make the use simple in the case of keys:
> >
> > with Session(('hostname', port),
> > ('username', '/path/to/key')) as session:
> > session.cmd('cmd')
> >
> > And passwords:
> >
> > with Session(('hostname', port),
> > ('username', 'p@ssw0rD')) as session:
> > session.cmd('cmd')
> >
> > It's being tracked here:
> > https://trello.com/c/uetpIgML/1517-avocadoutilssh-implement-password-based-auth
> >
> > I'll try to have it in Avocado's 72.0 release due next week.
> >
> > Let me know how that sounds, and thanks for the feedback.
> > - Cleber.
> >
next prev parent reply other threads:[~2019-09-03 16:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 1:31 [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel David Gibson
2019-08-29 1:51 ` David Gibson
2019-08-29 3:27 ` Cleber Rosa
2019-08-29 9:24 ` Philippe Mathieu-Daudé
2019-08-29 9:46 ` Philippe Mathieu-Daudé
2019-09-03 15:08 ` Cleber Rosa
2019-09-03 15:22 ` Philippe Mathieu-Daudé
2019-09-03 15:47 ` Cleber Rosa [this message]
2019-09-03 15:56 ` Lukáš Doktor
2019-09-03 15:57 ` Lukáš Doktor
2019-09-03 17:27 ` Eduardo Habkost
2019-09-03 22:33 ` Cleber Rosa
2019-09-03 15:18 ` Cleber Rosa
2019-08-30 17:56 ` Eduardo Habkost
2019-08-31 1:48 ` David Gibson
2019-09-03 15:31 ` Cleber Rosa
2019-09-04 19:57 ` Cleber Rosa
2019-09-05 2:09 ` David Gibson
2019-09-05 13:38 ` Cleber Rosa
2019-09-05 14:06 ` Eduardo Habkost
2019-09-05 15:24 ` Cleber Rosa
2019-09-06 0:34 ` David Gibson
2019-09-06 14:43 ` Eduardo Habkost
2019-09-06 14:52 ` Cleber Rosa
2019-09-06 15:14 ` Eduardo Habkost
2019-09-06 15:29 ` Cleber Rosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903154702.GA16524@localhost.localdomain \
--to=crosa@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=ldoktor@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).