Skip to content

Commit c8d33f0

Browse files
authored
fix(instance): change server-types local volume size to max (#2932)
1 parent b2d45be commit c8d33f0

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

internal/namespaces/instance/v1/custom_server_type.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ func serverTypeListBuilder(c *core.Command) *core.Command {
6060

6161
c.Run = func(ctx context.Context, argsI interface{}) (interface{}, error) {
6262
type customServerType struct {
63-
Name string `json:"name"`
64-
HourlyPrice *scw.Money `json:"hourly_price"`
65-
LocalVolumeSize scw.Size `json:"local_volume_size"`
66-
CPU uint32 `json:"cpu"`
67-
GPU *uint64 `json:"gpu"`
68-
RAM scw.Size `json:"ram"`
69-
Arch instance.Arch `json:"arch"`
70-
Availability instance.ServerTypesAvailability `json:"availability"`
63+
Name string `json:"name"`
64+
HourlyPrice *scw.Money `json:"hourly_price"`
65+
LocalVolumeMaxSize scw.Size `json:"local_volume_max_size"`
66+
CPU uint32 `json:"cpu"`
67+
GPU *uint64 `json:"gpu"`
68+
RAM scw.Size `json:"ram"`
69+
Arch instance.Arch `json:"arch"`
70+
Availability instance.ServerTypesAvailability `json:"availability"`
7171
}
7272

7373
api := instance.NewAPI(core.ExtractClient(ctx))
@@ -95,14 +95,14 @@ func serverTypeListBuilder(c *core.Command) *core.Command {
9595
}
9696

9797
serverTypes = append(serverTypes, &customServerType{
98-
Name: name,
99-
HourlyPrice: scw.NewMoneyFromFloat(float64(serverType.HourlyPrice), "EUR", 3),
100-
LocalVolumeSize: serverType.VolumesConstraint.MinSize,
101-
CPU: serverType.Ncpus,
102-
GPU: serverType.Gpu,
103-
RAM: scw.Size(serverType.RAM),
104-
Arch: serverType.Arch,
105-
Availability: availabilitiesResponse.Servers[name].Availability,
98+
Name: name,
99+
HourlyPrice: scw.NewMoneyFromFloat(float64(serverType.HourlyPrice), "EUR", 3),
100+
LocalVolumeMaxSize: serverType.VolumesConstraint.MaxSize,
101+
CPU: serverType.Ncpus,
102+
GPU: serverType.Gpu,
103+
RAM: scw.Size(serverType.RAM),
104+
Arch: serverType.Arch,
105+
Availability: availabilitiesResponse.Servers[name].Availability,
106106
})
107107
}
108108

0 commit comments

Comments
 (0)