Backup service - add database metatdata request (#358)

* Add backup database metadata json rpc

* Backup database metadata changes after sync

* Changed request class name to BackupConfigInfo and made other changes
according to comments

* Addressed PR comments
This commit is contained in:
Kate Shin
2017-05-25 14:52:33 -07:00
committed by GitHub
parent 4861d7a174
commit 2a1da0ff09
14 changed files with 228 additions and 3155 deletions

View File

@@ -0,0 +1,25 @@
//
// 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
{
/// <summary>
/// Provides database info for backup.
/// </summary>
public class BackupConfigInfo
{
public DatabaseInfo DatabaseInfo { get; set; }
public string RecoveryModel { get; set; }
public List<RestoreItemSource> LatestBackups { get; set; }
public string DefaultBackupFolder { get; set; }
public BackupConfigInfo()
{
}
}
}

View File

@@ -0,0 +1,22 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Admin.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
{
public class BackupConfigInfoResponse
{
public BackupConfigInfo BackupConfigInfo { get; set; }
}
public class BackupConfigInfoRequest
{
public static readonly
RequestType<DefaultDatabaseInfoParams, BackupConfigInfoResponse> Type =
RequestType<DefaultDatabaseInfoParams, BackupConfigInfoResponse>.Create("disasterrecovery/backupconfiginfo");
}
}

View File

@@ -3,7 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections;
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
@@ -48,12 +47,12 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
/// <summary>
/// List of {key: backup path, value: device type}
/// </summary>
public Dictionary<string, int> arChangesList { get; set; }
public Dictionary<string, int> BackupPathDevices { get; set; }
/// <summary>
/// List of selected backup paths
/// </summary>
public ArrayList BackupPathList { get; set; }
public List<string> BackupPathList { get; set; }
}
}