diff --git a/v2/vmsize.go b/v2/vmsize.go index 49c40ee..0de0ff0 100644 --- a/v2/vmsize.go +++ b/v2/vmsize.go @@ -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. diff --git a/v2/vmsize_test.go b/v2/vmsize_test.go index 9b60f52..57e45b0 100644 --- a/v2/vmsize_test.go +++ b/v2/vmsize_test.go @@ -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. diff --git a/vmsize.go b/vmsize.go index 129c0f7..4eb9a78 100644 --- a/vmsize.go +++ b/vmsize.go @@ -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. diff --git a/vmsize_test.go b/vmsize_test.go index fcd3241..a89ee1a 100644 --- a/vmsize_test.go +++ b/vmsize_test.go @@ -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.