Skip to content
This repository has been archived by the owner on Nov 23, 2019. It is now read-only.

NetworkInspectWithRaw returns no corresponding types.NetworkResource and []byte ! #292

Open
allencloud opened this issue Jun 30, 2016 · 3 comments

Comments

@allencloud
Copy link
Contributor

Hi, All,

Today, I found that docker network inspect NETWORK shows engine details when this command is against Swarm.

See docker-archive/classicswarm#2349 and docker-archive/classicswarm#2275

In the response of NetworkInspectWithRaw from Swarm, there is additional Engine field in it. And dockercli implemented by github.com/spf13/cobra takes []byte to format the output.
If the initial purpose of NetworkInspectWithRaw, is it []byte should be exactly correspond to types.NetworkResource.

func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string) (types.NetworkResource, []byte, error)

If the answer is yes, I think we should fix this. Maybe I can do the change.

@dnephin
Copy link
Contributor

dnephin commented Jun 30, 2016

The response returned by this endpoint should match the type, yes. I think we need to fix the type.

@allencloud
Copy link
Contributor Author

#dibs

@dongluochen
Copy link
Contributor

Yes we should make swarm API same as docker API.

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

No branches or pull requests

3 participants