-
Notifications
You must be signed in to change notification settings - Fork 298
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
feat: allow to ssh to podman virtual machine - api.d.ts changes #9382
base: main
Are you sure you want to change the base?
feat: allow to ssh to podman virtual machine - api.d.ts changes #9382
Conversation
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.
you should add some sample/typedoc
also I don't understand starConnection and stopConnection
setWindow
should be maybe resize
The start/stop is used in stop ssh connection at first if there is any/ or to start the connection when are all callbacks set The |
Signed-off-by: Evzen Gasta <[email protected]>
34a60d5
to
0843f0f
Compare
0843f0f
to
8bea74e
Compare
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.
I think the API might be hard to understand if you still use ssh2 method as setWindow means nothing here, so please use resize as we're resizing
Then I'm not sure the on callback should be there if you follow that approach of having also "start and stop"
because the on callback and write are useless if you're not connected as they're tied to a connection/session
it means, from API POV, the events and method to interact with a session should only be part of the result of the start()
And from what I see, it's more to connect/disconnect than start and stop
or open and close
so maybe it's connect() method that gives you an object and on this object you have the on('data', 'error', 'end') events and the write method and the disconnect and the resize
also please remove any mention of 'ssh connection' as it's up to the implementation to see how it connects. API is not relying on ssh
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.
I'm not sure that write is with string parameter, maybe it could also be Uint8Array
8bea74e
to
f4f58de
Compare
f4f58de
to
7da4b99
Compare
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.
you might add samples with @example
7da4b99
to
916cde0
Compare
How can I test as you are doing in the video, which branches should I combined with this PR ? |
@axel7083 all changes are in https://github.com/gastoner/podman-desktop/tree/provide_ability_to_easily_get_a_shell_in_a_machine_test branch Otherwise there is a provide_ability_to_easily_get_a_shell_in_a_machine + "a"/"b"/"c" branches (4 total) |
Signed-off-by: Evzen Gasta <[email protected]>
916cde0
to
359d02f
Compare
Signed-off-by: Evzen Gasta <[email protected]>
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.
LGTM
What does this PR do?
Provide the ability to ssh to podman machine - api.d.ts changes
1/4 PR's
-Needs to be merged first
Screenshot / video of UI
Screen.Recording.2024-10-15.145316.mp4
What issues does this PR fix or reference?
Part of #889
How to test this PR?
Create a podman machine, open terminal