fix(region): disk througput sync (#25017)

This commit is contained in:
屈轩
2026-06-13 11:54:43 +08:00
committed by GitHub
parent 6126af72d4
commit bf919b8f7a
8 changed files with 21 additions and 4 deletions
+4
View File
@@ -1966,6 +1966,9 @@ func (self *SDisk) syncWithCloudDisk(ctx context.Context, userCred mcclient.Toke
if iops := extDisk.GetIops(); iops > 0 {
self.Iops = iops
}
if tp := extDisk.GetThroughput(); tp > 0 {
self.Throughput = tp
}
if extDisk.GetIsAutoDelete() {
self.AutoDelete = true
}
@@ -2047,6 +2050,7 @@ func (manager *SDiskManager) newFromCloudDisk(ctx context.Context, userCred mccl
disk.StorageId = storage.Id
disk.Iops = extDisk.GetIops()
disk.Throughput = extDisk.GetThroughput()
disk.DiskFormat = extDisk.GetDiskFormat()
disk.DiskSize = extDisk.GetDiskSizeMB()
disk.AutoDelete = extDisk.GetIsAutoDelete()