Skip to content

Commit e45b532

Browse files
update Az.Compute to use latest Compute SDK (#15511)
* updating compute sdk reference, and SecurityType parameter type changes from 'SecurityType" to "string" end user experience stays the same. * add argument Completers for enum parameter * changelog * fix small bug in Set-AzVmsssecurityProfile * suppressing non-customer impacting breaking changes from SDK * update breaking change csv
1 parent 9d41a39 commit e45b532

File tree

11 files changed

+26
-12
lines changed

11 files changed

+26
-12
lines changed

src/Compute/Compute.Test/Compute.Test.csproj

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

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
15+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
1717
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.5.0" />
1818
</ItemGroup>

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
## Upcoming Release
2323
* Fixed the warning in `New-AzVM` cmdlet stating the sku of the VM is being defaulted even if a sku size is provided by the user. Now it only occurs when the user does not provide a sku size.
2424
* Edited `Set-AzVmOperatingSystem` cmdlet to no longer overwrite any existing EnableAutomaticUpdates value on the passed in virtual machine if it exists.
25+
* Updated Compute module to use the latest .Net SDK version 48.0.0.
2526

2627
## Version 4.15.0
2728
* Added optional parameter `-OrchestrationMode` to `New-AzVmss` and `New-AzVmssConfig`

src/Compute/Compute/Compute.csproj

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

1414
<ItemGroup>
1515
<PackageReference Include="AutoMapper" Version="6.2.2" />
16-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
16+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
1717
<PackageReference Include="System.Security.Permissions" Version="4.5.0" />
1818
<PackageReference Include="System.ServiceModel.Primitives" Version="4.4.1" />
1919
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />

src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/SetAzureRmVmssSecurityProfileCommand.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using Microsoft.Azure.Commands.Compute.Automation.Models;
2828
using Microsoft.Azure.Management.Compute.Models;
2929
using Microsoft.WindowsAzure.Commands.Utilities.Common;
30+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
3031

3132
namespace Microsoft.Azure.Commands.Compute.Automation
3233
{
@@ -46,7 +47,8 @@ public partial class SetAzureRmVmssSecurityProfileCommand : Microsoft.Azure.Comm
4647
Mandatory = false,
4748
Position = 1,
4849
ValueFromPipelineByPropertyName = true)]
49-
public SecurityTypes SecurityType { get; set; }
50+
[PSArgumentCompleter("TrustedLaunch")]
51+
public string SecurityType { get; set; }
5052

5153
protected override void ProcessRecord()
5254
{
@@ -58,13 +60,16 @@ private void Run()
5860
if (this.IsParameterBound(c => c.SecurityType))
5961
{
6062
// Security Profile
63+
if (this.VirtualMachineScaleSet.VirtualMachineProfile == null)
64+
{
65+
this.VirtualMachineScaleSet.VirtualMachineProfile = new PSVirtualMachineScaleSetVMProfile();
66+
}
6167
if (this.VirtualMachineScaleSet.VirtualMachineProfile.SecurityProfile == null)
6268
{
6369
this.VirtualMachineScaleSet.VirtualMachineProfile.SecurityProfile = new SecurityProfile();
6470
}
65-
this.VirtualMachineScaleSet.VirtualMachineProfile.SecurityProfile.SecurityType = SecurityType;
71+
this.VirtualMachineScaleSet.VirtualMachineProfile.SecurityProfile.SecurityType = this.SecurityType;
6672
}
67-
6873
WriteObject(this.VirtualMachineScaleSet);
6974
}
7075

src/Compute/Compute/VirtualMachine/Config/SetAzureVMSecurityProfile.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Microsoft.Azure.Commands.Compute.Common;
2121
using Microsoft.Azure.Commands.Compute.Models;
2222
using Microsoft.Azure.Management.Compute.Models;
23+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2324

2425
namespace Microsoft.Azure.Commands.Compute
2526
{
@@ -39,7 +40,8 @@ public class SetAzureVMSecurityProfile : Microsoft.Azure.Commands.ResourceManage
3940
[Parameter(
4041
Mandatory = false,
4142
ValueFromPipelineByPropertyName = true)]
42-
public SecurityTypes SecurityType { get; set; }
43+
[PSArgumentCompleter("TrustedLaunch")]
44+
public string SecurityType { get; set; }
4345

4446
public override void ExecuteCmdlet()
4547
{

src/Network/Network.Test/Network.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.5" />
1919
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
2020
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
21-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
21+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
2222
<PackageReference Include="Microsoft.Azure.Management.PrivateDns" Version="1.0.0" />
2323
<PackageReference Include="Microsoft.Azure.Management.Redis" Version="4.4.1" />
2424
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />

src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<PsModuleName>RecoveryServices.Backup</PsModuleName>
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
14+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
1515
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.5.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices" Version="4.3.1-preview" />
1717
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.1.6-preview" />

src/RecoveryServices/RecoveryServices.SiteRecovery.Test/RecoveryServices.SiteRecovery.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
14+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
1515
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.5.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices" Version="4.3.1-preview" />
1717
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.1.6-preview" />

src/Security/Security.Test/Security.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
4343
</None>
4444
<PackageReference Include="Microsoft.Azure.Management.SecurityCenter" Version="2.2.0" />
45-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
45+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
4646
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />
4747
</ItemGroup>
4848
</Project>

src/SqlVirtualMachine/SqlVirtualMachine.Test/SqlVirtualMachine.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="47.0.0" />
18+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="48.0.0" />
1919
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.5.0" />
2020
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.1.0" />
2121
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="3.8.0-preview" />
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
2+
"Az.Compute","Microsoft.Azure.Commands.Compute.NewAzureAdditionalUnattendContentCommand","Add-AzVMAdditionalUnattendContent","0","3010","The property 'PublicIPAddressSkuName' of type 'Microsoft.Azure.Management.Compute.Models.PublicIPAddressSku' has been removed.","Add the property 'PublicIPAddressSkuName' back to type 'Microsoft.Azure.Management.Compute.Models.PublicIPAddressSku'."
3+
"Az.Compute","Microsoft.Azure.Commands.Compute.NewAzureAdditionalUnattendContentCommand","Add-AzVMAdditionalUnattendContent","0","3010","The property 'PublicIPAddressSkuTier' of type 'Microsoft.Azure.Management.Compute.Models.PublicIPAddressSku' has been removed.","Add the property 'PublicIPAddressSkuTier' back to type 'Microsoft.Azure.Management.Compute.Models.PublicIPAddressSku'."
4+
"Az.Compute","Microsoft.Azure.Commands.Compute.NewAzureAdditionalUnattendContentCommand","Add-AzVMAdditionalUnattendContent","0","3000","The type of property 'SecurityType' of type 'Microsoft.Azure.Management.Compute.Models.SecurityProfile' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Compute.Models.SecurityTypes]' to 'System.String'.","Change the type of property 'SecurityType' back to 'System.Nullable`1[Microsoft.Azure.Management.Compute.Models.SecurityTypes]'."
5+
"Az.Compute","Microsoft.Azure.Commands.Compute.SetAzureVMSecurityProfile","Set-AzVMSecurityProfile","0","2020","The cmdlet 'Set-AzVMSecurityProfile' no longer supports the type 'Microsoft.Azure.Management.Compute.Models.SecurityTypes' for parameter 'SecurityType'.","Change the type for parameter 'SecurityType' back to 'Microsoft.Azure.Management.Compute.Models.SecurityTypes'."
6+
"Az.Compute","Microsoft.Azure.Commands.Compute.Automation.SetAzureRmVmssSecurityProfileCommand","Set-AzVmssSecurityProfile","0","2020","The cmdlet 'Set-AzVmssSecurityProfile' no longer supports the type 'Microsoft.Azure.Management.Compute.Models.SecurityTypes' for parameter 'SecurityType'.","Change the type for parameter 'SecurityType' back to 'Microsoft.Azure.Management.Compute.Models.SecurityTypes'."

0 commit comments

Comments
 (0)