Skip to content

Commit c6de52c

Browse files
feat(instance): add GPU information in ServerType (scaleway#2463)
Co-authored-by: Laure-di <[email protected]>
1 parent 19e167c commit c6de52c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

api/instance/v1/instance_sdk.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,18 @@ type ServerTypeCapabilities struct {
15211521
BootTypes []BootType `json:"boot_types"`
15221522
}
15231523

1524+
// ServerTypeGPUInfo: server type gpu info.
1525+
type ServerTypeGPUInfo struct {
1526+
// GpuManufacturer: gPU manufacturer.
1527+
GpuManufacturer string `json:"gpu_manufacturer"`
1528+
1529+
// GpuName: gPU model name.
1530+
GpuName string `json:"gpu_name"`
1531+
1532+
// GpuMemory: RAM of a single GPU, in bytes.
1533+
GpuMemory scw.Size `json:"gpu_memory"`
1534+
}
1535+
15241536
// ServerTypeNetwork: server type network.
15251537
type ServerTypeNetwork struct {
15261538
// Interfaces: list of available network interfaces.
@@ -1977,6 +1989,9 @@ type ServerType struct {
19771989
// RAM: available RAM in bytes.
19781990
RAM uint64 `json:"ram"`
19791991

1992+
// GpuInfo: gPU information.
1993+
GpuInfo *ServerTypeGPUInfo `json:"gpu_info"`
1994+
19801995
// Arch: CPU architecture.
19811996
// Default value: unknown_arch
19821997
Arch Arch `json:"arch"`

0 commit comments

Comments
 (0)