Skip to content

Commit a2cec82

Browse files
authored
Merge pull request #2884 from krkhan/dev
Do not fetch extension status for ProgressMessage of Windows VMs
2 parents 8b0ad29 + 6d61e08 commit a2cec82

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/GetAzureDiskEncryptionStatus.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -353,22 +353,13 @@ public override void ExecuteCmdlet()
353353
OSType osType = GetOSType(vmParameters);
354354
switch (osType)
355355
{
356-
case OSType.Windows:
357-
try
358-
{
359-
progressMessage = GetExtensionStatusMessage(osType);
360-
}
361-
catch(KeyNotFoundException)
362-
{
363-
progressMessage = string.Format(CultureInfo.CurrentUICulture, "Extension status not available on the VM");
364-
}
365-
356+
case OSType.Windows:
366357
encryptionStatus = new AzureDiskEncryptionStatusContext
367358
{
368359
OsVolumeEncrypted = osVolumeEncrypted,
369360
DataVolumesEncrypted = dataVolumesEncrypted,
370361
OsVolumeEncryptionSettings = osVolumeEncryptionSettings,
371-
ProgressMessage = progressMessage
362+
ProgressMessage = string.Format(CultureInfo.CurrentUICulture, "OsVolume: {0}, DataVolumes: {1}", osVolumeEncrypted, dataVolumesEncrypted)
372363
};
373364
WriteObject(encryptionStatus);
374365
break;

0 commit comments

Comments
 (0)