fix: class action 统一使用keywords包裹

This commit is contained in:
Qu Xuan
2020-03-17 18:44:10 +08:00
parent 12040bd5aa
commit 5dac5a465b
4 changed files with 26 additions and 17 deletions
+13
View File
@@ -179,6 +179,19 @@ func init() {
},
)
R(&options.ServerCreateOptions{}, "server-check-create-data", "Check create server data", func(s *mcclient.ClientSession, opts *options.ServerCreateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
server, err := modules.Servers.PerformClassAction(s, "check-create-data", params.JSON(params))
if err != nil {
return err
}
printObject(server)
return nil
})
R(&options.ServerCreateOptions{}, "server-create", "Create a server", func(s *mcclient.ClientSession, opts *options.ServerCreateOptions) error {
params, err := opts.Params()
if err != nil {