Skip to content

Commit 33d09b2

Browse files
committed
merged
2 parents 4e3e057 + e728242 commit 33d09b2

File tree

92 files changed

+21545
-11789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+21545
-11789
lines changed

ChangeLog.txt

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,67 @@
1-
2015.04.28 version 0.8.17
1+
2015.05.17 version 0.8.18
22
* Azure HDInsight:
33
* Added support for creating WindowsPaas cluster with RDP Access Enabled by default
44
* Added cmdlets
55
* Grant-AzureHdinsightRdpAccess
66
* Revoke-AzureHdinsightRdpAccess
7+
* Azure Network
8+
* Added Cmdlets
9+
* Get-AzureVirtualNetwork
10+
* New-AzureVirtualNetwork
11+
* Remove-AzureVirtualNetwork
12+
* Set-AzureVirtualNetwork
13+
* Get-AzureVirtualNetworkSubnetConfig
14+
* New-AzureVirtualNetworkSubnetConfig
15+
* Add-AzureVirtualNetworkSubnetConfig
16+
* Set-AzureVirtualNetworkSubnetConfig
17+
* Remove-AzureVirtualNetworkSubnetConfig
18+
* Get-AzureNetworkInterface
19+
* New-AzureNetworkInterface
20+
* Remove-AzureNetworkInterface
21+
* Set-AzureNetworkInterface
22+
* Get-AzurePublicIpAddress
23+
* New-AzurePublicIpAddress
24+
* Remove-AzurePublicIpAddress
25+
* Set-AzurePublicIpAddress
26+
* Add-AzureLoadBalancerBackendAddressPoolConfig
27+
* Add-AzureLoadBalancerFrontendIpConfig
28+
* Add-AzureLoadBalancerInboundNatRuleConfig
29+
* Add-AzureLoadBalancerProbeConfig
30+
* Add-AzureLoadBalancerRuleConfig
31+
* Get-AzureLoadBalancer
32+
* Get-AzureLoadBalancerBackendAddressPoolConfig
33+
* Get-AzureLoadBalancerFrontendIpConfig
34+
* Get-AzureLoadBalancerInboundNatRuleConfig
35+
* Get-AzureLoadBalancerProbeConfig*
36+
* Get-AzureLoadBalancerRuleConfig
37+
* New-AzureLoadBalancer
38+
* New-AzureLoadBalancerBackendAddressPoolConfig
39+
* New-AzureLoadBalancerFrontendIpConfig
40+
* New-AzureLoadBalancerInboundNatRuleConfig
41+
* New-AzureLoadBalancerProbeConfig
42+
* New-AzureLoadBalancerRuleConfig
43+
* Remove-AzureLoadBalancer
44+
* Remove-AzureLoadBalancerBackendAddressPoolConfig
45+
* Remove-AzureLoadBalancerFrontendIpConfig
46+
* Remove-AzureLoadBalancerInboundNatRuleConfig
47+
* Remove-AzureLoadBalancerProbeConfig
48+
* Remove-AzureLoadBalancerRuleConfig
49+
* Set-AzureLoadBalancer
50+
* Set-AzureLoadBalancerFrontendIpConfig
51+
* Set-AzureLoadBalancerInboundNatRuleConfig
52+
* Set-AzureLoadBalancerProbeConfig
53+
* Set-AzureLoadBalancerRuleConfig
54+
* Get-AzureNetworkSecurityGroup
55+
* New-AzureNetworkSecurityGroup
56+
* Remove-AzureNetworkSecurityGroup
57+
* Set-AzureNetworkSecurityGroup
58+
* Get-AzureNetworkSecurityRuleConfig
59+
* New-AzureNetworkSecurityRuleConfig
60+
* Remove-AzureNetworkSecurityRuleConfig
61+
* Add-AzureNetworkSecurityRuleConfig
62+
* Set-AzureNetworkSecurityRuleConfig
63+
64+
2015.04.28 version 0.8.17
765
* Azure Batch
866
* Added cmdlets
967
* New-AzureBatchVMUser

setup/azurecmdfiles.wxi

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,38 @@
13061306
<File Id="fil658EB945BB104A3BB6E54EB9D7CC76AE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Tags\System.Spatial.dll" />
13071307
</Component>
13081308
</Directory>
1309+
<Directory Id="dirD9530EC10CD28141F082E5C4FD29B000" Name="TrafficManager">
1310+
<Component Id="cmp77866191B1413E61D7B880F54093D6E9" Guid="*">
1311+
<File Id="fil47028FDF13A3C62054C9F61D64B81C1B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Hyak.Common.dll" />
1312+
</Component>
1313+
<Component Id="cmp7F18AD3C425F41CE8DB8E07CE509DAEA" Guid="*">
1314+
<File Id="fil5FF694D6373108F299202DD982297B14" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.Azure.Commands.TrafficManager.dll" />
1315+
</Component>
1316+
<Component Id="cmp0A1CE29CE32BA5CB7B808FB79F598545" Guid="*">
1317+
<File Id="fil59A6C3AA449C5C5C0ECE64549427DA2B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.Azure.Commands.TrafficManager.dll-help.xml" />
1318+
</Component>
1319+
<Component Id="cmpD2BE076C47F8E3FBE7F08523A849CE97" Guid="*">
1320+
<File Id="filE0F844EEB58C5CD073B9E55FD8EE0F3B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.Azure.Common.Authentication.dll" />
1321+
</Component>
1322+
<Component Id="cmpA3BD6FFFE2A4A8906122B0CFCDD774A6" Guid="*">
1323+
<File Id="fil62D73AC54CEAF7CAB45B054BA44F0C55" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.Azure.Common.dll" />
1324+
</Component>
1325+
<Component Id="cmp99392DCBDE8044C2016FF93700B983EB" Guid="*">
1326+
<File Id="fil9A36FC098B4DD67347F5599B2C6E0B49" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.Azure.Management.TrafficManager.dll" />
1327+
</Component>
1328+
<Component Id="cmpF7B36B0AC5A53D62F461D739E7A0CD7F" Guid="*">
1329+
<File Id="filC265B633228818419FDBE0FDD7C0EB31" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
1330+
</Component>
1331+
<Component Id="cmp2BC5CD3EEAB03215BAF80C8D91B316F1" Guid="*">
1332+
<File Id="filB061F4ED4F741048AA7F5AF7B3800BC7" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Microsoft.WindowsAzure.Commands.Common.dll" />
1333+
</Component>
1334+
<Component Id="cmp44E9CD59264367064398F4E0170F73B3" Guid="*">
1335+
<File Id="fil92456941883D58DA275F3B6B3A67C9AE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\Newtonsoft.Json.dll" />
1336+
</Component>
1337+
<Component Id="cmp166C9307AB9128CC171F02474EBC9F38" Guid="*">
1338+
<File Id="fil2EE4D727387984593EACCF967C5A417A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\TrafficManager\System.Net.Http.Formatting.dll" />
1339+
</Component>
1340+
</Directory>
13091341
<Directory Id="dirC50ADFE5CD118426F389B9B2CD995BF6" Name="Websites">
13101342
<Component Id="cmpCB9C95BF2FE6D784EC47F78CEA8714FE" Guid="*">
13111343
<File Id="fil6C3554ACEEBC9EA8063C3E75065A9154" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Websites\Hyak.Common.dll" />
@@ -3433,6 +3465,16 @@
34333465
<ComponentRef Id="cmp73F733B6769D6142F627750A4BF8A304" />
34343466
<ComponentRef Id="cmp1B114EC22E279C9430B23AB28AEE58EC" />
34353467
<ComponentRef Id="cmp82A0A44868270FCB8A12BD4E0346621F" />
3468+
<ComponentRef Id="cmp77866191B1413E61D7B880F54093D6E9" />
3469+
<ComponentRef Id="cmp7F18AD3C425F41CE8DB8E07CE509DAEA" />
3470+
<ComponentRef Id="cmp0A1CE29CE32BA5CB7B808FB79F598545" />
3471+
<ComponentRef Id="cmpD2BE076C47F8E3FBE7F08523A849CE97" />
3472+
<ComponentRef Id="cmpA3BD6FFFE2A4A8906122B0CFCDD774A6" />
3473+
<ComponentRef Id="cmp99392DCBDE8044C2016FF93700B983EB" />
3474+
<ComponentRef Id="cmpF7B36B0AC5A53D62F461D739E7A0CD7F" />
3475+
<ComponentRef Id="cmp2BC5CD3EEAB03215BAF80C8D91B316F1" />
3476+
<ComponentRef Id="cmp44E9CD59264367064398F4E0170F73B3" />
3477+
<ComponentRef Id="cmp166C9307AB9128CC171F02474EBC9F38" />
34363478
<ComponentRef Id="cmpCB9C95BF2FE6D784EC47F78CEA8714FE" />
34373479
<ComponentRef Id="cmpAA3B522375D7F8190EF55B87EB1EB8D4" />
34383480
<ComponentRef Id="cmp1A3E551E9A3F632A9FF29E4347C0E07F" />

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@
6868
<Reference Include="Microsoft.Azure.Management.Compute">
6969
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.3.4.0-preview\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
7070
</Reference>
71+
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
72+
<SpecificVersion>False</SpecificVersion>
73+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.2.0.0-preview\lib\net40\Microsoft.Azure.Management.Network.dll</HintPath>
74+
</Reference>
7175
<Reference Include="Microsoft.Azure.Management.Storage">
7276
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.1.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
7377
</Reference>
74-
<Reference Include="Microsoft.Azure.Management.Network">
75-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.1.0.8-preview\lib\net40\Microsoft.Azure.Management.Network.dll</HintPath>
76-
</Reference>
7778
<Reference Include="Microsoft.Azure.ResourceManager">
7879
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
7980
</Reference>
@@ -242,6 +243,9 @@
242243
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineExtensionTests\TestVirtualMachineExtension.json">
243244
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
244245
</None>
246+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineNetworkInterfaceTests\TestSingleNetworkInterfaceDnsSettings.json">
247+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
248+
</None>
245249
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineNetworkInterfaceTests\TestVirtualMachineMultipleNetworkInterface.json">
246250
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
247251
</None>

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineNetworkInterfaceTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@ public void TestVirtualMachineMultipleNetworkInterface()
3232
{
3333
ComputeTestController.NewInstance.RunPsTest("Test-MultipleNetworkInterface");
3434
}
35+
36+
[Fact]
37+
[Trait(Category.AcceptanceType, Category.CheckIn)]
38+
public void TestSingleNetworkInterfaceDnsSettings()
39+
{
40+
ComputeTestController.NewInstance.RunPsTest("Test-SingleNetworkInterfaceDnsSettings");
41+
}
3542
}
3643
}

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineNetworkInterfaceTests.ps1

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,101 @@ function Test-SingleNetworkInterface
133133
}
134134
}
135135

136+
<#
137+
.SYNOPSIS
138+
Test Virtual Machines with a NetworkInterface with DnsSettings
139+
#>
140+
function Test-SingleNetworkInterfaceDnsSettings
141+
{
142+
# Setup
143+
$rgname = Get-ComputeTestResourceGroupName
144+
145+
try
146+
{
147+
# Common
148+
$loc = 'West US';
149+
New-AzureResourceGroup -Name $rgname -Location $loc;
150+
151+
# VM Profile & Hardware
152+
$vmsize = 'Standard_A2';
153+
$vmname = 'vm' + $rgname;
154+
$p = New-AzureVMConfig -VMName $vmname -VMSize $vmsize;
155+
Assert-AreEqual $p.HardwareProfile.VirtualMachineSize $vmsize;
156+
157+
# NRP
158+
$subnet = New-AzureVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24";
159+
$vnet = New-AzureVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -DnsServer "10.1.1.1" -Subnet $subnet;
160+
$vnet = Get-AzureVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname;
161+
$subnetId = $vnet.Subnets[0].Id;
162+
$pubip = New-AzurePublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ('pubip' + $rgname);
163+
$pubip = Get-AzurePublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname;
164+
$pubipId = $pubip.Id;
165+
$nic = New-AzureNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id -DnsServer "10.0.1.5";
166+
$nic = Get-AzureNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname;
167+
$nicId = $nic.Id;
168+
169+
$p = Add-AzureVMNetworkInterface -VM $p -Id $nicId;
170+
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1;
171+
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].ReferenceUri $nicId;
172+
Assert-Null $p.NetworkProfile.NetworkInterfaces[0].Primary;
173+
174+
# Storage Account (SA)
175+
$stoname = 'sto' + $rgname;
176+
$stotype = 'Standard_GRS';
177+
New-AzureStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
178+
Retry-IfException { $global:stoaccount = Get-AzureStorageAccount -ResourceGroupName $rgname -Name $stoname; }
179+
180+
$osDiskName = 'osDisk';
181+
$osDiskCaching = 'ReadWrite';
182+
$osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd";
183+
$dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd";
184+
$dataDiskVhdUri2 = "https://$stoname.blob.core.windows.net/test/data2.vhd";
185+
$dataDiskVhdUri3 = "https://$stoname.blob.core.windows.net/test/data3.vhd";
186+
187+
$p = Set-AzureVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching;
188+
189+
$p = Add-AzureVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $dataDiskVhdUri1;
190+
$p = Add-AzureVMDataDisk -VM $p -Name 'testDataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 1 -VhdUri $dataDiskVhdUri2;
191+
$p = Add-AzureVMDataDisk -VM $p -Name 'testDataDisk3' -Caching 'ReadOnly' -DiskSizeInGB 12 -Lun 2 -VhdUri $dataDiskVhdUri3;
192+
$p = Remove-AzureVMDataDisk -VM $p -Name 'testDataDisk3';
193+
194+
# OS & Image
195+
$user = "Foo12";
196+
$password = 'BaR@123' + $rgname;
197+
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
198+
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
199+
$computerName = 'test';
200+
$vhdContainer = "https://$stoname.blob.core.windows.net/test";
201+
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd';
202+
203+
$p.StorageProfile.OSDisk = $null;
204+
$p = Set-AzureVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred;
205+
$p = Set-AzureVMSourceImage -VM $p -Name $img -DestinationVhdsContainer $vhdContainer;
206+
207+
# Virtual Machine
208+
# TODO: Still need to do retry for New-AzureVM for SA, even it's returned in Get-.
209+
New-AzureVM -ResourceGroupName $rgname -Location $loc -Name $vmname -VM $p;
210+
211+
# Get VM
212+
$vm1 = Get-AzureVM -Name $vmname -ResourceGroupName $rgname;
213+
214+
# Get NetworkInterface
215+
$getnic = Get-AzureNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname;
216+
Assert-AreEqual $vm1.NetworkProfile.NetworkInterfaces[0].ReferenceUri $getnic.Id;
217+
Assert-AreEqual $getnic.Primary true;
218+
Assert-NotNull $getnic.MacAddress;
219+
Assert-NotNull $getnic.DnsSettings.AppliedDnsServers;
220+
221+
# Remove
222+
Remove-AzureVM -Name $vmname -ResourceGroupName $rgname -Force;
223+
}
224+
finally
225+
{
226+
# Cleanup
227+
Clean-ResourceGroup $rgname
228+
}
229+
}
230+
136231
<#
137232
.SYNOPSIS
138233
Test Virtual Machines with multiple NetworkInterface

0 commit comments

Comments
 (0)