diff --git a/api/client/info.go b/api/client/info.go index 29e081d445..b309dbfeed 100644 --- a/api/client/info.go +++ b/api/client/info.go @@ -2,6 +2,7 @@ package client import ( "fmt" + "strings" Cli "github.com/docker/docker/cli" "github.com/docker/docker/pkg/ioutils" @@ -43,16 +44,18 @@ func (cli *DockerCli) CmdInfo(args ...string) error { fmt.Fprintf(cli.out, "Plugins: \n") fmt.Fprintf(cli.out, " Volume:") - for _, driver := range info.Plugins.Volume { - fmt.Fprintf(cli.out, " %s", driver) - } + fmt.Fprintf(cli.out, " %s", strings.Join(info.Plugins.Volume, " ")) fmt.Fprintf(cli.out, "\n") fmt.Fprintf(cli.out, " Network:") - for _, driver := range info.Plugins.Network { - fmt.Fprintf(cli.out, " %s", driver) - } + fmt.Fprintf(cli.out, " %s", strings.Join(info.Plugins.Network, " ")) fmt.Fprintf(cli.out, "\n") + if len(info.Plugins.Authorization) != 0 { + fmt.Fprintf(cli.out, " Authorization:") + fmt.Fprintf(cli.out, " %s", strings.Join(info.Plugins.Authorization, " ")) + fmt.Fprintf(cli.out, "\n") + } + ioutils.FprintfIfNotEmpty(cli.out, "Kernel Version: %s\n", info.KernelVersion) ioutils.FprintfIfNotEmpty(cli.out, "Operating System: %s\n", info.OperatingSystem) ioutils.FprintfIfNotEmpty(cli.out, "OSType: %s\n", info.OSType) diff --git a/api/types/types.go b/api/types/types.go index f53c7ea7bd..c4267858d3 100644 --- a/api/types/types.go +++ b/api/types/types.go @@ -243,6 +243,8 @@ type PluginsInfo struct { Volume []string // List of Network plugins registered Network []string + // List of Authorization plugins registered + Authorization []string } // ExecStartCheck is a temp struct used by execStart diff --git a/daemon/info.go b/daemon/info.go index 76427cc351..9e7304fd4e 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -142,9 +142,17 @@ func (daemon *Daemon) showPluginsInfo() types.PluginsInfo { pluginsInfo.Network = append(pluginsInfo.Network, nd) } + pluginsInfo.Authorization = daemon.GetAuthorizationPluginsList() + return pluginsInfo } +// GetAuthorizationPluginsList returns the list of plugins drivers +// registered for authorization. +func (daemon *Daemon) GetAuthorizationPluginsList() []string { + return daemon.configStore.AuthZPlugins +} + // The uppercase and the lowercase are available for the proxy settings. // See the Go specification for details on these variables. https://golang.org/pkg/net/http/ func getProxyEnv(key string) string {