mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(region): keep cloudpods vm empty password (#21758)
This commit is contained in:
@@ -497,13 +497,17 @@ func (self *SRegion) CreateInstance(hostId, hypervisor string, opts *cloudprovid
|
||||
input := api.ServerCreateInput{
|
||||
ServerConfigs: &api.ServerConfigs{},
|
||||
}
|
||||
input.Name = opts.Name
|
||||
input.GenerateName = opts.Name
|
||||
input.Hostname = opts.Hostname
|
||||
input.Description = opts.Description
|
||||
input.InstanceType = opts.InstanceType
|
||||
input.VcpuCount = opts.Cpu
|
||||
input.VmemSize = opts.MemoryMB
|
||||
input.Password = opts.Password
|
||||
if len(input.Password) == 0 {
|
||||
resetPasswd := false
|
||||
input.ResetPassword = &resetPasswd
|
||||
}
|
||||
input.PublicIpBw = opts.PublicIpBw
|
||||
input.PublicIpChargeType = string(opts.PublicIpChargeType)
|
||||
input.ProjectId = opts.ProjectId
|
||||
|
||||
Reference in New Issue
Block a user