Repository navigation
Cmdlets for ClusterTestFailover, ClusterTestFailoverCleanup, ClusterUnplannedFailover, ClusterApplyRecoveryPoint, ClusterCommitFailover - #39
Conversation
77ba91e to
bb860c8
Compare
| [Parameter( | ||
| ParameterSetName = ASRParameterSets.ByObject, | ||
| Mandatory = false)] | ||
| public List<string> NodeRecoveryPoints { get; set; } |
There was a problem hiding this comment.
Add validation to check nodeRecoveryPoints.
There was a problem hiding this comment.
Added the null check, will add ArmId validations in next release.
| } | ||
|
|
||
| /// <summary> | ||
| /// Starts Unplanned Failover |
There was a problem hiding this comment.
Ack, updating in next revision.
| } | ||
|
|
||
| /// <summary> | ||
| /// Starts Test Failover |
There was a problem hiding this comment.
Cluster Test Failover. Similarly for Input as well
There was a problem hiding this comment.
Ack, updating in next revision.
| } | ||
|
|
||
| /// <summary> | ||
| /// Starts Test Failover Cleanup |
There was a problem hiding this comment.
Ack, updating in next revision.
| ProviderSpecificDetails = new ApplyClusterRecoveryPointProviderSpecificInput() | ||
| }; | ||
|
|
||
| if (LatestProcessedRecoveryPoints && ClusterRecoveryPoint == null) |
There was a problem hiding this comment.
Can you add this. for all parameter inputs across this file
There was a problem hiding this comment.
Ack, updating in next revision.
| /// <returns> List of node recovery points.</returns> | ||
| private List<string> UpdateNodeRecoveryPoints() | ||
| { | ||
| List<string> clusterProtectedItemIds = ReplicationProtectionCluster.ClusterProtectedItemIds.ToList(); |
There was a problem hiding this comment.
Add a null check for ReplicationProtectionCluster.ClusterProtectedItemIds
There was a problem hiding this comment.
Does it is even possible that cluster has no nodes?
There was a problem hiding this comment.
Yes, we create cluster and then user need to use this cluster for enable protection
| node => | ||
| { | ||
| List<RecoveryPoint> recoveryPoints = this.RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPoint( | ||
| fabricName, |
There was a problem hiding this comment.
Ack, updating in next revision.
| /// <summary> | ||
| /// Starts a test failover operation. |
There was a problem hiding this comment.
Ack, updating in next revision.
|
|
||
| List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList(); | ||
| return nodeRecoveryPointsList; | ||
| } |
There was a problem hiding this comment.
Let's move these to Utilities class as it's used in 3 different cmdlets
There was a problem hiding this comment.
Ack, updating in next revision.
| { | ||
|
|
||
| /// <summary> | ||
| /// Starts a unplanned failover operation. |
There was a problem hiding this comment.
Ack, updating in next revision.
| } | ||
|
|
||
| /// <summary> | ||
| /// Starts replication protected clustrer unplanned failover. |
There was a problem hiding this comment.
Ack, updating in next revision.
|
|
||
|
|
||
| List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList(); | ||
| return nodeRecoveryPointsList; |
There was a problem hiding this comment.
Ack, updating in next revision.
b2c0fb0 to
898fc48
Compare
| { | ||
| return null; | ||
| } | ||
| } |
| # Start-AzRecoveryServicesAsrApplyClusterRecoveryPoint | ||
|
|
||
| ## SYNOPSIS | ||
| Changes a recovery point for a failed over repliction protection cluster before committing the failover operation |
Description
Checklist
CONTRIBUTING.mdand reviewed the following information:generationbranch.ChangeLog.mdfile(s) appropriatelyChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader in the past tense. Add changelog in description section if PR goes intogenerationbranch.ChangeLog.mdif no new release is required, such as fixing test case only.