Skip to content

Commit

Permalink
fix update input
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Apr 30, 2020
1 parent 8c49248 commit 7353622
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions pkg/apis/compute/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,19 @@ type HostAccessAttributes struct {

type HostSizeAttributes struct {
// CPU核数
CpuCount int `json:"cpu_count"`
CpuCount *int `json:"cpu_count"`
// 物理CPU颗数
NodeCount int8 `json:"node_count"`
NodeCount *int8 `json:"node_count"`
// CPU描述信息
CpuDesc string `json:"cpu_desc"`
// CPU频率
CpuMhz int `json:"cpu_mhz"`
CpuMhz *int `json:"cpu_mhz"`
// CPU缓存大小,单位KB
CpuCache string `json:"cpu_cache"`
// 预留CPU大小
CpuReserved int `json:"cpu_reserved"`
CpuReserved *int `json:"cpu_reserved"`
// CPU超分比
CpuCmtbound float32 `json:"cpu_cmtbound"`
CpuCmtbound *float32 `json:"cpu_cmtbound"`
// CPUMicrocode
CpuMicrocode string `json:"cpu_microcode"`
// CPU架构
Expand All @@ -272,10 +272,10 @@ type HostSizeAttributes struct {
// 预留内存大小(单位MB)
MemReserved string `json:"mem_reserved"`
// 内存超分比
MemCmtbound float32 `json:"mem_cmtbound"`
MemCmtbound *float32 `json:"mem_cmtbound"`

// 存储大小,单位Mb
StorageSize int `json:"storage_size"`
StorageSize *int `json:"storage_size"`
// 存储类型
StorageType string `json:"storage_type"`
// 存储驱动类型
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/compute/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ type WireUpdateInput struct {
apis.InfrasResourceBaseUpdateInput

// bandwidth in MB
Bandwidth int `json:"bandwidth"`
Bandwidth *int `json:"bandwidth"`

// MTU
// example: 1500
Mtu int `json:"mtu"`
Mtu *int `json:"mtu"`
}

type WireListInput struct {
Expand Down

0 comments on commit 7353622

Please sign in to comment.