Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compute] Autogen PR Issue 7 #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

-->
## Upcoming Release
* Updated `Set-AzDiskSecurityProfile` cmdlet
- The existing parameter SecurityType is now set to null after processing the user's input value.
* Fixed `New-AzVmss` to correctly work when using `-EdgeZone` by creating the Load Balancer in the correct edge zone.
* Removed references to image aliases in `New-AzVM` and `New-AzVmss` to images that were removed.
* Fixed `New-AzVmss` to correctly work when using `-EdgeZone` by creating the Load Balancer in the correct edge zone.
* Removed references to image aliases in `New-AzVM` and `New-AzVmss` to images that were removed.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -64,8 +64,6 @@ protected override void ProcessRecord()

private void Run()
{
// At this time, it is impossible to set SecurityType to Standard ("") as it is a mandatory property on the backend.
// If Standard is used, then there should be no securityProfile at all for now.
if (SecurityType.ToLower() != ConstantValues.StandardSecurityType)
{
if(this.Disk.SecurityProfile == null)
Expand All @@ -75,14 +73,13 @@ private void Run()
this.Disk.SecurityProfile.SecurityType = SecurityType;
}

// Allow the Standard scenario, which will be nulled out just before the .Net SDK create call for disks.
if (SecurityType.ToLower() == ConstantValues.StandardSecurityType)
{
if (this.Disk.SecurityProfile == null)
{
this.Disk.SecurityProfile = new DiskSecurityProfile();
}
this.Disk.SecurityProfile.SecurityType = SecurityType;
this.Disk.SecurityProfile.SecurityType = null;
}

if (this.IsParameterBound(c => c.SecureVMDiskEncryptionSet))
Expand All @@ -98,4 +95,5 @@ private void Run()
}
}

}
}.

3 changes: 2 additions & 1 deletion src/Compute/Compute/Generated/Models/PSDisk.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -81,3 +81,4 @@ public string ResourceGroupName
public bool? OptimizedForFrequentAttach { get; set; }
}
}
.