Skip to content

Commit e16029d

Browse files
authored
feat(BREV-1656): Add cloud to instance type (#38)
1 parent 9cb909a commit e16029d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

v1/instancetype.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type InstanceType struct {
4545
NotPrivileged bool
4646
EstimatedDeployTime *time.Duration
4747
Provider string
48-
CloudBroker string
48+
Cloud string
4949
CanModifyFirewallRules bool
5050
}
5151

@@ -74,8 +74,8 @@ func MakeGenericInstanceTypeIDFromInstance(instance Instance) InstanceTypeID {
7474
type GPU struct {
7575
Count int32
7676
Memory units.Base2Bytes
77-
MemoryDetails string
78-
NetworkDetails string
77+
MemoryDetails string // "", "HBM", "GDDR", "DDR", etc.
78+
NetworkDetails string // "PCIe", "SXM4", "SXM5", etc.
7979
Manufacturer string
8080
Name string
8181
Type string

v1/providers/fluidstack/instancetype.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,6 @@ func convertFluidStackInstanceTypeToV1InstanceType(location string, fsInstanceTy
107107
IsAvailable: isAvailable,
108108
Location: location,
109109
Provider: CloudProviderID,
110+
Cloud: CloudProviderID,
110111
}
111112
}

v1/providers/lambdalabs/instancetype.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ func convertLambdaLabsInstanceTypeToV1InstanceType(location string, instType ope
196196
Rebootable: true,
197197
IsAvailable: isAvailable,
198198
BasePrice: &amount,
199-
Provider: string(CloudProviderID),
199+
Provider: CloudProviderID,
200+
Cloud: CloudProviderID,
200201
}
201202
it.ID = v1.MakeGenericInstanceTypeID(it)
202203
return it, nil

v1/providers/shadeform/instancetype.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ func (c *ShadeformClient) convertShadeformInstanceTypeToV1InstanceType(shadeform
181181
BasePrice: basePrice,
182182
IsAvailable: region.Available,
183183
Location: region.Region,
184-
Provider: string(shadeformInstanceType.Cloud),
185-
CloudBroker: CloudProviderID,
184+
Provider: CloudProviderID,
185+
Cloud: string(shadeformInstanceType.Cloud),
186186
})
187187
}
188188

0 commit comments

Comments
 (0)