Skip to content

Commit

Permalink
fix(region): change storage_size from int to int64 (#19085)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioito authored Dec 22, 2023
1 parent d9190bc commit 5ed79e2
Show file tree
Hide file tree
Showing 29 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ require (
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
moul.io/http2curl/v2 v2.3.0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222082642-2717001c0240
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222093526-d35740f80896
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
yunion.io/x/jsonutils v1.0.1-0.20230613121553-0f3b41e2ef19
yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1201,8 +1201,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222082642-2717001c0240 h1:gxeXGwyuXRWOETJ3KChKXb5BD0I+OTvgUenJNoJowFI=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222082642-2717001c0240/go.mod h1:aj1gR9PPb6eqqKOwvANe26CoZFY8ydmXy0fuvgKYXH0=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222093526-d35740f80896 h1:+mqvBWP2GaX13HhZlfbqZ1xX2T9Fl1OWm4Qx7TYmqgU=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222093526-d35740f80896/go.mod h1:aj1gR9PPb6eqqKOwvANe26CoZFY8ydmXy0fuvgKYXH0=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/compute/zz_generated.model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/compute/models/host_recycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ func (self *SGuest) doPrepaidRecycleNoLock(ctx context.Context, userCred mcclien
guestdisks, _ := self.GetGuestDisks()

storageInfo := make([]baremetal.BaremetalStorage, 0)
totalSize := 0
totalSize := int64(0)
for i := 0; i < len(guestdisks); i += 1 {
disk := guestdisks[i].GetDisk()
storage, _ := disk.GetStorage()

totalSize += disk.DiskSize
totalSize += int64(disk.DiskSize)

if len(fakeHost.StorageType) == 0 {
fakeHost.StorageType = storage.StorageType
Expand Down
2 changes: 1 addition & 1 deletion pkg/compute/models/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ type SHost struct {
PageSizeKB int `nullable:"false" default:"4" list:"domain" update:"domain" create:"domain_optional"`

// 存储大小,单位Mb
StorageSize int `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
StorageSize int64 `nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
// 存储类型
StorageType string `width:"20" charset:"ascii" nullable:"true" list:"domain" update:"domain" create:"domain_optional"`
// 存储驱动类型
Expand Down
2 changes: 1 addition & 1 deletion pkg/mcclient/cloudpods/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (host *SHost) GetReservedMemoryMb() int {
return host.MemReserved
}

func (host *SHost) GetStorageSizeMB() int {
func (host *SHost) GetStorageSizeMB() int64 {
return host.StorageSize
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.2.0
## explicit; go 1.12
sigs.k8s.io/yaml
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222082642-2717001c0240
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231222093526-d35740f80896
## explicit; go 1.18
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
Expand Down
2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/cloudprovider/resources.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/aliyun/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/apsara/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/aws/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/azure/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/bingocloud/node.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/ctyun/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/ecloud/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/google/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/hcso/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/huawei/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/jdcloud/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/nutanix/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/oracle/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/proxmox/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/qcloud/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/remotefile/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/yunion.io/x/cloudmux/pkg/multicloud/ucloud/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ed79e2

Please sign in to comment.