mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
增加keystone project add tag接口支持
This commit is contained in:
@@ -2,6 +2,7 @@ package shell
|
||||
|
||||
import (
|
||||
"yunion.io/x/jsonutils"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/mcclient"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/modules"
|
||||
)
|
||||
@@ -350,4 +351,16 @@ func init() {
|
||||
printList(imgs, modules.Images.GetColumns(s))
|
||||
return nil
|
||||
})
|
||||
|
||||
type ProjectAddTagsOptions struct {
|
||||
ID string `help:"ID or name of project"`
|
||||
Tags []string `help:"tags added to project"`
|
||||
}
|
||||
R(&ProjectAddTagsOptions{}, "project-add-tags", "Add project with tags", func(s *mcclient.ClientSession, args *ProjectAddTagsOptions) error {
|
||||
err := modules.Projects.AddTags(s, args.ID, args.Tags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user