rename plugin manifest

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2016-11-07 18:51:47 -08:00
parent e876381912
commit 0ae9598f96
2 changed files with 8 additions and 8 deletions

View File

@ -24,14 +24,14 @@ func validateTag(rawRepo string) error {
return err return err
} }
// validateManifest ensures that a valid manifest.json is available in the given path // validateConfig ensures that a valid config.json is available in the given path
func validateManifest(path string) error { func validateConfig(path string) error {
dt, err := os.Open(filepath.Join(path, "manifest.json")) dt, err := os.Open(filepath.Join(path, "config.json"))
if err != nil { if err != nil {
return err return err
} }
m := types.PluginManifest{} m := types.PluginConfig{}
err = json.NewDecoder(dt).Decode(&m) err = json.NewDecoder(dt).Decode(&m)
dt.Close() dt.Close()
@ -64,8 +64,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
options := pluginCreateOptions{} options := pluginCreateOptions{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS (rootfs + manifest.json)", Use: "create [OPTIONS] reponame[:tag] PATH-TO-ROOTFS (rootfs + config.json)",
Short: "Create a plugin from a rootfs and manifest", Short: "Create a plugin from a rootfs and config",
Args: cli.RequiresMinArgs(2), Args: cli.RequiresMinArgs(2),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
options.repoName = args[0] options.repoName = args[0]
@ -96,7 +96,7 @@ func runCreate(dockerCli *command.DockerCli, options pluginCreateOptions) error
return err return err
} }
if err := validateManifest(options.context); err != nil { if err := validateConfig(options.context); err != nil {
return err return err
} }

View File

@ -47,7 +47,7 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
fmt.Fprintf(w, "\n") fmt.Fprintf(w, "\n")
for _, p := range plugins { 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) desc = strings.Replace(desc, "\r", " ", -1)
if !opts.noTrunc { if !opts.noTrunc {
desc = stringutils.Ellipsis(desc, 45) desc = stringutils.Ellipsis(desc, 45)