-
Notifications
You must be signed in to change notification settings - Fork 4k
OSA Restore in RecoveryServices.Backup #5310
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
Conversation
@dragonfly91 The parameter name is currently very long, I think that -UseOriginalStorageAccount would work as well without losing clarity for the user. Also, can you update the changelog with this change? |
af63208
to
453cd25
Compare
@@ -213,6 +213,13 @@ function Test-AzureVMFullRestore | |||
|
|||
Set-AzureRmRecoveryServicesVaultContext -Vault $vault; | |||
|
|||
Assert-ThrowsContains { Restore-AzureRmRecoveryServicesBackupItem ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a positive test for this parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is not enabled by default, so setting up the test artefacts for the positive case is quite difficult. Will take this up at a later time when the feature is enabled by default.
/// <summary> | ||
/// Use this switch if the disks from the recovery point are to be restored to their original storage accounts | ||
/// </summary> | ||
[Parameter(Mandatory = false, Position = 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No position is necessary for SwitchParameters
453cd25
to
f7b188d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dragonfly91 It is OK to defer the test as long as you file a test debt issue for this, assign it to yourself, and put it into the next milestone (2018-02-09). Meanwhile, please fix the mismatch between help and cmdlet
@@ -15,8 +15,8 @@ Restores the data and configuration for a Backup item to a recovery point. | |||
|
|||
``` | |||
Restore-AzureRmRecoveryServicesBackupItem [-RecoveryPoint] <RecoveryPointBase> [-StorageAccountName] <String> | |||
[-StorageAccountResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] | |||
[<CommonParameters>] | |||
[-StorageAccountResourceGroupName] <String> [-UseOriginalStorageAccountForDiskRestore] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name in help does not match the test parameter. This needs to be corrected before we can release
… in Restore cmdlet
58d3d57
to
205cea9
Compare
Hi, I've addressed all the comments. Is it possible for this PR to be part of the current Jan release? |
Approved offline
Adding UseOriginalStorageAccountForDiskRestore parameter to Restore cmdlet.
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines