-
Notifications
You must be signed in to change notification settings - Fork 604
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
Conversation
c79a006
to
b153479
Compare
And maybe we need extra docs change here to let people know they can delete network by id |
pkg/netutil/networkwalker.go
Outdated
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. |
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 can remove UniqueImages
since it's not used and not relevant to network.
Thanks for the review! I will address all comments soon. |
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 may squash into 1 commit and sign.
CI will fail if you have any non-signed commits (394e817)
19c08cf
to
f9481a0
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.
LGTM on CI green
pkg/netutil/networkwalker.go
Outdated
@@ -0,0 +1,74 @@ | |||
/* |
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.
Should this be in pkg/idutil/netwalker
for consistency with other objects?
https://github.com/containerd/nerdctl/tree/main/pkg/idutil
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.
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.
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 can make the networkConfig as a public struct.
I agree with @AkihiroSuda; all of the walkers could be put together.
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.
@AkihiroSuda @Zheaoli Addressed, please review
Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
f9481a0
to
827cd34
Compare
Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
Signed-off-by: Mihai Timbota-Belin <mihai.mtb10@gmail.com>
827cd34
to
01ca115
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.
Thanks
Resolves #1568
First time contributor, so any feedback would be more than welcomed!