remove unused metadata queries from backup (#538)

This commit is contained in:
Kate Shin
2017-11-01 10:55:17 -07:00
committed by Karl Burtram
parent 185978eb80
commit 93ec9864f6
4 changed files with 1 additions and 16 deletions

View File

@@ -143,7 +143,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
BackupConfigInfo configInfo = new BackupConfigInfo();
configInfo.RecoveryModel = GetRecoveryModel(databaseName);
configInfo.DefaultBackupFolder = CommonUtilities.GetDefaultBackupFolder(this.serverConnection);
configInfo.LatestBackups = GetLatestBackupLocations(databaseName);
configInfo.BackupEncryptors = GetBackupEncryptors();
return configInfo;
}

View File

@@ -2,9 +2,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections;
using System.Collections.Generic;
using Microsoft.SqlTools.ServiceLayer.Admin.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
{
@@ -13,21 +11,11 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
/// </summary>
public class BackupConfigInfo
{
/// <summary>
/// Gets or sets default database info
/// </summary>
public DatabaseInfo DatabaseInfo { get; set; }
/// <summary>
/// Gets or sets recovery model of a database
/// </summary>
public string RecoveryModel { get; set; }
/// <summary>
/// Gets or sets the latest backup set of a database
/// </summary>
public List<RestoreItemSource> LatestBackups { get; set; }
/// <summary>
/// Gets or sets the default backup folder
/// </summary>

View File

@@ -153,7 +153,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
if (sqlConn != null && !connInfo.IsCloud)
{
BackupConfigInfo backupConfigInfo = this.GetBackupConfigInfo(helper.DataContainer, sqlConn, sqlConn.Database);
backupConfigInfo.DatabaseInfo = AdminService.GetDatabaseInfo(connInfo);
response.BackupConfigInfo = backupConfigInfo;
}
}

View File

@@ -62,8 +62,7 @@ CREATE CERTIFICATE {1} WITH SUBJECT = 'Backup Encryption Certificate'; ";
requestContext.Verify(x => x.SendResult(It.Is<BackupConfigInfoResponse>
(p => p.BackupConfigInfo.RecoveryModel != string.Empty
&& p.BackupConfigInfo.DefaultBackupFolder != string.Empty
&& p.BackupConfigInfo.DatabaseInfo != null)));
&& p.BackupConfigInfo.DefaultBackupFolder != string.Empty)));
testDb.Cleanup();
}