Skip to content

Commit 46b776e

Browse files
authored
fix #4: only work on 4.15 (#5)
1 parent 8af9694 commit 46b776e

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

cloudstack/HostService.go

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ type AddBaremetalHostResponse struct {
189189
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
190190
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
191191
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
192-
Cpuloadaverage string `json:"cpuloadaverage"`
192+
Cpuloadaverage float64 `json:"cpuloadaverage"`
193193
Cpunumber int `json:"cpunumber"`
194194
Cpusockets int `json:"cpusockets"`
195195
Cpuspeed int64 `json:"cpuspeed"`
@@ -204,7 +204,7 @@ type AddBaremetalHostResponse struct {
204204
Gpugroup []AddBaremetalHostResponseGpugroup `json:"gpugroup"`
205205
Hahost bool `json:"hahost"`
206206
Hasenoughcapacity bool `json:"hasenoughcapacity"`
207-
Hostha string `json:"hostha"`
207+
Hostha HostHostha `json:"hostha"`
208208
Hosttags string `json:"hosttags"`
209209
Hypervisor string `json:"hypervisor"`
210210
Hypervisorversion string `json:"hypervisorversion"`
@@ -511,7 +511,7 @@ type AddHostResponse struct {
511511
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
512512
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
513513
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
514-
Cpuloadaverage string `json:"cpuloadaverage"`
514+
Cpuloadaverage float64 `json:"cpuloadaverage"`
515515
Cpunumber int `json:"cpunumber"`
516516
Cpusockets int `json:"cpusockets"`
517517
Cpuspeed int64 `json:"cpuspeed"`
@@ -526,7 +526,7 @@ type AddHostResponse struct {
526526
Gpugroup []AddHostResponseGpugroup `json:"gpugroup"`
527527
Hahost bool `json:"hahost"`
528528
Hasenoughcapacity bool `json:"hasenoughcapacity"`
529-
Hostha string `json:"hostha"`
529+
Hostha HostHostha `json:"hostha"`
530530
Hosttags string `json:"hosttags"`
531531
Hypervisor string `json:"hypervisor"`
532532
Hypervisorversion string `json:"hypervisorversion"`
@@ -728,7 +728,7 @@ type CancelHostMaintenanceResponse struct {
728728
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
729729
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
730730
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
731-
Cpuloadaverage string `json:"cpuloadaverage"`
731+
Cpuloadaverage float64 `json:"cpuloadaverage"`
732732
Cpunumber int `json:"cpunumber"`
733733
Cpusockets int `json:"cpusockets"`
734734
Cpuspeed int64 `json:"cpuspeed"`
@@ -743,7 +743,7 @@ type CancelHostMaintenanceResponse struct {
743743
Gpugroup []CancelHostMaintenanceResponseGpugroup `json:"gpugroup"`
744744
Hahost bool `json:"hahost"`
745745
Hasenoughcapacity bool `json:"hasenoughcapacity"`
746-
Hostha string `json:"hostha"`
746+
Hostha HostHostha `json:"hostha"`
747747
Hosttags string `json:"hosttags"`
748748
Hypervisor string `json:"hypervisor"`
749749
Hypervisorversion string `json:"hypervisorversion"`
@@ -1269,7 +1269,7 @@ type FindHostsForMigrationResponse struct {
12691269
JobID string `json:"jobid"`
12701270
Jobstatus int `json:"jobstatus"`
12711271
Lastpinged string `json:"lastpinged"`
1272-
Managementserverid int64 `json:"managementserverid"`
1272+
Managementserverid string `json:"managementserverid"`
12731273
Memoryallocated string `json:"memoryallocated"`
12741274
Memoryallocatedbytes int64 `json:"memoryallocatedbytes"`
12751275
Memoryallocatedpercentage string `json:"memoryallocatedpercentage"`
@@ -1841,7 +1841,7 @@ type Host struct {
18411841
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
18421842
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
18431843
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
1844-
Cpuloadaverage string `json:"cpuloadaverage"`
1844+
Cpuloadaverage float64 `json:"cpuloadaverage"`
18451845
Cpunumber int `json:"cpunumber"`
18461846
Cpusockets int `json:"cpusockets"`
18471847
Cpuspeed int64 `json:"cpuspeed"`
@@ -1856,7 +1856,7 @@ type Host struct {
18561856
Gpugroup []HostGpugroup `json:"gpugroup"`
18571857
Hahost bool `json:"hahost"`
18581858
Hasenoughcapacity bool `json:"hasenoughcapacity"`
1859-
Hostha string `json:"hostha"`
1859+
Hostha HostHostha `json:"hostha"`
18601860
Hosttags string `json:"hosttags"`
18611861
Hypervisor string `json:"hypervisor"`
18621862
Hypervisorversion string `json:"hypervisorversion"`
@@ -1910,6 +1910,11 @@ type HostGpugroupVgpu struct {
19101910
Videoram int64 `json:"videoram"`
19111911
}
19121912

1913+
type HostHostha struct {
1914+
Haenable bool `json:"haenable"`
1915+
Hastate string `json:"hastate"`
1916+
}
1917+
19131918
type ListHostsMetricsParams struct {
19141919
p map[string]interface{}
19151920
}
@@ -2222,7 +2227,7 @@ type HostsMetric struct {
22222227
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
22232228
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
22242229
Cpudisablethreshold bool `json:"cpudisablethreshold"`
2225-
Cpuloadaverage string `json:"cpuloadaverage"`
2230+
Cpuloadaverage float64 `json:"cpuloadaverage"`
22262231
Cpunumber int `json:"cpunumber"`
22272232
Cpusockets int `json:"cpusockets"`
22282233
Cpuspeed int64 `json:"cpuspeed"`
@@ -2240,7 +2245,7 @@ type HostsMetric struct {
22402245
Gpugroup []HostsMetricGpugroup `json:"gpugroup"`
22412246
Hahost bool `json:"hahost"`
22422247
Hasenoughcapacity bool `json:"hasenoughcapacity"`
2243-
Hostha string `json:"hostha"`
2248+
Hostha HostHostha `json:"hostha"`
22442249
Hosttags string `json:"hosttags"`
22452250
Hypervisor string `json:"hypervisor"`
22462251
Hypervisorversion string `json:"hypervisorversion"`
@@ -2381,7 +2386,7 @@ type PrepareHostForMaintenanceResponse struct {
23812386
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
23822387
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
23832388
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
2384-
Cpuloadaverage string `json:"cpuloadaverage"`
2389+
Cpuloadaverage float64 `json:"cpuloadaverage"`
23852390
Cpunumber int `json:"cpunumber"`
23862391
Cpusockets int `json:"cpusockets"`
23872392
Cpuspeed int64 `json:"cpuspeed"`
@@ -2396,7 +2401,7 @@ type PrepareHostForMaintenanceResponse struct {
23962401
Gpugroup []PrepareHostForMaintenanceResponseGpugroup `json:"gpugroup"`
23972402
Hahost bool `json:"hahost"`
23982403
Hasenoughcapacity bool `json:"hasenoughcapacity"`
2399-
Hostha string `json:"hostha"`
2404+
Hostha HostHostha `json:"hostha"`
24002405
Hosttags string `json:"hosttags"`
24012406
Hypervisor string `json:"hypervisor"`
24022407
Hypervisorversion string `json:"hypervisorversion"`
@@ -2526,7 +2531,7 @@ type ReconnectHostResponse struct {
25262531
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
25272532
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
25282533
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
2529-
Cpuloadaverage string `json:"cpuloadaverage"`
2534+
Cpuloadaverage float64 `json:"cpuloadaverage"`
25302535
Cpunumber int `json:"cpunumber"`
25312536
Cpusockets int `json:"cpusockets"`
25322537
Cpuspeed int64 `json:"cpuspeed"`
@@ -2541,7 +2546,7 @@ type ReconnectHostResponse struct {
25412546
Gpugroup []ReconnectHostResponseGpugroup `json:"gpugroup"`
25422547
Hahost bool `json:"hahost"`
25432548
Hasenoughcapacity bool `json:"hasenoughcapacity"`
2544-
Hostha string `json:"hostha"`
2549+
Hostha HostHostha `json:"hostha"`
25452550
Hosttags string `json:"hosttags"`
25462551
Hypervisor string `json:"hypervisor"`
25472552
Hypervisorversion string `json:"hypervisorversion"`
@@ -2848,7 +2853,7 @@ type UpdateHostResponse struct {
28482853
Cpuallocatedpercentage string `json:"cpuallocatedpercentage"`
28492854
Cpuallocatedvalue int64 `json:"cpuallocatedvalue"`
28502855
Cpuallocatedwithoverprovisioning string `json:"cpuallocatedwithoverprovisioning"`
2851-
Cpuloadaverage string `json:"cpuloadaverage"`
2856+
Cpuloadaverage float64 `json:"cpuloadaverage"`
28522857
Cpunumber int `json:"cpunumber"`
28532858
Cpusockets int `json:"cpusockets"`
28542859
Cpuspeed int64 `json:"cpuspeed"`
@@ -2863,7 +2868,7 @@ type UpdateHostResponse struct {
28632868
Gpugroup []UpdateHostResponseGpugroup `json:"gpugroup"`
28642869
Hahost bool `json:"hahost"`
28652870
Hasenoughcapacity bool `json:"hasenoughcapacity"`
2866-
Hostha string `json:"hostha"`
2871+
Hostha HostHostha `json:"hostha"`
28672872
Hosttags string `json:"hosttags"`
28682873
Hypervisor string `json:"hypervisor"`
28692874
Hypervisorversion string `json:"hypervisorversion"`

0 commit comments

Comments
 (0)