Merge pull request #142 in YUNIONIO/onecloud from ~TANGBIN/onecloud:bugfix/tb-notices-climc to release/2.2.0

* commit 'daa0f66f0eb55b081514e40cd4b768e930e10a90':
  notices climc fix
This commit is contained in:
张东亮
2018-08-30 12:16:02 +08:00
+6 -2
View File
@@ -4,15 +4,19 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type NoticesListOptions struct {
BaseListOptions
options.BaseListOptions
}
R(&NoticesListOptions{}, "notice-list", "list notices", func(s *mcclient.ClientSession, args *NoticesListOptions) error {
params := FetchPagingParams(args.BaseListOptions)
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.Notice.List(s, params)
if err != nil {