Skip to content

Commit f9c68f5

Browse files
committed
Merge branch 'release-2018-11-06' of github.com:/azure/azure-powershell into release-2018-11-06
2 parents b953fc0 + 9a27595 commit f9c68f5

File tree

111 files changed

+3573
-2214
lines changed

Some content is hidden

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

111 files changed

+3573
-2214
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
2727
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
28-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="23.0.1" />
28+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="23.2.0" />
2929
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
3030
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.5.1-preview" />
3131
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="8.1.0-preview" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</PropertyGroup>
4545
<ItemGroup>
4646
<Reference Include="Microsoft.Azure.Management.Compute">
47-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.23.0.1\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
47+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.23.2.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
4848
</Reference>
4949
<Reference Include="Microsoft.Azure.Management.Network, Version=19.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5050
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.19.5.1-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ function Test-VirtualMachineScaleSetIdentity
10111011
Assert-AreEqual "SystemAssigned" $result.Identity.Type;
10121012
Assert-NotNull $result.Identity.PrincipalId;
10131013
Assert-NotNull $result.Identity.TenantId;
1014+
Assert-Null $result.Identity.UserAssignedIdentities;
10141015

10151016
# Validate Network Profile
10161017
Assert-AreEqual 'test' $result.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].Name;
@@ -1046,6 +1047,7 @@ function Test-VirtualMachineScaleSetIdentity
10461047
Assert-AreEqual "SystemAssigned" $vmssResult.Identity.Type;
10471048
Assert-NotNull $vmssResult.Identity.PrincipalId;
10481049
Assert-NotNull $vmssResult.Identity.TenantId;
1050+
Assert-Null $result.Identity.UserAssignedIdentities;
10491051

10501052
$vmssInstanceViewResult = Get-AzureRmVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName -InstanceView;
10511053
Assert-AreEqual "ProvisioningState/succeeded" $vmssInstanceViewResult.VirtualMachine.StatusesSummary[0].Code;
@@ -1828,8 +1830,18 @@ function Test-VirtualMachineScaleSetVMUpdate
18281830
| New-AzureRmDisk -ResourceGroupName $rgname -DiskName $diskname0;
18291831
$disk0 = Get-AzureRmDisk -ResourceGroupName $rgname -DiskName $diskname0;
18301832

1833+
$vmssVM = Add-AzureRmVmssVMDataDisk -VirtualMachineScaleSetVM $vmssVMs[0] -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk0.Id;
1834+
$vmssVM = Add-AzureRmVmssVMDataDisk -VirtualMachineScaleSetVM $vmssVM -Caching 'ReadOnly' -DiskSizeInGB 100 -Lun 0 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk0.Id;
1835+
Assert-AreEqual 2 $vmssVM.StorageProfile.DataDisks.Count;
1836+
1837+
$vmssVM = Remove-AzureRmVmssVMDataDisk -VirtualMachineScaleSetVM $vmssVM -Lun 1;
1838+
Assert-AreEqual 1 $vmssVM.StorageProfile.DataDisks.Count;
1839+
1840+
$vmssVM = Remove-AzureRmVmssVMDataDisk -VirtualMachineScaleSetVM $vmssVM -Lun 0;
1841+
Assert-Null $vmssVM.StorageProfile.DataDisks;
1842+
18311843
$result = $vmssVMs[0] `
1832-
| Add-AzureRmVmDataDisk -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk0.Id `
1844+
| Add-AzureRmVmssVMDataDisk -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 -CreateOption Attach -StorageAccountType Standard_LRS -ManagedDiskId $disk0.Id `
18331845
| Update-AzureRmVmssVM;
18341846

18351847
$vmss = Get-AzureRmVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName;

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.4.0-preview" targetFramework="net452" />
88
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Management.Compute" version="23.0.1" targetFramework="net452" />
9+
<package id="Microsoft.Azure.Management.Compute" version="23.2.0" targetFramework="net452" />
1010
<package id="Microsoft.Azure.Management.Network" version="19.5.1-preview" targetFramework="net452" />
1111
<package id="Microsoft.Azure.Management.KeyVault" version="2.4.2" targetFramework="net452" />
1212
<package id="Microsoft.Azure.Management.Storage" version="7.1.0-preview" targetFramework="net452" />

src/ResourceManager/Compute/Commands.Compute/Az.Compute.psd1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ CmdletsToExport = 'Remove-AzAvailabilitySet', 'Get-AzAvailabilitySet',
181181
'New-AzGalleryImageDefinition', 'Update-AzGalleryImageDefinition',
182182
'Get-AzGalleryImageDefinition', 'Remove-AzGalleryImageDefinition',
183183
'New-AzGalleryImageVersion', 'Update-AzGalleryImageVersion',
184-
'Get-AzGalleryImageVersion', 'Remove-AzGalleryImageVersion'
184+
'Get-AzGalleryImageVersion', 'Remove-AzGalleryImageVersion',
185+
'Add-AzVmssVMDataDisk', 'Remove-AzVmssVMDataDisk'
185186

186187
# Variables to export from this module
187188
# VariablesToExport = @()

src/ResourceManager/Compute/Commands.Compute/AzureRM.Compute.psd1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ CmdletsToExport = 'Remove-AzureRmAvailabilitySet', 'Get-AzureRmAvailabilitySet',
181181
'New-AzureRmGalleryImageDefinition', 'Update-AzureRmGalleryImageDefinition',
182182
'Get-AzureRmGalleryImageDefinition', 'Remove-AzureRmGalleryImageDefinition',
183183
'New-AzureRmGalleryImageVersion', 'Update-AzureRmGalleryImageVersion',
184-
'Get-AzureRmGalleryImageVersion', 'Remove-AzureRmGalleryImageVersion'
184+
'Get-AzureRmGalleryImageVersion', 'Remove-AzureRmGalleryImageVersion',
185+
'Add-AzureRmVmssVMDataDisk', 'Remove-AzureRmVmssVMDataDisk'
185186

186187
# Variables to export from this module
187188
# VariablesToExport = @()

src/ResourceManager/Compute/Commands.Compute/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
- Additional information about change #1
2020
-->
2121
## Current Release
22+
* Add Add-AzureRmVmssVMDataDisk and Remove-AzureRmVmssVMDataDisk cmdlets
23+
* Get-AzureRmVMImage shows AutomaticOSUpgradeProperties
24+
* Fixed SetAzureRmVMChefExtension -BootstrapOptions and -JsonAttribute option values are not setting in json format.
2225

2326
## Version 5.7.2
2427
* Add EnableUltraSSD switch parameter to New-AzureRmVMConfiig and New-AzureRmVmssConfig.

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.Netcore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
<ItemGroup>
3535
<PackageReference Include="AutoMapper" Version="6.2.2" />
36-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="23.0.1" />
36+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="23.2.0" />
3737
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
3838
<PackageReference Include="System.ServiceModel.Primitives" Version="4.4.1" />
3939
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Microsoft.Azure.Management.Compute">
57-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.23.0.1\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
57+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.23.2.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
6060
<Reference Include="Microsoft.Data.Edm, Version=5.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute/Common/ComputeAutoMapperProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private static void Initialize()
171171

172172
// Usage => PSUsage
173173
cfg.CreateMap<FROM.Usage, TO.PSUsage>()
174-
.ForMember(c => c.Unit, o => o.MapFrom(r => Microsoft.Azure.Management.Compute.Models.Usage.Unit));
174+
.ForMember(c => c.Unit, o => o.MapFrom(r => FROM.Usage.Unit));
175175

176176
cfg.CreateMap<AzureOperationResponse<FROM.Usage>, TO.PSUsage>()
177177
.ForMember(c => c.StatusCode, o => o.MapFrom(r => r.Response.StatusCode));

src/ResourceManager/Compute/Commands.Compute/Common/ConstantStringTypes.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ public static class HelpMessages
4646
public const string VMManagedDiskId = "The virtual machine managed disk's Id.";
4747
public const string VMManagedDiskAccountType = "The virtual machine managed disk's account type.";
4848

49+
public const string VmssVMDataDiskCaching = "The virtual machine scale set VM data disk's caching.";
50+
public const string VmssVMDataDiskSizeInGB = "The virtual machine scale set VM data disk's size in GB.";
51+
public const string VmssVMDataDiskLun = "The virtual machine scale set VM data disk's Lun.";
52+
public const string VmssVMDataDiskCreateOption = "The virtual machine scale set VM data disk's create option.";
53+
public const string VmssVMManagedDiskId = "The virtual machine scale set VM managed disk's Id.";
54+
public const string VmssVMManagedDiskAccountType = "The virtual scale set VM machine managed disk's account type.";
55+
4956
public const string VMNetworkInterfaceName = "The virtual machine network interface's name.";
5057
public const string VMNetworkInterfaceID = "The virtual machine network interface's ID.";
5158
public const string VMPublicIPAddressName = "The virtual machine public IP address's name.";

src/ResourceManager/Compute/Commands.Compute/Extension/Chef/SetAzureVMChefExtension.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using System.IO;
2323
using System.Linq;
2424
using System.Management.Automation;
25+
using Newtonsoft.Json.Linq;
2526

2627
namespace Microsoft.Azure.Commands.Compute.Extension.Chef
2728
{
@@ -257,6 +258,7 @@ private Hashtable PublicConfiguration
257258
bool IsBootstrapOptionsEmpty = string.IsNullOrEmpty(this.BootstrapOptions);
258259
bool IsJsonAttributeEmpty = string.IsNullOrEmpty(this.JsonAttribute);
259260
bool IsChefDaemonIntervalEmpty = string.IsNullOrEmpty(this.ChefDaemonInterval);
261+
bool IsBootstrapVersionEmpty = string.IsNullOrEmpty(this.BootstrapVersion);
260262
string BootstrapVersion = string.IsNullOrEmpty(this.BootstrapVersion) ? "" : this.BootstrapVersion;
261263
bool IsDaemonEmpty = string.IsNullOrEmpty(this.Daemon);
262264

@@ -308,7 +310,10 @@ private Hashtable PublicConfiguration
308310
}
309311

310312
var hashTable = new Hashtable();
311-
hashTable.Add(BootstrapVersionTemplate, BootstrapVersion);
313+
if (!IsBootstrapVersionEmpty)
314+
{
315+
hashTable.Add(BootstrapVersionTemplate, BootstrapVersion);
316+
}
312317
hashTable.Add(ClientRbTemplate, ClientConfig);
313318

314319
if (!IsRunListEmpty)
@@ -318,12 +323,14 @@ private Hashtable PublicConfiguration
318323

319324
if (!IsBootstrapOptionsEmpty)
320325
{
321-
hashTable.Add(BootStrapOptionsTemplate, this.BootstrapOptions);
326+
JObject bootstrap_option_json = JObject.Parse(this.BootstrapOptions);
327+
hashTable.Add(BootStrapOptionsTemplate, bootstrap_option_json);
322328
}
323329

324330
if (!IsJsonAttributeEmpty)
325331
{
326-
hashTable.Add(JsonAttributeTemplate, JsonAttribute);
332+
JObject json_attribute_json = JObject.Parse(this.JsonAttribute);
333+
hashTable.Add(JsonAttributeTemplate, json_attribute_json);
327334
}
328335

329336
if (!IsChefDaemonIntervalEmpty)
@@ -336,6 +343,7 @@ private Hashtable PublicConfiguration
336343
hashTable.Add(DaemonTemplate, this.Daemon);
337344
}
338345

346+
339347
this.publicConfiguration = hashTable;
340348
}
341349

src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/AddAzureRmVmssDiagnosticsExtension.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,19 @@ protected override void ProcessRecord()
120120
// VirtualMachineProfile
121121
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
122122
{
123-
this.VirtualMachineScaleSet.VirtualMachineProfile = new Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetVMProfile();
123+
this.VirtualMachineScaleSet.VirtualMachineProfile = new VirtualMachineScaleSetVMProfile();
124124
}
125125

126126
// ExtensionProfile
127127
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile == null)
128128
{
129-
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetExtensionProfile();
129+
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile = new VirtualMachineScaleSetExtensionProfile();
130130
}
131131

132132
// Extensions
133133
if (this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions == null)
134134
{
135-
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetExtension>();
135+
this.VirtualMachineScaleSet.VirtualMachineProfile.ExtensionProfile.Extensions = new List<VirtualMachineScaleSetExtension>();
136136
}
137137

138138
bool shouldContinue = true;
@@ -162,7 +162,7 @@ protected override void ProcessRecord()
162162
// Parse configs, and auto fill incomplete parts
163163
Tuple<Hashtable, Hashtable> settings = DiagnosticsHelper.GetConfigurationsFromFiles(this.SettingFilePath, this.ProtectedSettingFilePath, this.VirtualMachineScaleSet.Id, this, storageClient);
164164

165-
var newDiagnosticsExtension = new Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetExtension();
165+
var newDiagnosticsExtension = new VirtualMachineScaleSetExtension();
166166

167167
newDiagnosticsExtension.Name = this.Name;
168168
newDiagnosticsExtension.Publisher = DiagnosticsExtensionConstants.ExtensionPublisher;

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/AddAzureRmContainerServiceAgentPoolProfileCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ private void Run()
7777
// AgentPoolProfiles
7878
if (this.ContainerService.AgentPoolProfiles == null)
7979
{
80-
this.ContainerService.AgentPoolProfiles = new List<Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile>();
80+
this.ContainerService.AgentPoolProfiles = new List<ContainerServiceAgentPoolProfile>();
8181
}
8282

83-
var vAgentPoolProfiles = new Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile();
83+
var vAgentPoolProfiles = new ContainerServiceAgentPoolProfile();
8484

8585
vAgentPoolProfiles.Name = this.MyInvocation.BoundParameters.ContainsKey("Name") ? this.Name : null;
8686
vAgentPoolProfiles.Count = this.Count;

0 commit comments

Comments
 (0)