Skip to content

Commit 0046815

Browse files
committed
add missing fields&models
1 parent 5c45912 commit 0046815

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

pkg/types.go

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ const (
1111

1212
// Location represents location
1313
type Location struct {
14-
ID int64 `json:"id"`
15-
Name string `json:"name"`
16-
Code string `json:"code"`
14+
ID int64 `json:"id"`
15+
Name string `json:"name"`
16+
Status string `json:"status"`
17+
Code string `json:"code"`
18+
SupportedFeatures []string `json:"supported_features"`
19+
L2SegmentsEnabled bool `json:"l2_segments_enabled"`
20+
PrivateRacksEnabled bool `json:"private_racks_enabled"`
21+
LoadBalancersEnabled bool `json:"load_balancers_enabled"`
1722
}
1823

1924
// SSLCertificate represents ssl certificate
@@ -322,9 +327,43 @@ type SBMServerCreateInput struct {
322327

323328
// ServerModelOption represents server model option
324329
type ServerModelOption struct {
325-
ID int64 `json:"id"`
326-
Name string `json:"name"`
327-
RAM int `json:"ram"`
330+
ID int64 `json:"id"`
331+
Name string `json:"name"`
332+
CPUName string `json:"cpu_name"`
333+
CPUCount int `json:"cpu_count"`
334+
CPUCoresCount int `json:"cpu_cores_count"`
335+
CPUFrequency int `json:"cpu_frequency"`
336+
RAM int `json:"ram"`
337+
RAMType string `json:"ram_type"`
338+
MaxRAM int `json:"max_ram"`
339+
HasRAIDController bool `json:"has_raid_controller"`
340+
RAIDControllerName string `json:"raid_controller_name"`
341+
DriveSlotsCount int `json:"drive_slots_count"`
342+
}
343+
344+
// ServerModelOptionDetail represents full server model option
345+
type ServerModelOptionDetail struct {
346+
ID int64 `json:"id"`
347+
Name string `json:"name"`
348+
CPUName string `json:"cpu_name"`
349+
CPUCount int `json:"cpu_count"`
350+
CPUCoresCount int `json:"cpu_cores_count"`
351+
CPUFrequency int `json:"cpu_frequency"`
352+
RAM int `json:"ram"`
353+
RAMType string `json:"ram_type"`
354+
MaxRAM int `json:"max_ram"`
355+
HasRAIDController bool `json:"has_raid_controller"`
356+
RAIDControllerName string `json:"raid_controller_name"`
357+
DriveSlotsCount int `json:"drive_slots_count"`
358+
DriveSlots []ServerModelDriveSlot `json:"drive_slots"`
359+
}
360+
361+
type ServerModelDriveSlot struct {
362+
Position int `json:"position"`
363+
Interface string `json:"interface"`
364+
FormFactor string `json:"form_factor"`
365+
DriveModelID int64 `json:"drive_model_id"`
366+
HotSwappable bool `json:"hot_swappable"`
328367
}
329368

330369
// RAMOption represents ram option

0 commit comments

Comments
 (0)