Skip to content

Commit

Permalink
tencent createDisk set zone
Browse files Browse the repository at this point in the history
  • Loading branch information
dogfootman committed Apr 12, 2024
1 parent 9bba7a6 commit fbce7f2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ func (DiskHandler *TencentDiskHandler) CreateDisk(diskReqInfo irs.DiskInfo) (irs
return irs.DiskInfo{}, errors.New("A disk with the name " + diskReqInfo.IId.NameId + " already exists.")
}

// region base이므로 특정 zone을 지정시 해당 zone에 생성.
zone := DiskHandler.Region.Zone
if diskReqInfo.Zone != ""{
zone = diskReqInfo.Zone
}

request := cbs.NewCreateDisksRequest()
request.Placement = &cbs.Placement{Zone: common.StringPtr(DiskHandler.Region.Zone)}
request.Placement = &cbs.Placement{Zone: common.StringPtr(zone)}
request.DiskChargeType = common.StringPtr("POSTPAID_BY_HOUR")

diskErr := validateDisk(&diskReqInfo)
Expand Down

0 comments on commit fbce7f2

Please sign in to comment.