From 0e7ebaa063c3c1ea277952fd4ed455412e656c28 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Tue, 30 Oct 2018 11:19:06 +0530 Subject: [PATCH] removed position settings for restore --- .../CommonModels/Enums.cs | 2 +- .../RestoreAzureRMRecoveryServicesBackupItem.cs | 14 +++++++------- .../Az.RecoveryServices.Backup/SignatureIssues.csv | 3 +-- .../SignatureIssues.csv | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs index 2bb5cc85624f..1ac388827f41 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs @@ -320,7 +320,7 @@ public enum ILRAction /// /// Options to resolve conflict for a file share /// - public enum RestoreFSResolveConfictOption + public enum RestoreFSResolveConflictOption { Overwrite, Skip diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs index 712936c8b0a5..050446c9e8ca 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs @@ -77,15 +77,15 @@ public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase /// /// Resolve conflict option /// - [Parameter(Mandatory = true, Position = 3, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = true, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.ResolveConflict)] [ValidateNotNullOrEmpty] - public RestoreFSResolveConfictOption ResolveConflict { get; set; } + public RestoreFSResolveConflictOption ResolveConflict { get; set; } /// /// Source File Path of the file to be recovered /// - [Parameter(Mandatory = false, Position = 4, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = false, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.SourceFilePath)] [ValidateNotNullOrEmpty] public string SourceFilePath { get; set; } @@ -93,7 +93,7 @@ public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase /// /// Source File Type of the file to be recovered /// - [Parameter(Mandatory = false, Position = 5, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = false, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.SourceFilePath)] [ValidateNotNullOrEmpty] public SourceFileType? SourceFileType { get; set; } @@ -101,7 +101,7 @@ public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase /// /// Target storage account name where the disks need to be recovered /// - [Parameter(Mandatory = false, Position = 6, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = false, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.TargetStorageAccountName)] [ValidateNotNullOrEmpty] public string TargetStorageAccountName { get; set; } @@ -109,7 +109,7 @@ public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase /// /// The target file share name to which the files are restored. /// - [Parameter(Mandatory = false, Position = 7, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = false, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.TargetFileShareName)] [ValidateNotNullOrEmpty] public string TargetFileShareName { get; set; } @@ -117,7 +117,7 @@ public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase /// /// The target folder name to which the files are restored. /// - [Parameter(Mandatory = false, Position = 8, ParameterSetName = AzureFileParameterSet, + [Parameter(Mandatory = false, ParameterSetName = AzureFileParameterSet, HelpMessage = ParamHelpMsgs.RestoreFS.TargetFolder)] [ValidateNotNullOrEmpty] public string TargetFolder { get; set; } diff --git a/tools/StaticAnalysis/Exceptions/Az.RecoveryServices.Backup/SignatureIssues.csv b/tools/StaticAnalysis/Exceptions/Az.RecoveryServices.Backup/SignatureIssues.csv index 7e8a63d6212d..5a0fb3b8c867 100644 --- a/tools/StaticAnalysis/Exceptions/Az.RecoveryServices.Backup/SignatureIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.RecoveryServices.Backup/SignatureIssues.csv @@ -11,5 +11,4 @@ "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.NewAzureRmRecoveryServicesBackupProtectionPolicy","New-AzureRmRecoveryServicesBackupProtectionPolicy","1","8420","Parameter set '__AllParameterSets' of cmdlet 'New-AzureRmRecoveryServicesBackupProtectionPolicy' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RemoveAzureRmRecoveryServicesBackupProtectionPolicy","Remove-AzureRmRecoveryServicesBackupProtectionPolicy","1","8600","Cmdlet 'Remove-AzureRmRecoveryServicesBackupProtectionPolicy' has no defined output type.","Add an OutputType attribute that declares the type of the object(s) returned by this cmdlet. If this cmdlet returns no output, please set the output type to 'bool' and make sure to implement the 'PassThru' parameter." "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Container.UnregisterAzureRmRecoveryServicesBackupManagementServer","Unregister-AzureRmRecoveryServicesBackupManagementServer","1","8600","Cmdlet 'Unregister-AzureRmRecoveryServicesBackupManagementServer' has no defined output type.","Add an OutputType attribute that declares the type of the object(s) returned by this cmdlet. If this cmdlet returns no output, please set the output type to 'bool' and make sure to implement the 'PassThru' parameter." -"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupItem","Get-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'GetItemsForPolicy' of cmdlet 'Get-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." -"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RestoreAzureRmRecoveryServicesBackupItem","Restore-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'AzureFileParameterSet' of cmdlet 'Restore-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." \ No newline at end of file +"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupItem","Get-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'GetItemsForPolicy' of cmdlet 'Get-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." \ No newline at end of file diff --git a/tools/StaticAnalysis/Exceptions/AzureRM.RecoveryServices.Backup/SignatureIssues.csv b/tools/StaticAnalysis/Exceptions/AzureRM.RecoveryServices.Backup/SignatureIssues.csv index 7e8a63d6212d..5a0fb3b8c867 100644 --- a/tools/StaticAnalysis/Exceptions/AzureRM.RecoveryServices.Backup/SignatureIssues.csv +++ b/tools/StaticAnalysis/Exceptions/AzureRM.RecoveryServices.Backup/SignatureIssues.csv @@ -11,5 +11,4 @@ "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.NewAzureRmRecoveryServicesBackupProtectionPolicy","New-AzureRmRecoveryServicesBackupProtectionPolicy","1","8420","Parameter set '__AllParameterSets' of cmdlet 'New-AzureRmRecoveryServicesBackupProtectionPolicy' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RemoveAzureRmRecoveryServicesBackupProtectionPolicy","Remove-AzureRmRecoveryServicesBackupProtectionPolicy","1","8600","Cmdlet 'Remove-AzureRmRecoveryServicesBackupProtectionPolicy' has no defined output type.","Add an OutputType attribute that declares the type of the object(s) returned by this cmdlet. If this cmdlet returns no output, please set the output type to 'bool' and make sure to implement the 'PassThru' parameter." "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Container.UnregisterAzureRmRecoveryServicesBackupManagementServer","Unregister-AzureRmRecoveryServicesBackupManagementServer","1","8600","Cmdlet 'Unregister-AzureRmRecoveryServicesBackupManagementServer' has no defined output type.","Add an OutputType attribute that declares the type of the object(s) returned by this cmdlet. If this cmdlet returns no output, please set the output type to 'bool' and make sure to implement the 'PassThru' parameter." -"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupItem","Get-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'GetItemsForPolicy' of cmdlet 'Get-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." -"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RestoreAzureRmRecoveryServicesBackupItem","Restore-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'AzureFileParameterSet' of cmdlet 'Restore-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." \ No newline at end of file +"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.RecoveryServices.Backup\Microsoft.Azure.Commands.RecoveryServices.Backup.dll","Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupItem","Get-AzureRmRecoveryServicesBackupItem","1","8420","Parameter set 'GetItemsForPolicy' of cmdlet 'Get-AzureRmRecoveryServicesBackupItem' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer." \ No newline at end of file