Skip to content

Commit

Permalink
Merge pull request Azure#37 from huangpf/crp2
Browse files Browse the repository at this point in the history
Crp2
  • Loading branch information
AzureRT committed Apr 9, 2015
2 parents a26d47f + b7be4e8 commit 3827cd3
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ function Test-AvailabilitySet
New-AzureResourceGroup -Name $rgname -Location $loc;

$asetName = 'avs' + $rgname;
New-AzureAvailabilitySet -ResourceGroupName $rgname -Name $asetName -Location $loc;
$nonDefaultUD = 2;
$nonDefaultFD = 3;

New-AzureAvailabilitySet -ResourceGroupName $rgname -Name $asetName -Location $loc -PlatformUpdateDomainCount $nonDefaultUD -PlatformFaultDomainCount $nonDefaultFD;

$asets = Get-AzureAvailabilitySet -ResourceGroupName $rgname;
Assert-NotNull $asets;
Expand All @@ -37,6 +40,8 @@ function Test-AvailabilitySet
$aset = Get-AzureAvailabilitySet -ResourceGroupName $rgname -Name $asetName;
Assert-NotNull $aset;
Assert-AreEqual $asetName $aset.Name;
Assert-AreEqual $aset.PlatformUpdateDomainCount $nonDefaultUD;
Assert-AreEqual $aset.PlatformFaultDomainCount $nonDefaultFD;

Remove-AzureAvailabilitySet -ResourceGroupName $rgname -Name $asetName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Test-VirtualMachineExtension
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
$computerName = 'test';
$vhdContainer = "https://$stoname.blob.core.windows.net/test";
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd';
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd';

$p.StorageProfile.OSDisk = $null;
$p = Set-AzureVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Test-VirtualMachineProfile
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
$computerName = 'test';
$vhdContainer = "https://$stoname.blob.core.windows.net/test";
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd';
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd';

$p = Set-AzureVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred;
$p = Set-AzureVMSourceImage -VM $p -Name $img -DestinationVhdsContainer $vhdContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Test-VirtualMachine
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
$computerName = 'test';
$vhdContainer = "https://$stoname.blob.core.windows.net/test";
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd';
$img = 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd';

$p.StorageProfile.OSDisk = $null;
$p = Set-AzureVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@
"RequestUri": "/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231?api-version=2014-12-01-preview",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvODRmZmZjMmYtNWQ3Ny00NDlhLWJjN2YtNThjMzYzZjJhNmI5L3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnMjMxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZXMvdm1wc3Rlc3RyZzIzMT9hcGktdmVyc2lvbj0yMDE0LTEyLTAxLXByZXZpZXc=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"adminPassword\": \"BaR@123pstestrg231\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n }\r\n },\r\n \"name\": \"vmpstestrg231\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}",
"RequestBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"adminPassword\": \"BaR@123pstestrg231\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n }\r\n },\r\n \"name\": \"vmpstestrg231\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}",
"RequestHeaders": {
"Content-Type": [
"application/json"
Expand All @@ -1380,7 +1380,7 @@
"28"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vmpstestrg231-os-20141213-052216-752470\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/vmpstestrg231-os-20141213-052216-752470.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"creating\"\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231\",\r\n \"name\": \"vmpstestrg231\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vmpstestrg231-os-20141213-052216-752470\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/vmpstestrg231-os-20141213-052216-752470.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"creating\"\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231\",\r\n \"name\": \"vmpstestrg231\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n}",
"ResponseHeaders": {
"Content-Length": [
"1918"
Expand Down Expand Up @@ -7165,7 +7165,7 @@
"Microsoft.Azure.Management.Compute.ComputeManagementClient/0.9.0.0"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201410.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vmpstestrg231-os-20141213-052216-752470\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/vmpstestrg231-os-20141213-052216-752470.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"failed\"\r\n },\r\n \"resources\": {\r\n \"extensions\": [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Compute\",\r\n \"type\": \"CustomScriptExtension\",\r\n \"typeHandlerVersion\": \"1.1\",\r\n \"settings\": {\r\n \"fileUris\": \"[]\",\r\n \"commandToExecute\": \"\"\r\n },\r\n \"provisioningState\": \"failed\"\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231/extensions/csetest\",\r\n \"name\": \"csetest\",\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231\",\r\n \"name\": \"vmpstestrg231\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n}",
"ResponseBody": "{\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A2\"\r\n },\r\n \"storageProfile\": {\r\n \"sourceImage\": {\r\n \"id\": \"/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/services/images/a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201503.01-en.us-127GB.vhd\"\r\n },\r\n \"destinationVhdsContainer\": \"https://stopstestrg231.blob.core.windows.net/test\",\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vmpstestrg231-os-20141213-052216-752470\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/vmpstestrg231-os-20141213-052216-752470.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": 0,\r\n \"diskSizeGB\": 10,\r\n \"name\": \"testDataDisk1\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data1.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n },\r\n {\r\n \"lun\": 1,\r\n \"diskSizeGB\": 11,\r\n \"name\": \"testDataDisk2\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg231.blob.core.windows.net/test/data2.vhd\"\r\n },\r\n \"caching\": \"ReadOnly\"\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true\r\n }\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Network/networkInterfaces/nicpstestrg231\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"failed\"\r\n },\r\n \"resources\": {\r\n \"extensions\": [\r\n {\r\n \"properties\": {\r\n \"publisher\": \"Microsoft.Compute\",\r\n \"type\": \"CustomScriptExtension\",\r\n \"typeHandlerVersion\": \"1.1\",\r\n \"settings\": {\r\n \"fileUris\": \"[]\",\r\n \"commandToExecute\": \"\"\r\n },\r\n \"provisioningState\": \"failed\"\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231/extensions/csetest\",\r\n \"name\": \"csetest\",\r\n \"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/84fffc2f-5d77-449a-bc7f-58c363f2a6b9/resourceGroups/pstestrg231/providers/Microsoft.Compute/virtualMachines/vmpstestrg231\",\r\n \"name\": \"vmpstestrg231\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n}",
"ResponseHeaders": {
"Content-Length": [
"2575"
Expand Down
Loading

0 comments on commit 3827cd3

Please sign in to comment.