engine-api
engine-api copied to clipboard
NetworkInspectWithRaw returns no corresponding types.NetworkResource and []byte !
Hi, All,
Today, I found that docker network inspect NETWORK shows engine details when this command is against Swarm.
See https://github.com/docker/swarm/issues/2349 and https://github.com/docker/swarm/pull/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.
The response returned by this endpoint should match the type, yes. I think we need to fix the type.
#dibs
Yes we should make swarm API same as docker API.