Skip to content

Commit 801da5e

Browse files
fixing merge problems with backup restore resources
1 parent 6225512 commit 801da5e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Sql/Sql/Database Backup/Services/AzureSqlDatabaseBackupAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ internal AzureSqlDatabaseModel RestoreDatabase(string resourceGroup, DateTime re
611611
Capacity = model.Capacity
612612
},
613613
LicenseType = model.LicenseType,
614-
RequestedBackupStorageRedundancy = MapExternalBackupStorageRedundancyToInternal(model.BackupStorageRedundancy),
614+
RequestedBackupStorageRedundancy = model.RequestedBackupStorageRedundancy,
615615
};
616616

617617
if (model.CreateMode == Management.Sql.Models.CreateMode.Recovery)

src/Sql/Sql/Database/Model/AzureSqlDatabaseModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public AzureSqlDatabaseModel(string resourceGroup, string serverName, Management
320320
AutoPauseDelayInMinutes = database.AutoPauseDelay;
321321
MinimumCapacity = database.MinCapacity;
322322
HighAvailabilityReplicaCount = database.HighAvailabilityReplicaCount;
323-
BackupStorageRedundancy = MapInternalBackupStorageRedundancyToExternal(database.CurrentBackupStorageRedundancy);
323+
RequestedBackupStorageRedundancy = database.RequestedBackupStorageRedundancy;
324324
SecondaryType = database.SecondaryType;
325325
MaintenanceConfigurationId = database.MaintenanceConfigurationId;
326326
EnableLedger = database.IsLedgerOn;

src/Sql/Sql/Database/Services/AzureSqlDatabaseAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ internal AzureSqlDatabaseModel UpsertDatabaseWithNewSdk(string resourceGroup, st
161161
AutoPauseDelay = model.Database.AutoPauseDelayInMinutes,
162162
MinCapacity = model.Database.MinimumCapacity,
163163
HighAvailabilityReplicaCount = model.Database.HighAvailabilityReplicaCount,
164-
RequestedBackupStorageRedundancy = MapExternalBackupStorageRedundancyToInternal(model.Database.BackupStorageRedundancy),
164+
RequestedBackupStorageRedundancy = model.Database.RequestedBackupStorageRedundancy,
165165
SecondaryType = model.Database.SecondaryType,
166166
MaintenanceConfigurationId = MaintenanceConfigurationHelper.ConvertMaintenanceConfigurationIdArgument(model.Database.MaintenanceConfigurationId, _subscription.Id),
167167
IsLedgerOn = model.Database.EnableLedger,

src/Sql/Sql/Replication/Services/AzureSqlDatabaseReplicationAdapter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ internal AzureSqlDatabaseCopyModel CopyDatabaseWithNewSdk(string copyResourceGro
148148
Capacity = model.Capacity
149149
},
150150
LicenseType = model.LicenseType,
151-
RequestedBackupStorageRedundancy = MapExternalBackupStorageRedundancyToInternal(model.BackupStorageRedundancy)
151+
RequestedBackupStorageRedundancy = model.RequestedBackupStorageRedundancy,
152152
});
153153

154154
return CreateDatabaseCopyModelFromResponse(model.CopyResourceGroupName, model.CopyServerName, model.ResourceGroupName,
@@ -212,7 +212,7 @@ private AzureSqlDatabaseCopyModel CreateDatabaseCopyModelFromResponse(string cop
212212
model.CopyLocation = database.Location;
213213
model.CreationDate = database.CreationDate.Value;
214214
model.LicenseType = database.LicenseType;
215-
model.BackupStorageRedundancy = MapInternalBackupStorageRedundancyToExternal(database.CurrentBackupStorageRedundancy);
215+
model.RequestedBackupStorageRedundancy = database.RequestedBackupStorageRedundancy;
216216

217217
return model;
218218
}
@@ -273,7 +273,7 @@ internal AzureReplicationLinkModel CreateLinkWithNewSdk(string resourceGroupName
273273
Capacity = model.Capacity
274274
},
275275
LicenseType = model.LicenseType,
276-
RequestedBackupStorageRedundancy = MapExternalBackupStorageRedundancyToInternal(model.BackupStorageRedundancy),
276+
RequestedBackupStorageRedundancy = model.RequestedBackupStorageRedundancy,
277277
SecondaryType = model.SecondaryType,
278278
});
279279

@@ -354,7 +354,7 @@ private AzureReplicationLinkModel CreateReplicationLinkModelFromReplicationLinkR
354354
model.ServerName = serverName;
355355
model.DatabaseName = databaseName;
356356
model.AllowConnections = allowConnections;
357-
model.Location = GetServerLocation(resourceGroupName, serverName);
357+
model.Location = resp.Location;
358358
model.PartnerLocation = resp.Properties.PartnerLocation;
359359
model.PercentComplete = resp.Properties.PercentComplete;
360360
model.ReplicationState = resp.Properties.ReplicationState;

0 commit comments

Comments
 (0)