Change "service inspect" to show defaults in place of empty fields

This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e62ea2e54d
Component: cli
This commit is contained in:
Aaron Lehmann
2017-04-10 13:41:16 -07:00
parent 2e6cb8b129
commit 0a65a7c11d
8 changed files with 14 additions and 8 deletions
@@ -85,7 +85,7 @@ func ServiceProgress(ctx context.Context, client client.APIClient, serviceID str
)
for {
service, _, err := client.ServiceInspectWithRaw(ctx, serviceID)
service, _, err := client.ServiceInspectWithRaw(ctx, serviceID, types.ServiceInspectOptions{})
if err != nil {
return err
}