Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions v1/providers/launchpad/instancetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"strconv"
"strings"
"time"

"github.com/alecthomas/units"
"github.com/bojanz/currency"
Expand All @@ -16,6 +17,10 @@ import (

const (
brevDGXCWorkshopID = "brev-dgxc"
dmzCloud = "dmz"

defaultEstimatedDeployTime = 15 * time.Minute
dmzEstimatedDeployTime = 1 * time.Minute
)

func (c *LaunchpadClient) GetInstanceTypes(ctx context.Context, args v1.GetInstanceTypeArgs) ([]v1.InstanceType, error) {
Expand Down Expand Up @@ -200,6 +205,13 @@ func launchpadInstanceTypeToInstanceType(launchpadInstanceType openapi.InstanceT
}
typeName := makeInstanceTypeName(info)

var estimatedDeployTime time.Duration
if launchpadInstanceType.Cloud == dmzCloud {
estimatedDeployTime = dmzEstimatedDeployTime
} else {
estimatedDeployTime = defaultEstimatedDeployTime
}

it := &v1.InstanceType{
Type: typeName,
VCPU: launchpadInstanceType.Cpu,
Expand All @@ -214,6 +226,7 @@ func launchpadInstanceTypeToInstanceType(launchpadInstanceType openapi.InstanceT
Provider: CloudProviderID,
Cloud: launchpadInstanceType.Cloud,
ReservedInstancePoolID: launchpadWorkshopIDToReservedInstancePoolID(info.workshopID),
EstimatedDeployTime: &estimatedDeployTime,
}

// Make the instance type ID
Expand Down
Loading