Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion v2/vmsize.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// fetched using the ResourceSKU API, are not included here. They can be found in sku.go.

var skuSizeScheme = regexp.MustCompile(
`^([A-Z])([A-Z]?)([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdeiflmnotspPr]+|C+|NP)?)_?(?:((?:xl_)?[A-Z]+[0-9]+[A-Z]*)_?)?(_cc_)?(_[0-9]+_)?(_MI300X_)?(_H100_)?((?:[vV][1-9])?)?(_Promo)?$`,
`^([A-Z])([A-Z]?)([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdeiflmnotspPr]+|C+|NP)?)_?(?:NDR_)?(?:((?:xl_)?[A-Z]+[0-9]+[A-Z]*)_?)?(_cc_)?(_[0-9]+_)?(_MI300X_)?(_H100_)?((?:[vV][1-9])?)?(_Promo)?$`,
)

// unParsableVMSizes map holds vmSize strings that cannot be easily parsed with skuSizeScheme.
Expand Down
17 changes: 17 additions & 0 deletions v2/vmsize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,23 @@ var testCases = []struct {
expectedVM: nil,
err: fmt.Errorf("could not parse VM size inValid"),
},
{
name: "Standard_ND128isr_NDR_GB200_v6",
size: "ND128isr_NDR_GB200_v6",
expectedVM: &VMSizeType{
Family: "N",
Subfamily: to.Ptr("D"),
Cpus: "128",
CpusConstrained: nil,
AdditiveFeatures: []rune{'i', 's', 'r'},
AcceleratorType: to.Ptr("GB200"),
ConfidentialChildCapability: false,
Version: "v6",
PromoVersion: false,
Series: "NDisr_v6",
},
err: nil,
},
}

// Test_GetVMSize tests the GetVMSize() function.
Expand Down
2 changes: 1 addition & 1 deletion vmsize.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// fetched using the ResourceSKU API, are not included here. They can be found in sku.go.

var skuSizeScheme = regexp.MustCompile(
`^([A-Z])([A-Z]?)([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdeiflmnotspPr]+|C+|NP)?)_?(?:((?:xl_)?[A-Z]+[0-9]+[A-Z]*)_?)?(_cc_)?(_[0-9]+_)?(_MI300X_)?(_H100_)?((?:[vV][1-9])?)?(_Promo)?$`,
`^([A-Z])([A-Z]?)([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdeiflmnotspPr]+|C+|NP)?)_?(?:NDR_)?(?:((?:xl_)?[A-Z]+[0-9]+[A-Z]*)_?)?(_cc_)?(_[0-9]+_)?(_MI300X_)?(_H100_)?((?:[vV][1-9])?)?(_Promo)?$`,
)

// unParsableVMSizes map holds vmSize strings that cannot be easily parsed with skuSizeScheme.
Expand Down
17 changes: 17 additions & 0 deletions vmsize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,23 @@ var testCases = []struct {
expectedVM: nil,
err: fmt.Errorf("could not parse VM size inValid"),
},
{
name: "Standard_ND128isr_NDR_GB200_v6",
size: "ND128isr_NDR_GB200_v6",
expectedVM: &VMSizeType{
Family: "N",
Subfamily: to.Ptr("D"),
Cpus: "128",
CpusConstrained: nil,
AdditiveFeatures: []rune{'i', 's', 'r'},
AcceleratorType: to.Ptr("GB200"),
ConfidentialChildCapability: false,
Version: "v6",
PromoVersion: false,
Series: "NDisr_v6",
},
err: nil,
},
}

// Test_GetVMSize tests the GetVMSize() function.
Expand Down
Loading