mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
feat: Support suggest network config before create vmware cloud account
This commit is contained in:
@@ -125,6 +125,22 @@ func init() {
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
type SVMwareCloudAccountPrepareNetsOptions struct {
|
||||
Project string `help:"project for this account"`
|
||||
ProjectDomain string `help:"domain for this account"`
|
||||
NAME string `help:"name for this account"`
|
||||
options.SVMwareCredentialWithEnvironment
|
||||
}
|
||||
R(&SVMwareCloudAccountPrepareNetsOptions{}, "cloud-account-preparenets-vmware", "Prepare networks for a VMware cloud account before create this accout", func(s *mcclient.ClientSession, args *SVMwareCloudAccountPrepareNetsOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("VMware"), "provider")
|
||||
result, err := modules.Cloudaccounts.PerformClassAction(s, "prepare-nets", params)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(result)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&options.SAliyunCloudAccountCreateOptions{}, "cloud-account-create-aliyun", "Create an Aliyun cloud account", func(s *mcclient.ClientSession, args *options.SAliyunCloudAccountCreateOptions) error {
|
||||
params := jsonutils.Marshal(args)
|
||||
|
||||
Reference in New Issue
Block a user