mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 01:25:42 -05:00
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:
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user