-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[RecoveryServices.Backup] [Ignite] Added new cmdlet for reregistration feature #28628
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
[RecoveryServices.Backup] [Ignite] Added new cmdlet for reregistration feature #28628
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
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.
Pull Request Overview
This PR adds a new cmdlet Redo-AzRecoveryServicesBackupProtection
that enables reregistration of backup items between different Recovery Services vaults. The feature allows users to move backup protection for Azure VMs, SQL workloads, and Azure File Shares from one vault to another while preserving data and applying new policies.
Key changes include:
- Added the new
Redo-AzRecoveryServicesBackupProtection
cmdlet with comprehensive parameter support - Implemented helper classes and methods to handle container unregistration, workload discovery, and protection reconfiguration
- Added test coverage for Azure VM reregistration scenarios
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
Redo-AzRecoveryServicesBackupProtection.md |
Documentation for the new cmdlet with syntax, parameters, and usage examples |
Az.RecoveryServices.md |
Updated module documentation to include the new cmdlet |
ChangeLog.md |
Added changelog entry for the reregistration feature |
Az.RecoveryServices.psd1 |
Exported the new cmdlet in module manifest |
RSBackupVaultCmdletBase.cs |
Enhanced job handling methods to support returning job objects |
CmdletHelper.cs |
New helper class with container management and protectable item discovery logic |
BackupUtils.cs |
Added utility methods for job status checking and resource name extraction |
RedoAzureRmRecoveryServicesBackupProtection.cs |
Main cmdlet implementation handling the three-step reregistration process |
ItemTests.ps1 |
PowerShell test script for Azure VM reregistration scenarios |
ItemTests.cs |
C# test class integration for the new test |
Provider classes | Updated to handle optional parameters in reregistration scenarios |
src/RecoveryServices/RecoveryServices/help/Redo-AzRecoveryServicesBackupProtection.md
Show resolved
Hide resolved
src/RecoveryServices/RecoveryServices.Backup/Helpers/CmdletHelper.cs
Outdated
Show resolved
Hide resolved
...Services/RecoveryServices.Backup/Cmdlets/Item/RedoAzureRmRecoveryServicesBackupProtection.cs
Outdated
Show resolved
Hide resolved
|
||
// Step 3: Configure backup in target vault | ||
WriteVerbose("Configuring backup in target vault now"); | ||
// chck : switch context to the target vault's subscription |
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.
Comment contains typo: 'chck' should be 'check'. This appears to be a development note that should be completed or removed.
// chck : switch context to the target vault's subscription | |
// Check: switch context to the target vault's subscription |
Copilot uses AI. Check for mistakes.
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 note is for later
src/RecoveryServices/RecoveryServices.Backup/Helpers/CmdletHelper.cs
Outdated
Show resolved
Hide resolved
...Services/RecoveryServices.Backup/Cmdlets/Item/RedoAzureRmRecoveryServicesBackupProtection.cs
Outdated
Show resolved
Hide resolved
src/RecoveryServices/RecoveryServices.Backup/Helpers/CmdletHelper.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
139090e
to
c96d190
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@isra-fel all checks have passed |
src/RecoveryServices/RecoveryServices/help/Redo-AzRecoveryServicesBackupProtection.md
Outdated
Show resolved
Hide resolved
This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. |
from one vault to another.
This reverts commit 4b28e88.
c96d190
to
1b78f2d
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Description
Added new cmdlet for reregistration feature
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.