From 0ae9598f96597d13e961413b98160678a78dd062 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 7 Nov 2016 18:51:47 -0800 Subject: [PATCH] rename plugin manifest Signed-off-by: Victor Vieux --- command/plugin/create.go | 14 +++++++------- command/plugin/list.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/command/plugin/create.go b/command/plugin/create.go index 3b18ed3750..94c0d2c367 100644 --- a/command/plugin/create.go +++ b/command/plugin/create.go @@ -24,14 +24,14 @@ func validateTag(rawRepo string) error { return err } -// validateManifest ensures that a valid manifest.json is available in the given path -func validateManifest(path string) error { - dt, err := os.Open(filepath.Join(path, "manifest.json")) +// validateConfig ensures that a valid config.json is available in the given path +func validateConfig(path string) error { + dt, err := os.Open(filepath.Join(path, "config.json")) if err != nil { return err } - m := types.PluginManifest{} + m := types.PluginConfig{} err = json.NewDecoder(dt).Decode(&m) dt.Close() @@ -64,8 +64,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command { options := pluginCreateOptions{} cmd := &cobra.Command{ - Use: "create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS (rootfs + manifest.json)", - Short: "Create a plugin from a rootfs and manifest", + Use: "create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS (rootfs + config.json)", + Short: "Create a plugin from a rootfs and config", Args: cli.RequiresMinArgs(2), RunE: func(cmd *cobra.Command, args []string) error { options.repoName = args[0] @@ -96,7 +96,7 @@ func runCreate(dockerCli *command.DockerCli, options pluginCreateOptions) error return err } - if err := validateManifest(options.context); err != nil { + if err := validateConfig(options.context); err != nil { return err } diff --git a/command/plugin/list.go b/command/plugin/list.go index 9d4b46d120..e402d44b31 100644 --- a/command/plugin/list.go +++ b/command/plugin/list.go @@ -47,7 +47,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error { fmt.Fprintf(w, "\n") for _, p := range plugins { - desc := strings.Replace(p.Manifest.Description, "\n", " ", -1) + desc := strings.Replace(p.Config.Description, "\n", " ", -1) desc = strings.Replace(desc, "\r", " ", -1) if !opts.noTrunc { desc = stringutils.Ellipsis(desc, 45)