[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/10] python/aqmp: remove _new_session and _establish_connec
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 03/10] python/aqmp: remove _new_session and _establish_connection |
Date: |
Fri, 4 Mar 2022 17:50:39 +0000 |
User-agent: |
Mutt/2.1.5 (2021-12-30) |
On Fri, Feb 25, 2022 at 03:59:41PM -0500, John Snow wrote:
> These two methods attempted to entirely envelop the logic of
> establishing a connection to a peer start to finish. However, we need to
> break apart the incoming connection step into more granular steps. We
> will no longer be able to reasonably constrain the logic inside of these
> helper functions.
>
> So, remove them - with _session_guard(), they no longer serve a real
> purpose.
>
> Although the public API doesn't change, the internal API does. Now that
> there are no intermediary methods between e.g. connect() and
> _do_connect(), there's no hook where the runstate is set. As a result,
> the test suite changes a little to cope with the new semantics of
> _do_accept() and _do_connect().
>
> Lastly, take some pieces of the now-deleted docstrings and move
> them up to the public interface level. They were a little more detailed,
> and it won't hurt to keep them.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> python/qemu/aqmp/protocol.py | 117 ++++++++++++++---------------------
> python/tests/protocol.py | 10 ++-
> 2 files changed, 53 insertions(+), 74 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 03/10] python/aqmp: remove _new_session and _establish_connection,
Daniel P . Berrangé <=