Skip to content

Commit

Permalink
Add shared_cpu in API
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 12, 2024
1 parent 604b49c commit 45b5bdc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions console/service/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,9 @@ definitions:
cpu:
type: integer
example: 8
shared_cpu:
type: boolean
example: false
ram:
type: integer
example: 256
Expand Down
3 changes: 3 additions & 0 deletions console/service/internal/convert/external_deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func ProviderInfoToSwagger(providerInfo *storage.CloudProviderInfo, description,
resp.InstanceTypes.Small = append(resp.InstanceTypes.Small, &models.DeploymentInstanceType{
Code: instance.InstanceName,
CPU: instance.Cpu,
SharedCPU: instance.SharedCpu,
PriceHourly: instance.PriceHourly,
PriceMonthly: instance.PriceMonthly,
Currency: instance.Currency,
Expand All @@ -70,6 +71,7 @@ func ProviderInfoToSwagger(providerInfo *storage.CloudProviderInfo, description,
resp.InstanceTypes.Medium = append(resp.InstanceTypes.Medium, &models.DeploymentInstanceType{
Code: instance.InstanceName,
CPU: instance.Cpu,
SharedCPU: instance.SharedCpu,
PriceHourly: instance.PriceHourly,
PriceMonthly: instance.PriceMonthly,
Currency: instance.Currency,
Expand All @@ -79,6 +81,7 @@ func ProviderInfoToSwagger(providerInfo *storage.CloudProviderInfo, description,
resp.InstanceTypes.Large = append(resp.InstanceTypes.Large, &models.DeploymentInstanceType{
Code: instance.InstanceName,
CPU: instance.Cpu,
SharedCPU: instance.SharedCpu,
PriceHourly: instance.PriceHourly,
PriceMonthly: instance.PriceMonthly,
Currency: instance.Currency,
Expand Down
1 change: 1 addition & 0 deletions console/service/internal/storage/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type CloudInstance struct {
PriceMonthly float64
Currency string
UpdatedAt time.Time
SharedCpu bool
}

type CloudImage struct {
Expand Down

0 comments on commit 45b5bdc

Please sign in to comment.