Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Clean unused functions#56

Merged
calavera merged 1 commit intodocker-archive-public:masterfrom
WeiZhang555:IsPreDefinedNetwork
Jan 28, 2016
Merged

Clean unused functions#56
calavera merged 1 commit intodocker-archive-public:masterfrom
WeiZhang555:IsPreDefinedNetwork

Conversation

@WeiZhang555
Copy link
Contributor

This is a duplicate function of docker/runconfig/hostconfig_unix.go, and we shouldn't call it from client side because it's related to platform.

For example, if we have docker daemon running on Linux platform and client running on Windows platform, it's unmeaning for client to call IsPreDefinedNetwork.

Actually I think we can remove the whole file for same reason, and also some other functions. What do you think of this? @calavera

Signed-off-by: Zhang Wei [email protected]

IsPreDefinedNetwork shouldn't be called from client side because it's
related to server's platform and can only be decided from server side.

Signed-off-by: Zhang Wei <[email protected]>
@calavera
Copy link
Contributor

I think it makes sense to remove this functions. I rather not remove the whole files for now, until we're certain this is safe. I understand your point, we've had similar discussions before, I'd like to have someone's else eyes on it first.

@dnephin
Copy link
Contributor

dnephin commented Jan 28, 2016

I think removing this function, IsUserDefined() and UserDefined() makes sense. That logic belongs in the daemon.

I think the rest of the file is really just implementing a nicer interface for an enum and it's safe to call it from the client (although maybe not completely necessary).

calavera added a commit that referenced this pull request Jan 28, 2016
@calavera calavera merged commit 3114db8 into docker-archive-public:master Jan 28, 2016
@WeiZhang555
Copy link
Contributor Author

Yes, the reason why I'm trying to remove this function is I made some modifications once in moby/moby#19431, since this is unmeaning for client to call it, I think we'd better remove it, or we have to modify this duplicate function every time Docker makes some changes on it.

@WeiZhang555
Copy link
Contributor Author

And thank you for help review! 😄

@WeiZhang555 WeiZhang555 deleted the IsPreDefinedNetwork branch January 29, 2016 01:39
@calavera calavera mentioned this pull request Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants