Skip to content
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

enhancement: Handle "mount" and "network" for LinuxNamespaceType #187

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

Apokleos
Copy link
Contributor

Current implementation of LinuxNamespaceType::try_from only recognizes "mnt" and "net" for Mount and Network namespaces respectively. This commit expands accepted strings to include "mount" and "network" for better compatibility with potential use cases.

Fixes #186

Current implementation of LinuxNamespaceType::try_from only
recognizes "mnt" and "net" for Mount and Network namespaces
respectively. This commit expands accepted strings to include
"mount" and "network" for better compatibility with potential
use cases.

Fixes youki-dev#186

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
@Apokleos
Copy link
Contributor Author

Hi @saschagrunert @utam0k PTAL! Thx very much

@@ -828,13 +828,13 @@ impl TryFrom<&str> for LinuxNamespaceType {

fn try_from(namespace: &str) -> Result<Self, Self::Error> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I use the same way LinuxNamespace::try_from(ns_str)? in my project too.
Thx @utam0k @saschagrunert and the great project oci-spec-rs

@utam0k
Copy link
Member

utam0k commented Jul 11, 2024

Thanks, @Apokleos

@utam0k utam0k merged commit 1b54239 into youki-dev:main Jul 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants