Skip to content

Commit e1fc5e4

Browse files
authored
Merge pull request #7210 from hytao/AddStandardMicrosoftSku
Adding Standard_Microsoft in Cdn Pricing sku
2 parents 0f781b0 + a2c1faa commit e1fc5e4

File tree

7 files changed

+2971
-2
lines changed

7 files changed

+2971
-2
lines changed

src/ResourceManager/Cdn/Commands.Cdn.Test/Commands.Cdn.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\TestProfileGetResourceUsage.json">
126126
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
127127
</None>
128+
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\TestSkuCreate.json">
129+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
130+
</None>
128131
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests\TestEndpointResourceUsage.json">
129132
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
130133
</None>

src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/ProfileTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ public void TestProfileCrud()
3535
TestController.NewInstance.RunPowerShellTest(_logger, "Test-ProfileCrud");
3636
}
3737

38+
[Fact]
39+
[Trait(Category.AcceptanceType, Category.CheckIn)]
40+
public void TestSkuCreate()
41+
{
42+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-SkuCreate");
43+
}
44+
3845
[Fact]
3946
[Trait(Category.AcceptanceType, Category.CheckIn)]
4047
public void TestProfileCrudWithPiping()

src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/ProfileTests.ps1

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,49 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15+
<#
16+
.SYNOPSIS
17+
Create Profile with different Sku
18+
#>
19+
function Test-SkuCreate
20+
{
21+
$profileName = getAssetName
22+
$resourceGroup = TestSetup-CreateResourceGroup
23+
$profileLocation = "EastUS"
24+
$profileSku = "Standard_Microsoft"
25+
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
26+
27+
Assert-NotNull $createdProfile
28+
Assert-AreEqual $profileName $createdProfile.Name
29+
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
30+
Assert-AreEqual $profileSku $createdProfile.Sku.Name
31+
32+
$profileSku = "Standard_Verizon"
33+
$profileName = getAssetName
34+
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
35+
Assert-NotNull $createdProfile
36+
Assert-AreEqual $profileName $createdProfile.Name
37+
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
38+
Assert-AreEqual $profileSku $createdProfile.Sku.Name
39+
40+
$profileSku = "Premium_Verizon"
41+
$profileName = getAssetName
42+
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
43+
Assert-NotNull $createdProfile
44+
Assert-AreEqual $profileName $createdProfile.Name
45+
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
46+
Assert-AreEqual $profileSku $createdProfile.Sku.Name
47+
48+
$profileSku = "Standard_Akamai"
49+
$profileName = getAssetName
50+
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
51+
Assert-NotNull $createdProfile
52+
Assert-AreEqual $profileName $createdProfile.Name
53+
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
54+
Assert-AreEqual $profileSku $createdProfile.Sku.Name
55+
56+
Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force
57+
}
1558
<#
1659
.SYNOPSIS
1760
Full Profile CRUD cycle

src/ResourceManager/Cdn/Commands.Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestSkuCreate.json

Lines changed: 2914 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Cdn/Commands.Cdn/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Added Standard_Microsoft in Cdn pricing sku.
2122

2223
## Version 5.0.5
2324
* Fixed issue with default resource groups not being set.

src/ResourceManager/Cdn/Commands.Cdn/Models/Profile/PSSkuName.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public enum PSSkuName
2020
Premium_Verizon,
2121
Custom_Verizon,
2222
Standard_Akamai,
23-
Standard_ChinaCdn
23+
Standard_ChinaCdn,
24+
Standard_Microsoft
2425
}
2526
}

src/ResourceManager/Cdn/Commands.Cdn/Profile/NewAzureRmCdnProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class NewAzureRmCdnProfile : AzureCdnCmdletBase
5252
/// <summary>
5353
/// The pricing sku name of the profile.
5454
/// </summary>
55-
[Parameter(Mandatory = true, HelpMessage = "The pricing sku name of the Azure CDN profile. Valid values are StandardVerizon, StandardAkamai, and PremiumVerizon.")]
55+
[Parameter(Mandatory = true, HelpMessage = "The pricing sku name of the Azure CDN profile. Valid values are StandardVerizon, StandardAkamai, Standard_Microsoft and PremiumVerizon.")]
5656
public PSSkuName Sku { get; set; }
5757

5858
/// <summary>

0 commit comments

Comments
 (0)