Skip to content

Commit 198fa5c

Browse files
authored
ASR: Adding support for ZRS disk types, and adding fields in protected item response (#16002)
* ZRS disk support * Updated changelog * Updated as per comments
1 parent 89dabd8 commit 198fa5c

File tree

6 files changed

+36
-4
lines changed

6 files changed

+36
-4
lines changed

src/RecoveryServices/RecoveryServices.SiteRecovery/DiskReplicationConfiguration/AzureRmAsrAzureToAzureDiskReplicationConfig.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ public class AzureRmAsrAzureToAzureDiskReplicationConfig : SiteRecoveryCmdletBas
8484
[ValidateNotNullOrEmpty]
8585
[ValidateSet(
8686
Constants.Premium_LRS,
87+
Constants.Premium_ZRS,
8788
Constants.Standard_LRS,
8889
Constants.Standard_SSD,
89-
Constants.StandardSSD_LRS)]
90+
Constants.StandardSSD_LRS,
91+
Constants.StandardSSD_ZRS)]
9092
public string RecoveryReplicaDiskAccountType { get; set; }
9193

9294
/// <summary>
@@ -96,9 +98,11 @@ public class AzureRmAsrAzureToAzureDiskReplicationConfig : SiteRecoveryCmdletBas
9698
[ValidateNotNullOrEmpty]
9799
[ValidateSet(
98100
Constants.Premium_LRS,
101+
Constants.Premium_ZRS,
99102
Constants.Standard_LRS,
100103
Constants.Standard_SSD,
101-
Constants.StandardSSD_LRS)]
104+
Constants.StandardSSD_LRS,
105+
Constants.StandardSSD_ZRS)]
102106
public string RecoveryTargetDiskAccountType { get; set; }
103107

104108
/// <summary>

src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSConstants.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ public static class Constants
362362
/// </summary>
363363
public const string Premium_LRS = "Premium_LRS";
364364

365+
/// <summary>
366+
/// Represents Premium_ZRS storage account.
367+
/// </summary>
368+
public const string Premium_ZRS = "Premium_ZRS";
369+
365370
/// <summary>
366371
/// Represents primary location.
367372
/// </summary>
@@ -519,6 +524,11 @@ public static class Constants
519524
/// </summary>
520525
public const string StandardSSD_LRS = "StandardSSD_LRS";
521526

527+
/// <summary>
528+
/// Represents StandardSSD_ZRS storage account.
529+
/// </summary>
530+
public const string StandardSSD_ZRS = "StandardSSD_ZRS";
531+
522532
/// <summary>
523533
/// Represents Standard_SSD storage account.
524534
/// </summary>

src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSFabricDetails.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,8 @@ public ASRAzureToAzureSpecificRPIDetails(A2AReplicationDetails details)
21202120
this.InitialRecoveryFabricLocation = details.InitialRecoveryFabricLocation;
21212121
this.InitialPrimaryZone = details.InitialPrimaryZone;
21222122
this.InitialRecoveryZone = details.InitialRecoveryZone;
2123+
this.RecoveryAvailabilityZone = details.RecoveryAvailabilityZone;
2124+
this.PrimaryAvailabilityZone = details.PrimaryAvailabilityZone;
21232125
this.LifecycleId = details.LifecycleId;
21242126

21252127
if (details.LastHeartbeat != null)
@@ -2307,6 +2309,16 @@ public ASRAzureToAzureSpecificRPIDetails(A2AReplicationDetails details)
23072309
/// </summary>
23082310
public string InitialRecoveryZone { get; set; }
23092311

2312+
/// <summary>
2313+
/// Gets or sets the recovery availability zone.
2314+
/// </summary>
2315+
public string RecoveryAvailabilityZone { get; set; }
2316+
2317+
/// <summary>
2318+
/// Gets or sets the primary availability zone.
2319+
/// </summary>
2320+
public string PrimaryAvailabilityZone { get; set; }
2321+
23102322
/// <summary>
23112323
/// Gets or sets the only constant ID throught out the enable disable cycle.
23122324
/// (with multiple switch protections in the middle) - Recovery Plans refer this ID.

src/RecoveryServices/RecoveryServices.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Global
6060
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
6161
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
6262
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
63+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
64+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
65+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
66+
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.Build.0 = Release|Any CPU
6367
{52643BD5-6378-49BD-9F6E-DAC9DD8A867B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6468
{52643BD5-6378-49BD-9F6E-DAC9DD8A867B}.Debug|Any CPU.Build.0 = Debug|Any CPU
6569
{52643BD5-6378-49BD-9F6E-DAC9DD8A867B}.Release|Any CPU.ActiveCfg = Release|Any CPU

src/RecoveryServices/RecoveryServices/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added support for ZRS disk type for Azure to Azure replication.
22+
* Added Availability zone information in replicated protected item response for Azure to Azure replication.
2123
* Azure Site Recovery bug fixes for VMware to Azure Reprotect, Update policy and Disable scenarios.
2224
* Azure Backup added the support for UserAssigned MSI in RecoveryServices Vault.
2325

src/RecoveryServices/RecoveryServices/help/New-AzRecoveryServicesAsrAzureToAzureDiskReplicationConfig.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Specifies the account type of replicated managed disk.
240240
Type: System.String
241241
Parameter Sets: AzureToAzureManagedDisk
242242
Aliases:
243-
Accepted values: Premium_LRS, Standard_LRS, StandardSSD_LRS
243+
Accepted values: Premium_LRS, Premium_ZRS, Standard_LRS, StandardSSD_LRS, StandardSSD_ZRS
244244

245245
Required: True
246246
Position: Named
@@ -271,7 +271,7 @@ Specifies the recovery target disk for replicated managed disk.
271271
Type: System.String
272272
Parameter Sets: AzureToAzureManagedDisk
273273
Aliases:
274-
Accepted values: Premium_LRS, Standard_LRS, StandardSSD_LRS
274+
Accepted values: Premium_LRS, Premium_ZRS, Standard_LRS, StandardSSD_LRS, StandardSSD_ZRS
275275

276276
Required: True
277277
Position: Named

0 commit comments

Comments
 (0)