-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conn: add container/podman/docker connection #67
Conversation
Previously, we would try to connect also to hosts that are not required by selected test. Those hosts are likely to be offline, therefore --mh-lazy-ssh was wrongly required.
We will add a generic connection API so other methods besides ssh can be used. This call is used to login to the host as given user and to test the ssh connection. It is test specific and if it is needed it should be provided by the test framework built on pytest-mh, not by pytest-mh itself.
Documentation is not included. After this is merged, I plan to restructuralize and rewrite the documentation so it can contain all the new features we added lately. |
This replaces current SSH connection class with generic interface. SSHClient now implements this interface. This allows us to write additional connectors like podman or winrm. This is a big change that breaks backwards compatibility: * `MultihostHost.ssh: SSHClient` was replaced by `MultihostHost.conn:Connection`
Why not keep the "ssh:" section intact? |
I want to keep the amount of reserved keywords minimal. This way, we have reserved only "conn", instead of "conn_type", "ssh", "podman" and "docker". |
Why not |
Great idea. Thank you. Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good! I haven't had a chance to test it yet. Do you want me to approve it, or can I get to it early next week?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks
This pull requests introduce a generic connection class so we
are no longer bounded to SSH. It also implements a container
connection so podman or docker can be used instead.
This brings some breaking changes:
ssh
configuration was replaced withconn
host.ssh
was replaced withhost.conn
Example configuration for SSH:
Example configuration for podman: