Skip to content

Commit 98430d5

Browse files
authored
[Az.RecoveryServices.Backup] Added support for setting snapshot consistency type in backup policy (#24169)
* added crash consistent snapshot * Resolved issue with soft delete always on Updated help docs Updated ChangeLog Updated resx Added test cases * re-recorded failed tests Added error message while failing to fetch CRR acccess token * removed progressAction
1 parent fe7ec92 commit 98430d5

File tree

369 files changed

+34751
-24294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+34751
-24294
lines changed

src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ public static PolicyBase GetPolicyModelForAzureIaaSVM(ServiceClientModel.Protect
190190
((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRpDetails.AzureBackupRgNamePrefix;
191191
iaasPolicyModel.AzureBackupRGNameSuffix =
192192
((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRpDetails.AzureBackupRgNameSuffix;
193+
iaasPolicyModel.SnapshotConsistencyType =
194+
((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).SnapshotConsistencyType;
193195

194196
// fetch the smart tiering details
195197
if (((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).TieringPolicy != null &&
@@ -249,7 +251,7 @@ public static PolicyBase GetPolicyModelForAzureFileShare(ServiceClientModel.Prot
249251
ServiceClientModel.AzureFileShareProtectionPolicy azureFileSharePolicy =
250252
(ServiceClientModel.AzureFileShareProtectionPolicy)serviceClientResponse.Properties;
251253

252-
if (azureFileSharePolicy.RetentionPolicy.GetType() !=
254+
if (azureFileSharePolicy.RetentionPolicy != null && azureFileSharePolicy.RetentionPolicy.GetType() !=
253255
typeof(ServiceClientModel.LongTermRetentionPolicy))
254256
{
255257
Logger.Instance.WriteDebug("Unknown RetentionPolicy object received: " +
@@ -271,9 +273,14 @@ public static PolicyBase GetPolicyModelForAzureFileShare(ServiceClientModel.Prot
271273
AzureFileSharePolicy fileSharePolicyModel = policyModel as AzureFileSharePolicy;
272274
fileSharePolicyModel.WorkloadType = WorkloadType.AzureFiles;
273275
fileSharePolicyModel.BackupManagementType = BackupManagementType.AzureStorage;
274-
fileSharePolicyModel.RetentionPolicy =
276+
277+
if(azureFileSharePolicy.RetentionPolicy != null)
278+
{
279+
fileSharePolicyModel.RetentionPolicy =
275280
PolicyHelpers.GetPSLongTermRetentionPolicy((ServiceClientModel.LongTermRetentionPolicy)((ServiceClientModel.AzureFileShareProtectionPolicy)serviceClientResponse.Properties).RetentionPolicy,
276281
((ServiceClientModel.AzureFileShareProtectionPolicy)serviceClientResponse.Properties).TimeZone, backupManagementType);
282+
}
283+
277284
fileSharePolicyModel.SchedulePolicy =
278285
PolicyHelpers.GetPSSimpleSchedulePolicy((ServiceClientModel.SimpleSchedulePolicy)
279286
((ServiceClientModel.AzureFileShareProtectionPolicy)serviceClientResponse.Properties).SchedulePolicy,

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperations.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ internal BmsPrepareDataMoveOperationResultOperations (RecoveryServicesBackupClie
4545
/// The name of the recovery services vault.
4646
/// </param>
4747
/// <param name='resourceGroupName'>
48-
/// The name of the resource group where the recovery services vault is present.
48+
/// The name of the resource group where the recovery services vault is
49+
/// present.
4950
/// </param>
5051
/// <param name='operationId'>
5152
///

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperationsExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static partial class BmsPrepareDataMoveOperationResultOperationsExtension
2222
/// The name of the recovery services vault.
2323
/// </param>
2424
/// <param name='resourceGroupName'>
25-
/// The name of the resource group where the recovery services vault is present.
25+
/// The name of the resource group where the recovery services vault is
26+
/// present.
2627
/// </param>
2728
/// <param name='operationId'>
2829
///
@@ -42,7 +43,8 @@ public static VaultStorageConfigOperationResultResponse Get(this IBmsPrepareData
4243
/// The name of the recovery services vault.
4344
/// </param>
4445
/// <param name='resourceGroupName'>
45-
/// The name of the resource group where the recovery services vault is present.
46+
/// The name of the resource group where the recovery services vault is
47+
/// present.
4648
/// </param>
4749
/// <param name='operationId'>
4850
///

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperations.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ internal BackupEnginesOperations (RecoveryServicesBackupClient client)
3939
public RecoveryServicesBackupClient Client { get; private set; }
4040

4141
/// <summary>
42-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
42+
/// Backup management servers registered to Recovery Services Vault. Returns a
43+
/// pageable list of servers.
4344
/// </summary>
4445
/// <param name='odataQuery'>
4546
///
@@ -48,7 +49,8 @@ internal BackupEnginesOperations (RecoveryServicesBackupClient client)
4849
/// The name of the recovery services vault.
4950
/// </param>
5051
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
52+
/// The name of the resource group where the recovery services vault is
53+
/// present.
5254
/// </param>
5355
/// <param name='skipToken'>
5456
/// skipToken Filter.
@@ -283,7 +285,8 @@ internal BackupEnginesOperations (RecoveryServicesBackupClient client)
283285
/// The name of the recovery services vault.
284286
/// </param>
285287
/// <param name='resourceGroupName'>
286-
/// The name of the resource group where the recovery services vault is present.
288+
/// The name of the resource group where the recovery services vault is
289+
/// present.
287290
/// </param>
288291
/// <param name='backupEngineName'>
289292
/// Name of the backup management server.
@@ -519,7 +522,8 @@ internal BackupEnginesOperations (RecoveryServicesBackupClient client)
519522

520523
}
521524
/// <summary>
522-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
525+
/// Backup management servers registered to Recovery Services Vault. Returns a
526+
/// pageable list of servers.
523527
/// </summary>
524528
/// <param name='nextPageLink'>
525529
/// The NextLink from the previous successful call to List operation.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperationsExtensions.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup
1313
public static partial class BackupEnginesOperationsExtensions
1414
{
1515
/// <summary>
16-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
16+
/// Backup management servers registered to Recovery Services Vault. Returns a
17+
/// pageable list of servers.
1718
/// </summary>
1819
/// <param name='operations'>
1920
/// The operations group for this extension method.
@@ -25,7 +26,8 @@ public static partial class BackupEnginesOperationsExtensions
2526
/// The name of the recovery services vault.
2627
/// </param>
2728
/// <param name='resourceGroupName'>
28-
/// The name of the resource group where the recovery services vault is present.
29+
/// The name of the resource group where the recovery services vault is
30+
/// present.
2931
/// </param>
3032
/// <param name='skipToken'>
3133
/// skipToken Filter.
@@ -36,7 +38,8 @@ public static partial class BackupEnginesOperationsExtensions
3638
}
3739

3840
/// <summary>
39-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
41+
/// Backup management servers registered to Recovery Services Vault. Returns a
42+
/// pageable list of servers.
4043
/// </summary>
4144
/// <param name='operations'>
4245
/// The operations group for this extension method.
@@ -48,7 +51,8 @@ public static partial class BackupEnginesOperationsExtensions
4851
/// The name of the recovery services vault.
4952
/// </param>
5053
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
54+
/// The name of the resource group where the recovery services vault is
55+
/// present.
5256
/// </param>
5357
/// <param name='skipToken'>
5458
/// skipToken Filter.
@@ -76,7 +80,8 @@ public static partial class BackupEnginesOperationsExtensions
7680
/// The name of the recovery services vault.
7781
/// </param>
7882
/// <param name='resourceGroupName'>
79-
/// The name of the resource group where the recovery services vault is present.
83+
/// The name of the resource group where the recovery services vault is
84+
/// present.
8085
/// </param>
8186
/// <param name='backupEngineName'>
8287
/// Name of the backup management server.
@@ -102,7 +107,8 @@ public static partial class BackupEnginesOperationsExtensions
102107
/// The name of the recovery services vault.
103108
/// </param>
104109
/// <param name='resourceGroupName'>
105-
/// The name of the resource group where the recovery services vault is present.
110+
/// The name of the resource group where the recovery services vault is
111+
/// present.
106112
/// </param>
107113
/// <param name='backupEngineName'>
108114
/// Name of the backup management server.
@@ -121,7 +127,8 @@ public static partial class BackupEnginesOperationsExtensions
121127
}
122128
}
123129
/// <summary>
124-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
130+
/// Backup management servers registered to Recovery Services Vault. Returns a
131+
/// pageable list of servers.
125132
/// </summary>
126133
/// <param name='operations'>
127134
/// The operations group for this extension method.
@@ -135,7 +142,8 @@ public static Microsoft.Rest.Azure.IPage<BackupEngineBaseResource> ListNext(this
135142
}
136143

137144
/// <summary>
138-
/// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers.
145+
/// Backup management servers registered to Recovery Services Vault. Returns a
146+
/// pageable list of servers.
139147
/// </summary>
140148
/// <param name='operations'>
141149
/// The operations group for this extension method.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperations.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ internal BackupJobsOperations (RecoveryServicesBackupClient client)
4848
/// The name of the recovery services vault.
4949
/// </param>
5050
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
51+
/// The name of the resource group where the recovery services vault is
52+
/// present.
5253
/// </param>
5354
/// <param name='skipToken'>
5455
/// skipToken Filter.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperationsExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static partial class BackupJobsOperationsExtensions
2525
/// The name of the recovery services vault.
2626
/// </param>
2727
/// <param name='resourceGroupName'>
28-
/// The name of the resource group where the recovery services vault is present.
28+
/// The name of the resource group where the recovery services vault is
29+
/// present.
2930
/// </param>
3031
/// <param name='skipToken'>
3132
/// skipToken Filter.
@@ -48,7 +49,8 @@ public static partial class BackupJobsOperationsExtensions
4849
/// The name of the recovery services vault.
4950
/// </param>
5051
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
52+
/// The name of the resource group where the recovery services vault is
53+
/// present.
5254
/// </param>
5355
/// <param name='skipToken'>
5456
/// skipToken Filter.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperations.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,20 @@ internal BackupOperationResultsOperations (RecoveryServicesBackupClient client)
3939
public RecoveryServicesBackupClient Client { get; private set; }
4040

4141
/// <summary>
42-
/// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the
43-
/// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On
44-
/// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
42+
/// Provides the status of the delete operations such as deleting backed up
43+
/// item. Once the operation has started, the
44+
/// status code in the response would be Accepted. It will continue to be in
45+
/// this state till it reaches completion. On
46+
/// successful completion, the status code will be OK. This method expects
47+
/// OperationID as an argument. OperationID is
4548
/// part of the Location header of the operation response.
4649
/// </summary>
4750
/// <param name='vaultName'>
4851
/// The name of the recovery services vault.
4952
/// </param>
5053
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
54+
/// The name of the resource group where the recovery services vault is
55+
/// present.
5256
/// </param>
5357
/// <param name='operationId'>
5458
/// OperationID which represents the operation.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperationsExtensions.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup
1313
public static partial class BackupOperationResultsOperationsExtensions
1414
{
1515
/// <summary>
16-
/// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the
17-
/// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On
18-
/// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
16+
/// Provides the status of the delete operations such as deleting backed up
17+
/// item. Once the operation has started, the
18+
/// status code in the response would be Accepted. It will continue to be in
19+
/// this state till it reaches completion. On
20+
/// successful completion, the status code will be OK. This method expects
21+
/// OperationID as an argument. OperationID is
1922
/// part of the Location header of the operation response.
2023
/// </summary>
2124
/// <param name='operations'>
@@ -25,7 +28,8 @@ public static partial class BackupOperationResultsOperationsExtensions
2528
/// The name of the recovery services vault.
2629
/// </param>
2730
/// <param name='resourceGroupName'>
28-
/// The name of the resource group where the recovery services vault is present.
31+
/// The name of the resource group where the recovery services vault is
32+
/// present.
2933
/// </param>
3034
/// <param name='operationId'>
3135
/// OperationID which represents the operation.
@@ -36,9 +40,12 @@ public static void Get(this IBackupOperationResultsOperations operations, string
3640
}
3741

3842
/// <summary>
39-
/// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the
40-
/// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On
41-
/// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is
43+
/// Provides the status of the delete operations such as deleting backed up
44+
/// item. Once the operation has started, the
45+
/// status code in the response would be Accepted. It will continue to be in
46+
/// this state till it reaches completion. On
47+
/// successful completion, the status code will be OK. This method expects
48+
/// OperationID as an argument. OperationID is
4249
/// part of the Location header of the operation response.
4350
/// </summary>
4451
/// <param name='operations'>
@@ -48,7 +55,8 @@ public static void Get(this IBackupOperationResultsOperations operations, string
4855
/// The name of the recovery services vault.
4956
/// </param>
5057
/// <param name='resourceGroupName'>
51-
/// The name of the resource group where the recovery services vault is present.
58+
/// The name of the resource group where the recovery services vault is
59+
/// present.
5260
/// </param>
5361
/// <param name='operationId'>
5462
/// OperationID which represents the operation.

src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperations.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ internal BackupOperationStatusesOperations (RecoveryServicesBackupClient client)
3939
public RecoveryServicesBackupClient Client { get; private set; }
4040

4141
/// <summary>
42-
/// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed
43-
/// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations
44-
/// create jobs. This method returns the list of jobs when the operation is complete.
42+
/// Fetches the status of an operation such as triggering a backup, restore.
43+
/// The status can be in progress, completed
44+
/// or failed. You can refer to the OperationStatus enum for all the possible
45+
/// states of an operation. Some operations
46+
/// create jobs. This method returns the list of jobs when the operation is
47+
/// complete.
4548
/// </summary>
4649
/// <param name='vaultName'>
4750
/// The name of the recovery services vault.
4851
/// </param>
4952
/// <param name='resourceGroupName'>
50-
/// The name of the resource group where the recovery services vault is present.
53+
/// The name of the resource group where the recovery services vault is
54+
/// present.
5155
/// </param>
5256
/// <param name='operationId'>
5357
/// OperationID which represents the operation.

0 commit comments

Comments
 (0)