Skip to content

Cplat sigcmk bug #16010

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

Merged
merged 5 commits into from
Oct 8, 2021
Merged
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
1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

-->
## Upcoming Release
* Updated New-AzGalleryImageVersion to take in the 'Encryption' property correctly from '-TagetRegion' parameter.
* Updated Set-AzVmBootDiagnostic to default to managed storage account if not provided.
* Update Compute .NET SDK package reference to version 49.1.0
* Fixed a bug in `Get-AzVM` that caused incorrect power status output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,27 @@ public override void ExecuteCmdlet()
Name = (string)t["Name"],
RegionalReplicaCount = (int?)t["ReplicaCount"],
StorageAccountType = (string)t["StorageAccountType"],
Encryption = (t["Encryption"] == null) ? (EncryptionImages)t["Encryption"] : null
};
if (t["Encryption"] != null)
{
var osDiskEncryptionSetId = (string)((Hashtable)((Hashtable)t["Encryption"])["osDiskImage"])["DiskEncryptionSetId"];
var osDiskImageEncryption = new OSDiskImageEncryption(osDiskEncryptionSetId);

List<DataDiskImageEncryption> dataDiskImageEncryption = null;
var dataDiskImage = (object[])((Hashtable)t["Encryption"])["dataDiskImages"];

if (dataDiskImage != null)
{
dataDiskImageEncryption = new List<DataDiskImageEncryption>();
foreach (Hashtable dataDiskEncryptionSetId in dataDiskImage)
{
DataDiskImageEncryption d = new DataDiskImageEncryption((int)dataDiskEncryptionSetId["Lun"], (string)dataDiskEncryptionSetId["DiskEncryptionSetId"]);
dataDiskImageEncryption.Add(d);
}
}

target.Encryption = new EncryptionImages(osDiskImageEncryption, dataDiskImageEncryption);
}

galleryImageVersion.PublishingProfile.TargetRegions.Add(target);
}
Expand Down Expand Up @@ -332,8 +351,27 @@ public override void ExecuteCmdlet()
Name = (string)t["Name"],
RegionalReplicaCount = (int?)t["ReplicaCount"],
StorageAccountType = (string)t["StorageAccountType"],
Encryption = (t["Encryption"] == null) ? (EncryptionImages)t["Encryption"] : null
};
if (t["Encryption"] != null)
{
var osDiskEncryptionSetId = (string)((Hashtable)((Hashtable)t["Encryption"])["osDiskImage"])["DiskEncryptionSetId"];
var osDiskImageEncryption = new OSDiskImageEncryption(osDiskEncryptionSetId);

List<DataDiskImageEncryption> dataDiskImageEncryption = null;
var dataDiskImage = (object[])((Hashtable)t["Encryption"])["dataDiskImages"];

if (dataDiskImage != null)
{
dataDiskImageEncryption = new List<DataDiskImageEncryption>();
foreach (Hashtable dataDiskEncryptionSetId in dataDiskImage)
{
DataDiskImageEncryption d = new DataDiskImageEncryption((int)dataDiskEncryptionSetId["Lun"], (string)dataDiskEncryptionSetId["DiskEncryptionSetId"]);
dataDiskImageEncryption.Add(d);
}
}

target.Encryption = new EncryptionImages(osDiskImageEncryption, dataDiskImageEncryption);
}

galleryImageVersion.PublishingProfile.TargetRegions.Add(target);
}
Expand Down