Image添加description字段

This commit is contained in:
屈轩
2018-11-07 17:56:28 +08:00
parent b2320988c3
commit 3716e88878
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -205,8 +205,9 @@ func init() {
})
type ImageUpdateOptions struct {
ID string `help:"ID or Name of Image"`
Name string `help:"New name of the image"`
ID string `help:"ID or Name of Image"`
Name string `help:"New name of the image"`
Description string `help:"Description of image"`
ImageOptionalOptions
}
@@ -227,6 +228,9 @@ func init() {
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.Description) > 0 {
params.Add(jsonutils.NewString(args.Description), "description")
}
err := addImageOptionalOptions(s, params, args.ImageOptionalOptions)
if err != nil {
return err
+1 -1
View File
@@ -560,7 +560,7 @@ func init() {
"OS_Distribution", "OS_version",
"Min_disk", "Min_ram", "Status",
"Notes", "OS_arch", "Preference",
"OS_Codename", "Parent_id"},
"OS_Codename", "Parent_id", "Description"},
[]string{"Owner", "Owner_name"})}
register(&Images)
}