climc: add cloud-account-update-google

This commit is contained in:
Yousong Zhou
2020-03-25 17:34:16 +08:00
parent 0fb6de4d80
commit 45a4848808
2 changed files with 17 additions and 0 deletions
+13
View File
@@ -381,6 +381,19 @@ func init() {
return nil
})
R(&options.SGoogleCloudAccountUpdateOptions{}, "cloud-account-update-google", "update a google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountUpdateOptions) error {
params := jsonutils.Marshal(args).(*jsonutils.JSONDict)
if params.Size() == 0 {
return InvalidUpdateError()
}
result, err := modules.Cloudaccounts.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.SAWSCloudAccountUpdateOptions{}, "cloud-account-update-aws", "update an AWS cloud account", func(s *mcclient.ClientSession, args *options.SAWSCloudAccountUpdateOptions) error {
params := jsonutils.Marshal(args).(*jsonutils.JSONDict)
+4
View File
@@ -260,6 +260,10 @@ type SQcloudCloudAccountUpdateOptions struct {
SCloudAccountUpdateBaseOptions
}
type SGoogleCloudAccountUpdateOptions struct {
SCloudAccountUpdateBaseOptions
}
type SAWSCloudAccountUpdateOptions struct {
SCloudAccountUpdateBaseOptions