-
Notifications
You must be signed in to change notification settings - Fork 2
Cmdlets for ClusterTestFailover, ClusterTestFailoverCleanup, ClusterUnplannedFailover, ClusterApplyRecoveryPoint, ClusterCommitFailover #39
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
77ba91e
to
bb860c8
Compare
[Parameter( | ||
ParameterSetName = ASRParameterSets.ByObject, | ||
Mandatory = false)] | ||
public List<string> NodeRecoveryPoints { get; set; } |
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.
Add validation to check nodeRecoveryPoints.
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.
Added the null check, will add ArmId validations in next release.
@@ -171,5 +171,153 @@ public PSSiteRecoveryLongRunningOperation RemoveAzureSiteRecoveryReplicationProt | |||
var result = SiteRecoveryAutoMapperProfile.Mapper.Map<PSSiteRecoveryLongRunningOperation>(op); | |||
return result; | |||
} | |||
|
|||
/// <summary> | |||
/// Starts Unplanned Failover |
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.
Cluster Unplanned.
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.
Ack, updating in next revision.
} | ||
|
||
/// <summary> | ||
/// Starts Test Failover |
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.
Cluster Test Failover. Similarly for Input as well
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.
Ack, updating in next revision.
} | ||
|
||
/// <summary> | ||
/// Starts Test Failover Cleanup |
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.
Change across all calls
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.
Ack, updating in next revision.
ProviderSpecificDetails = new ApplyClusterRecoveryPointProviderSpecificInput() | ||
}; | ||
|
||
if (LatestProcessedRecoveryPoints && ClusterRecoveryPoint == null) |
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 this. for all parameter inputs across this file
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a null check for ReplicationProtectionCluster.ClusterProtectedItemIds
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.
Does it is even possible that cluster has no nodes?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct indentation
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.
Ack, updating in next revision.
/// <summary> | ||
/// Starts a test failover operation. |
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.
Cluster test failover
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.
Ack, updating in next revision.
|
||
List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList(); | ||
return nodeRecoveryPointsList; | ||
} |
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.
Let's move these to Utilities class as it's used in 3 different cmdlets
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.
Ack, updating in next revision.
{ | ||
|
||
/// <summary> | ||
/// Starts a unplanned failover operation. |
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.
Cluster unplanned
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.
Ack, updating in next revision.
} | ||
|
||
/// <summary> | ||
/// Starts replication protected clustrer unplanned failover. |
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.
typo
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.
Ack, updating in next revision.
|
||
|
||
List<string> nodeRecoveryPointsList = nodeRecoveryPoints.ToList(); | ||
return nodeRecoveryPointsList; |
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.
Same as other comment
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.
Ack, updating in next revision.
b2c0fb0
to
898fc48
Compare
{ | ||
return null; | ||
} | ||
} |
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.
Remove as per latest merge
# Start-AzRecoveryServicesAsrApplyClusterRecoveryPoint | ||
|
||
## SYNOPSIS | ||
Changes a recovery point for a failed over repliction protection cluster before committing the failover operation |
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.
replication
Description
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.