Skip to content

Commit

Permalink
Merge pull request #2 from Azure/build
Browse files Browse the repository at this point in the history
pull from the build branch of Azure-PowerShell-pr
  • Loading branch information
jtlibing committed Apr 28, 2015
2 parents 1712c28 + 284befe commit 6aa132c
Show file tree
Hide file tree
Showing 118 changed files with 50,949 additions and 11,501 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Get-AzureLoadBalancerBackendAddressPoolConfig
* Get-AzureLoadBalancerFrontendIpConfig
* Get-AzureLoadBalancerInboundNatRuleConfig
* Get-AzureLoadBalancerProbeConfig*
* Get-AzureLoadBalancerProbeConfig
* Get-AzureLoadBalancerRuleConfig
* New-AzureLoadBalancer
* New-AzureLoadBalancerBackendAddressPoolConfig
Expand Down Expand Up @@ -60,6 +60,7 @@
* Remove-AzureNetworkSecurityRuleConfig
* Add-AzureNetworkSecurityRuleConfig
* Set-AzureNetworkSecurityRuleConfig
* Get-AzureRemoteDesktopFile
* Azure Storage
* Added cmdlets in AzureResourceManager Mode
* New-AzureStorageAccount
Expand Down
24 changes: 24 additions & 0 deletions setup/azurecmdfiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
</Component>
</Directory>
<Directory Id="dir130578A4F470BDF58FEC794CB8389E91" Name="Compute">
<Component Id="cmp9F0624F1A60FEC6C92BD00C0FF6D3687" Guid="*">
<File Id="fil0F1880F9AF225B647105636C1209B2AD" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\AutoMapper.dll" />
</Component>
<Component Id="cmp8114720BD4403889B36408A1E7F419B1" Guid="*">
<File Id="fil5A8265B48813A0104CB5DEEDA9CEAEAA" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\AutoMapper.Net4.dll" />
</Component>
Expand Down Expand Up @@ -118,6 +121,9 @@
<Component Id="cmp479E4B1EF0A49C9845DB071F542F5392" Guid="*">
<File Id="fil6DD3CFC96544CB343D0C8F22BCFD7433" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml" />
</Component>
<Component Id="cmpDCDC7F34E3D2A51F32765B8C00AE3808" Guid="*">
<File Id="fil8DBE5C6213B46E6DD6AF78238BCA09EB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Commands.Network.dll" />
</Component>
<Component Id="cmp3676864950F4983F3A0CFFC865B00E0C" Guid="*">
<File Id="filA2B2D8901984CF14CE936FCC2B03EB27" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Commands.Network.dll-Help.xml" />
</Component>
Expand Down Expand Up @@ -160,6 +166,9 @@
<Component Id="cmp054DCB81552C931A799108E58DD71095" Guid="*">
<File Id="filF5F920A754551A1F476E3EBE83ADE4E0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Management.Compute.dll" />
</Component>
<Component Id="cmp048B7D0AA1523099D2A77F903D0A1AED" Guid="*">
<File Id="fil8FEBCDF89F18B6CBD6ECC3E3B0426B70" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Management.Network.dll" />
</Component>
<Component Id="cmp7384DD0996585EE335F20A6319D5CC59" Guid="*">
<File Id="fil37FF3D82AC3C550F04A5730690183DB0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Compute\Microsoft.Azure.Management.Storage.dll" />
</Component>
Expand Down Expand Up @@ -2923,6 +2932,9 @@
<Component Id="cmp3AC709C29C5C98FAE63EC5ACF073B2AF" Guid="*">
<File Id="filBD421847424CAE48F72C74C69770D8C0" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.Azure.Common.NetFramework.dll" />
</Component>
<Component Id="cmpF584FEE91889D98A4299209A1B9B1B94" Guid="*">
<File Id="fil1E84C52FC3BA4FCD7D38DF81574031BC" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.Azure.ResourceManager.dll" />
</Component>
<Component Id="cmp9E03AAB684EA41B087D79346AE6C1073" Guid="*">
<File Id="fil501FE0FB963E03A9292BE5CC5A895CBB" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
</Component>
Expand All @@ -2947,6 +2959,12 @@
<Component Id="cmp96B7E859E6B1867E3949455DEEB4E6FE" Guid="*">
<File Id="fil8A3864B6C6B28E31913155F493F537BC" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.dll-help.xml" />
</Component>
<Component Id="cmp16658D499DA8ED48363EA560416B90C5" Guid="*">
<File Id="fil49777B3AFF06BAD82330CADE54BC819E" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.format.ps1xml" />
</Component>
<Component Id="cmpF65F5AE953E042B15C547FC6387BF954" Guid="*">
<File Id="filE27288178840A36607B7A5C5D7D84C8B" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.types.ps1xml" />
</Component>
<Component Id="cmpAD8A1A5D3992F815160303B36F74BD2B" Guid="*">
<File Id="filF37A55DDF2F7847DFC167A8CD2E537EA" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\StorSimple\Microsoft.WindowsAzure.Management.dll" />
</Component>
Expand Down Expand Up @@ -3077,6 +3095,7 @@
<ComponentRef Id="cmp23BAA5F27F989B6A570DA6BAB5AF6468" />
<ComponentRef Id="cmpEE1426977F06792DC1DF6EC28AA3443B" />
<ComponentRef Id="cmp512146B64C58DFB3AB394B1E97621A38" />
<ComponentRef Id="cmp9F0624F1A60FEC6C92BD00C0FF6D3687" />
<ComponentRef Id="cmp8114720BD4403889B36408A1E7F419B1" />
<ComponentRef Id="cmp8ED7930FC364D7D6CEF90AE5FBCE6DC0" />
<ComponentRef Id="cmp2E3CCDF954A1857E106A7052882B0C1F" />
Expand All @@ -3086,6 +3105,7 @@
<ComponentRef Id="cmpD5624BF8D78E80B0526773DE6E4FD2D2" />
<ComponentRef Id="cmp62942A24352ADC631A6C9DAE39D62F70" />
<ComponentRef Id="cmp479E4B1EF0A49C9845DB071F542F5392" />
<ComponentRef Id="cmpDCDC7F34E3D2A51F32765B8C00AE3808" />
<ComponentRef Id="cmp3676864950F4983F3A0CFFC865B00E0C" />
<ComponentRef Id="cmp1AA87AE1B3BBFEBD19E17639D49CDA90" />
<ComponentRef Id="cmp51F8573497DFA72CD06485162F3A1E27" />
Expand All @@ -3100,6 +3120,7 @@
<ComponentRef Id="cmp0D7B40898DEB7EE04D13AB35196E2E1B" />
<ComponentRef Id="cmp15E123AAC081CEACA89E049BD9A58CF2" />
<ComponentRef Id="cmp054DCB81552C931A799108E58DD71095" />
<ComponentRef Id="cmp048B7D0AA1523099D2A77F903D0A1AED" />
<ComponentRef Id="cmp7384DD0996585EE335F20A6319D5CC59" />
<ComponentRef Id="cmpC31383B6374C0C73A42799DA8E38FEE7" />
<ComponentRef Id="cmpFC9747F41AD02584992FEB90BAA4319A" />
Expand Down Expand Up @@ -3983,6 +4004,7 @@
<ComponentRef Id="cmp844CE71A108EFCC5B93A410D5205E6DB" />
<ComponentRef Id="cmp6A927AFF9D7CBE438F31603C59A5D1A6" />
<ComponentRef Id="cmp3AC709C29C5C98FAE63EC5ACF073B2AF" />
<ComponentRef Id="cmpF584FEE91889D98A4299209A1B9B1B94" />
<ComponentRef Id="cmp9E03AAB684EA41B087D79346AE6C1073" />
<ComponentRef Id="cmpEC794DBE4822765C546A06D80EAA3292" />
<ComponentRef Id="cmpB48F1BD4D2E8307615F7E22174FF4E6D" />
Expand All @@ -3991,6 +4013,8 @@
<ComponentRef Id="cmp2A4B259F8FE4D228DE8EC6FF05D891DA" />
<ComponentRef Id="cmpCD982CBC7CFC44B49F7A30F6D9C7CCC3" />
<ComponentRef Id="cmp96B7E859E6B1867E3949455DEEB4E6FE" />
<ComponentRef Id="cmp16658D499DA8ED48363EA560416B90C5" />
<ComponentRef Id="cmpF65F5AE953E042B15C547FC6387BF954" />
<ComponentRef Id="cmpAD8A1A5D3992F815160303B36F74BD2B" />
<ComponentRef Id="cmpBE0D655A7C1D36DC753F35A20389F05F" />
<ComponentRef Id="cmp6DAD84F1908D5F2A7C204E57242034FF" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.0.18.2-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Compute, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.5.0.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<Private>True</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.5.0.1-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.2.0.0-preview\lib\net40\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.3.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
Expand Down Expand Up @@ -146,14 +146,11 @@
<ItemGroup>
<Compile Include="Common\ComputeTestController.cs" />
<Compile Include="ScenarioTests\StorageAccountTests.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineImageList.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineList.cs" />
<Compile Include="ScenarioTests\VirtualMachineProfileTests.cs" />
<Compile Include="ScenarioTests\AvailabilitySetTests.cs" />
<Compile Include="ScenarioTests\VirtualMachineExtensionTests.cs" />
<Compile Include="ScenarioTests\VirtualMachineNetworkInterfaceTests.cs" />
<Compile Include="ScenarioTests\TestVirtualMachineSizeAndUsage.cs" />
<Compile Include="ScenarioTests\VirtualMachinePIRv2Tests.cs" />
<Compile Include="ScenarioTests\UtilityFunctionTests.cs" />
<Compile Include="ScenarioTests\VirtualMachineTests.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -247,6 +244,12 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.StorageAccountTests\TestStorageAccount.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineExtensionTests\TestVirtualMachineAccessExtension.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineExtensionTests\TestVirtualMachineCustomScriptExtension.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineExtensionTests\TestVirtualMachineExtension.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -265,12 +268,27 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineProfileTests\TestVirtualMachineProfile.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineDataDisk.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineImageList.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineList.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineCapture.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachinePIRv2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachinePlan.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachinePlan2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineSizeAndUsage.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,28 @@ function Get-ComputeTestResourceName
}
}

$assetName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetAssetName($testName, "pstestrg")
$oldErrorActionPreferenceValue = $ErrorActionPreference;
$ErrorActionPreference = "SilentlyContinue";

try
{
$assetName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetAssetName($testName, "pstestrg");
}
catch
{
if (($Error.Count -gt 0) -and ($Error[0].Exception.Message -like '*Unable to find type*'))
{
$assetName = Get-RandomItemName;
}
else
{
throw;
}
}
finally
{
$ErrorActionPreference = $oldErrorActionPreferenceValue;
}

return $assetName
}
Expand Down Expand Up @@ -144,7 +165,7 @@ function Get-DefaultRDFEImage

<#
.SYNOPSIS
Gets default RDFE Image
Gets default CRP Image
#>
function Get-DefaultCRPImage
{
Expand Down Expand Up @@ -180,7 +201,7 @@ function Get-DefaultCRPImage
$defaultSku = $result[0];
}

$result = (Get-AzureVMImageVersion -Location $loc -Offer $defaultOffer -PublisherName $defaultPublisher -Skus $defaultSku) | select -ExpandProperty Version;
$result = (Get-AzureVMImage -Location $loc -Offer $defaultOffer -PublisherName $defaultPublisher -Skus $defaultSku) | select -ExpandProperty Version;
if ($result.Count -eq 1)
{
$defaultVersion = $result;
Expand All @@ -190,11 +211,24 @@ function Get-DefaultCRPImage
$defaultVersion = $result[0];
}

$vmimg = Get-AzureVMImage -Location $loc -Offer $defaultOffer -PublisherName $defaultPublisher -Skus $defaultSku -Version $defaultVersion;
$vmimg = Get-AzureVMImageDetail -Location $loc -Offer $defaultOffer -PublisherName $defaultPublisher -Skus $defaultSku -Version $defaultVersion;

return $vmimg;
}

<#
.SYNOPSIS
Gets VMM Images
#>
function Get-MarketplaceImage
{
param([string] $location = "eastasia", [string] $pubFilter = '*', [string] $offerFilter = '*')

$imgs = Get-AzureVMImagePublisher -Location $location | where { $_.PublisherName -like $pubFilter } | Get-AzureVMImageOffer | where { $_.Offer -like $offerFilter } | Get-AzureVMImageSku | Get-AzureVMImage | Get-AzureVMImageDetail | where { $_.PurchasePlan -ne $null };

return $imgs;
}

<#
.SYNOPSIS
Gets default VM config object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,36 @@
// ----------------------------------------------------------------------------------

using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.Azure.Commands.Compute.Models;
using System;
using Xunit;

namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
{
public partial class VirtualMachineTests
public class UtilityFunctionTests
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineImageList()
public void TestLocationStringExtension()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineImageList");
string[] locations = new string[]
{
"West US",
"eastus",
"East Asia 2"
};

Func<string, string> normalize = delegate(string s)
{
return string.IsNullOrEmpty(s) ? s : s.Replace(" ", string.Empty).ToLower();
};

foreach (var loc in locations)
{
var s1 = loc.Canonicalize();
var s2 = normalize(loc);
Assert.True(string.Equals(s1, s2));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,15 @@ public void TestVirtualMachineExtension()
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineExtension");
}

[Fact
(Skip = "Disable this test until the breaking api is checked in.")]
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineCustomScriptExtension()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineCustomScriptExtension");
}

[Fact
(Skip = "Disable this test until the breaking api is checked in.")]
[Trait(Category.AcceptanceType, Category.CheckIn)] // disable this test until the breaking api is checked in.
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineAccessExtension()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineAccessExtension");
Expand Down
Loading

0 comments on commit 6aa132c

Please sign in to comment.