From 9c0f4e6311cd02a2c0bef6c244ec10c8dcacba94 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 1 Feb 2023 12:09:04 +0530 Subject: [PATCH] resolved review comments --- .../Properties/AssemblyInfo.cs | 4 ++-- .../Conversions/RecoveryPointConversions.cs | 1 + .../Properties/AssemblyInfo.cs | 4 ++-- .../Item/DisableAzureRmRecoveryServicesBackupProtection.cs | 6 +++--- .../Properties/AssemblyInfo.cs | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Properties/AssemblyInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Properties/AssemblyInfo.cs index acb045f5f8b4..a07041c0fe4d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Properties/AssemblyInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ [assembly: CLSCompliant(false)] [assembly: Guid("2330c44a-18bf-46d8-976d-64e1fda5fc16")] -[assembly: AssemblyVersion("6.1.3")] -[assembly: AssemblyFileVersion("6.1.3")] +[assembly: AssemblyVersion("6.1.2")] +[assembly: AssemblyFileVersion("6.1.2")] diff --git a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs index a9b9dd33af40..53536558986d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs @@ -794,6 +794,7 @@ public static RecoveryPointBase GetPSAzureVMRecoveryPointForSecondaryRegion( } } + // to uncomment while adding expiry time for CRR RPs /*if (recoveryPoint.RecoveryPointProperties != null) { rpBase.RecoveryPointExpiryTime = (recoveryPoint.RecoveryPointProperties.ExpiryTime != null) ? DateTime.Parse(recoveryPoint.RecoveryPointProperties.ExpiryTime): (DateTime?)null; diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Properties/AssemblyInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Properties/AssemblyInfo.cs index bb904b6afb05..182509ffc994 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Properties/AssemblyInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ [assembly: CLSCompliant(false)] [assembly: Guid("d87b76bd-aa06-49ba-bfd7-f0f4984f65c3")] -[assembly: AssemblyVersion("6.1.3")] -[assembly: AssemblyFileVersion("6.1.3")] +[assembly: AssemblyVersion("6.1.2")] +[assembly: AssemblyFileVersion("6.1.2")] diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs index 21c065f7fbd3..bcbe3740c57a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs @@ -24,6 +24,7 @@ using System.Management.Automation; using Microsoft.Rest.Azure.OData; using System; +using Microsoft.Azure.Commands.Common.Exceptions; namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets { @@ -58,8 +59,7 @@ public SwitchParameter RemoveRecoveryPoints /// If this option is used, all the data backed up for this item will /// expire as per the protection policy retention settings /// - [Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.Item.SuspendBackupOption)] - [ValidateNotNullOrEmpty] + [Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.Item.SuspendBackupOption)] public SwitchParameter RetainRecoveryPointsAsPerPolicy { get; set; } /// @@ -100,7 +100,7 @@ public override void ExecuteCmdlet() if(DeleteBackupData && RetainRecoveryPointsAsPerPolicy.IsPresent) { - throw new ArgumentException(String.Format(Resources.CantRemoveAndRetainRPsSimultaneously)); + throw new AzPSArgumentException(String.Format(Resources.CantRemoveAndRetainRPsSimultaneously), "RetainRecoveryPointsAsPerPolicy"); } PsBackupProviderManager providerManager = diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Properties/AssemblyInfo.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Properties/AssemblyInfo.cs index bf83f5799496..6128a6971034 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Properties/AssemblyInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ [assembly: CLSCompliant(false)] [assembly: Guid("f1393c09-b594-43e7-8987-81393db883d0")] -[assembly: AssemblyVersion("6.1.3")] -[assembly: AssemblyFileVersion("6.1.3")] +[assembly: AssemblyVersion("6.1.2")] +[assembly: AssemblyFileVersion("6.1.2")]