Skip to content

Commit 448b4aa

Browse files
committed
Some fixes for SAN scenarios
1 parent 26cea3c commit 448b4aa

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ function Test-SanE2E
12361236
Import-AzureSiteRecoveryVaultSettingsFile $vaultSettingsFilePath
12371237

12381238
$servers = Get-AzureSiteRecoveryServer
1239-
$primaryVmm = $servers[1]
1240-
$recoveryVmm = $servers[0]
1239+
$primaryVmm = $servers[0]
1240+
$recoveryVmm = $servers[1]
12411241
$storagePri = Get-AzureSiteRecoveryStorage -Server $primaryVmm
12421242
$storageRec = Get-AzureSiteRecoveryStorage -Server $recoveryVmm
12431243

@@ -1300,7 +1300,7 @@ function Test-SanE2E
13001300
}
13011301

13021302
# Find recovery cloud
1303-
if ($protectionContainer.Name.Contains("SanRecoverySanCloud"))
1303+
if ($protectionContainer.Name.Contains("SanRecoveryCloud"))
13041304
{
13051305
$recoveryContainer = $protectionContainer
13061306
}

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/SetAzureSiteRecoveryProtectionEntity.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ public override void ExecuteCmdlet()
238238
null :
239239
pc.ProtectionContainer.AvailableProtectionProfiles[0].ReplicationProvider;
240240

241-
if (replicationProvider != Constants.HyperVReplica && replicationProvider != Constants.San)
241+
if (replicationProvider != Constants.HyperVReplica &&
242+
replicationProvider != Constants.San)
242243
{
243244
throw new Exception("Please provide the protection profile object. It can be chosen from available protection profiles of the protection container.");
244245
}
@@ -269,7 +270,8 @@ public override void ExecuteCmdlet()
269270
null :
270271
pc.ProtectionContainer.AvailableProtectionProfiles[0].ReplicationProvider;
271272

272-
if (replicationProvider != Constants.HyperVReplica)
273+
if (replicationProvider != Constants.HyperVReplica &&
274+
replicationProvider != Constants.San)
273275
{
274276
throw new Exception("Please provide the protection profile object. It can be chosen from available protection profiles of the protection container.");
275277
}
@@ -284,7 +286,7 @@ public override void ExecuteCmdlet()
284286
sanInput.CloudId = this.ProtectionContainerId;
285287
sanInput.RemoteArrayId = this.RecoveryArrayId;
286288
sanInput.ReplicationType = this.Replicationtype;
287-
sanInput.Rpo = this.RPO;
289+
sanInput.RecoveryPointObjective = this.RPO;
288290

289291
input.ReplicationProviderInput = DataContractUtils.Serialize<SanEnableProtectionInput>(sanInput);
290292
}
@@ -338,11 +340,11 @@ public override void ExecuteCmdlet()
338340
else
339341
{
340342
DisableProtectionInput input = null;
341-
string recoveryCloudId = string.Empty;
342-
Utilities.GetCloudIdFromContainerId(this.RecoveryContainerId, out recoveryCloudId);
343343

344344
if (replicationProvider == Constants.San)
345345
{
346+
string recoveryCloudId = string.Empty;
347+
Utilities.GetCloudIdFromContainerId(this.RecoveryContainerId, out recoveryCloudId);
346348
input = new DisableProtectionInput();
347349
SanDisableProtectionInput sanInput = new SanDisableProtectionInput();
348350
sanInput.DeleteReplicaLuns = this.DeleteReplicaLuns;

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSContracts.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ public class SanEnableProtectionInput
12491249
/// - RPO value non-zero -> Should be one of the array's supported RPO values.
12501250
/// </summary>
12511251
[DataMember(Order = 5)]
1252-
public int Rpo { get; set; }
1252+
public int RecoveryPointObjective { get; set; }
12531253

12541254
/// <summary>
12551255
/// Gets or sets the remote array to be used for protection.

0 commit comments

Comments
 (0)