Skip to content

Commit

Permalink
Merge pull request #7210 from hytao/AddStandardMicrosoftSku
Browse files Browse the repository at this point in the history
Adding Standard_Microsoft in Cdn Pricing sku
  • Loading branch information
cormacpayne authored Sep 12, 2018
2 parents 0f781b0 + a2c1faa commit e1fc5e4
Show file tree
Hide file tree
Showing 7 changed files with 2,971 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\TestProfileGetResourceUsage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\TestSkuCreate.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests\TestEndpointResourceUsage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ public void TestProfileCrud()
TestController.NewInstance.RunPowerShellTest(_logger, "Test-ProfileCrud");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestSkuCreate()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-SkuCreate");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestProfileCrudWithPiping()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,49 @@
# limitations under the License.
# ----------------------------------------------------------------------------------

<#
.SYNOPSIS
Create Profile with different Sku
#>
function Test-SkuCreate
{
$profileName = getAssetName
$resourceGroup = TestSetup-CreateResourceGroup
$profileLocation = "EastUS"
$profileSku = "Standard_Microsoft"
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku

Assert-NotNull $createdProfile
Assert-AreEqual $profileName $createdProfile.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
Assert-AreEqual $profileSku $createdProfile.Sku.Name

$profileSku = "Standard_Verizon"
$profileName = getAssetName
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
Assert-NotNull $createdProfile
Assert-AreEqual $profileName $createdProfile.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
Assert-AreEqual $profileSku $createdProfile.Sku.Name

$profileSku = "Premium_Verizon"
$profileName = getAssetName
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
Assert-NotNull $createdProfile
Assert-AreEqual $profileName $createdProfile.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
Assert-AreEqual $profileSku $createdProfile.Sku.Name

$profileSku = "Standard_Akamai"
$profileName = getAssetName
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku
Assert-NotNull $createdProfile
Assert-AreEqual $profileName $createdProfile.Name
Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName
Assert-AreEqual $profileSku $createdProfile.Sku.Name

Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force
}
<#
.SYNOPSIS
Full Profile CRUD cycle
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/ResourceManager/Cdn/Commands.Cdn/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Current Release
* Added Standard_Microsoft in Cdn pricing sku.

## Version 5.0.5
* Fixed issue with default resource groups not being set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum PSSkuName
Premium_Verizon,
Custom_Verizon,
Standard_Akamai,
Standard_ChinaCdn
Standard_ChinaCdn,
Standard_Microsoft
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class NewAzureRmCdnProfile : AzureCdnCmdletBase
/// <summary>
/// The pricing sku name of the profile.
/// </summary>
[Parameter(Mandatory = true, HelpMessage = "The pricing sku name of the Azure CDN profile. Valid values are StandardVerizon, StandardAkamai, and PremiumVerizon.")]
[Parameter(Mandatory = true, HelpMessage = "The pricing sku name of the Azure CDN profile. Valid values are StandardVerizon, StandardAkamai, Standard_Microsoft and PremiumVerizon.")]
public PSSkuName Sku { get; set; }

/// <summary>
Expand Down

0 comments on commit e1fc5e4

Please sign in to comment.