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

Add support for removing a network by id #1581

Merged
merged 3 commits into from
Dec 4, 2022

Conversation

Mihai22125
Copy link
Contributor

Resolves #1568

First time contributor, so any feedback would be more than welcomed!

@Mihai22125 Mihai22125 force-pushed the remove_net_by_id branch 3 times, most recently from c79a006 to b153479 Compare December 1, 2022 11:37
@Zheaoli
Copy link
Member

Zheaoli commented Dec 1, 2022

And maybe we need extra docs change here to let people know they can delete network by id

@Zheaoli Zheaoli modified the milestone: v1.1.0 Dec 1, 2022
Req string // The raw request string. name, short ID, or long ID.
MatchIndex int // Begins with 0, up to MatchCount - 1.
MatchCount int // 1 on exact match. > 1 on ambiguous match. Never be <= 0.
UniqueImages int // Number of unique images in all found images.
Copy link
Member

Choose a reason for hiding this comment

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

You can remove UniqueImages since it's not used and not relevant to network.

@Mihai22125
Copy link
Contributor Author

Thanks for the review! I will address all comments soon.

@Mihai22125 Mihai22125 requested review from Zheaoli and djdongjin and removed request for Zheaoli December 1, 2022 16:45
Copy link
Member

@djdongjin djdongjin left a comment

Choose a reason for hiding this comment

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

You may squash into 1 commit and sign.

CI will fail if you have any non-signed commits (394e817)

Copy link
Member

@Zheaoli Zheaoli left a comment

Choose a reason for hiding this comment

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

LGTM on CI green

@@ -0,0 +1,74 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Should this be in pkg/idutil/netwalker for consistency with other objects?
https://github.com/containerd/nerdctl/tree/main/pkg/idutil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @AkihiroSuda, I was thinking about this too, but networkConfig is not exported outside of netutil package, so the only solution I could figure out was to implement the walker in the same package as the struct.

Copy link
Member

Choose a reason for hiding this comment

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

You can make the networkConfig as a public struct.

I agree with @AkihiroSuda; all of the walkers could be put together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AkihiroSuda @Zheaoli Addressed, please review

Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot delete network by ID
4 participants