mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Feature/viewlet cmsapis (#4312)
* first set of changes to experiment the registration of cms related apis * Adding cms service entry to workbench * Adding basic functionality for add remove reg servers and group * Returning relative path as part of RegServerResult as string * Removing the cms apis from core. Having mssql extension expose them for cms extension * Propogating the backend name changes to apis * Fixing some missing sqlops references * Adding a sqltools service version with CMS apis available
This commit is contained in:
committed by
Anthony Dresser
parent
d00c3780a6
commit
ddce7731b9
100
extensions/mssql/src/api/mssqlapis.d.ts
vendored
100
extensions/mssql/src/api/mssqlapis.d.ts
vendored
@@ -22,6 +22,14 @@ export interface MssqlExtensionApi {
|
||||
* @memberof IMssqlExtensionApi
|
||||
*/
|
||||
getMssqlObjectExplorerBrowser(): MssqlObjectExplorerBrowser;
|
||||
|
||||
/**
|
||||
* Get the Cms Service APIs to communicate with CMS connections supported by this extension
|
||||
*
|
||||
* @returns {Promise<CmsService>}
|
||||
* @memberof IMssqlExtensionApi
|
||||
*/
|
||||
getCmsServiceProvider(): Promise<CmsService>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,3 +71,95 @@ export interface ITreeNode {
|
||||
export interface IFileNode extends ITreeNode {
|
||||
getFileContentsAsString(maxBytes?: number): Promise<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Interface containing all CMS related operations
|
||||
*/
|
||||
export interface CmsService {
|
||||
/**
|
||||
* Connects to or creates a Central management Server
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} description
|
||||
* @param {azdata.ConnectionInfo} connectiondetails
|
||||
* @param {string} ownerUri
|
||||
* @returns {Thenable<azdata.ListRegisteredServersResult>}
|
||||
*/
|
||||
createCmsServer(name: string, description:string, connectiondetails: azdata.ConnectionInfo, ownerUri: string): Thenable<ListRegisteredServersResult>;
|
||||
|
||||
/**
|
||||
* gets all Registered Servers inside a CMS on a particular level
|
||||
*
|
||||
* @param {string} ownerUri
|
||||
* @param {string} relativePath
|
||||
* @returns {Thenable<azdata.ListRegisteredServersResult>}
|
||||
*/
|
||||
getRegisteredServers(ownerUri: string, relativePath: string): Thenable<ListRegisteredServersResult>;
|
||||
|
||||
/**
|
||||
* Adds a Registered Server inside a CMS on a particular level
|
||||
*
|
||||
* @param {string} ownerUri
|
||||
* @param {string} relativePath
|
||||
* @param {string} registeredServerName
|
||||
* @param {string} registeredServerDescription
|
||||
* @param {azdata.ConnectionInfo} connectiondetails
|
||||
* @returns {Thenable<boolean>>}
|
||||
*/
|
||||
addRegisteredServer (ownerUri: string, relativePath: string, registeredServerName: string, registeredServerDescription:string, connectionDetails:azdata.ConnectionInfo): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Removes a Registered Server inside a CMS on a particular level
|
||||
*
|
||||
* @param {string} ownerUri
|
||||
* @param {string} relativePath
|
||||
* @param {string} registeredServerName
|
||||
* @returns {Thenable<boolean>}
|
||||
*/
|
||||
removeRegisteredServer (ownerUri: string, relativePath: string, registeredServerName: string): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Adds a Server Group inside a CMS on a particular level
|
||||
*
|
||||
* @param {string} ownerUri
|
||||
* @param {string} relativePath
|
||||
* @param {string} groupName
|
||||
* @param {string} groupDescription
|
||||
* @param {azdata.ConnectionInfo} connectiondetails
|
||||
*/
|
||||
addServerGroup (ownerUri: string, relativePath: string, groupName: string, groupDescription:string): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Removes a Server Group inside a CMS on a particular level
|
||||
*
|
||||
* @param {string} ownerUri
|
||||
* @param {string} relativePath
|
||||
* @param {string} groupName
|
||||
* @param {string} groupDescription
|
||||
*/
|
||||
removeServerGroup (ownerUri: string, relativePath: string, groupName: string): Thenable<boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
* CMS Result interfaces as passed back to Extensions
|
||||
*/
|
||||
export interface RegisteredServerResult {
|
||||
name: string;
|
||||
serverName: string;
|
||||
description: string;
|
||||
connectionDetails: azdata.ConnectionInfo;
|
||||
relativePath: string;
|
||||
}
|
||||
|
||||
export interface RegisteredServerGroup {
|
||||
name: string;
|
||||
description: string;
|
||||
relativePath: string;
|
||||
}
|
||||
|
||||
export interface ListRegisteredServersResult {
|
||||
registeredServersList: Array<RegisteredServerResult>;
|
||||
registeredServerGroups: Array<RegisteredServerGroup>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user