-
Notifications
You must be signed in to change notification settings - Fork 52
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
vsock: rename options to --client/--server #205
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The idea is to have other types of remote connections later on, e.g. SSH. So to support future types later on, the syntax is now: vng --server|--client [console|ssh] [--port PORT] [--remote-cmd COMMAND] The 'ssh' option is not available yet, but by default, 'console' will be used, so users can just do: $ vng --server $ vng --client # in another terminal A new group for the parser has been added to avoid confusions: --port and --remote-cmd are linked to --client/--server. While at it, the code for the console client/server has been moved to dedicated functions, grouped together. It will also be easy to support a new type later on, simply by calling a different function. Note that this should only be a refactoring, the behaviour, apart from different option name, should not be modified. The variables names have been renamed too. 'vsock' is now only used in virtme(-ng)-init and in the socat command. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
So it can also be used with SSH, and sounds more "familiar". Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Exit with an error if they are both defined. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Print the socat command instead of executing it. It might be more useful for the ssh command later, but still good to respect --dry-run there. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
For the --server and --client options. Plus mention the host's kernel needs to support VSOCK. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
matttbe
added a commit
to multipath-tcp/mptcp-upstream-virtme-docker
that referenced
this pull request
Dec 9, 2024
The new names, see [1] Link: arighi/virtme-ng#205 [1] Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
arighi
approved these changes
Dec 11, 2024
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.
Sorry for the late review. This is great, thank you so much for working at this @matttbe !!! I left a small comment but overall it looks great.
Less than 48h, that's not a late review ;-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea is to have other types of remote connections later on, e.g. SSH. See the discussion on #204.
So to support future types later on, the syntax is now:
The 'ssh' option is not available yet, but by default, 'console' will be used, so users can just do:
A new group for the parser has been added to avoid confusions:
--port
and--remote-cmd
are linked to--client
/--server
.While at it, the code for the console client/server has been moved to dedicated functions, grouped together. It will also be easy to support a new type later on, simply by calling a different function.
Note that this should only be a refactoring, the behaviour, apart from different option name, should not be modified.
The variables names have been renamed too. 'vsock' is now only used in
virtme(-ng)-init
and in thesocat
command.