resource deployment ext implementation -wip (#5508)

* resource types

* implement the dialog

* remove unused method

* fix issues

* formatting

* 5-17

* address comments and more tests
This commit is contained in:
Alan Ren
2019-05-17 20:24:02 -07:00
committed by GitHub
parent a59d1d3c05
commit 586fe10525
36 changed files with 2208 additions and 21 deletions

View File

@@ -3,3 +3,77 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export interface ResourceType {
name: string;
displayName: string;
description: string;
platforms: string[];
icon: { light: string; dark: string };
options: ResourceTypeOption[];
providers: DeploymentProvider[];
getProvider(selectedOptions: { option: string, value: string }[]): DeploymentProvider | undefined;
}
export interface ResourceTypeOption {
name: string;
displayName: string;
values: ResourceTypeOptionValue[];
}
export interface ResourceTypeOptionValue {
name: string;
displayName: string;
}
export interface DeploymentProvider {
notebook: string | NotebookInfo;
requiredTools: ToolRequirementInfo[];
when: string;
}
export interface NotebookInfo {
win32: string;
darwin: string;
linux: string;
}
export interface ToolRequirementInfo {
name: string;
version: string;
}
export enum ToolType {
Unknown,
AzCli,
KubeCtl,
Docker,
Python,
MSSQLCtl
}
export interface ToolStatusInfo {
type: ToolType;
name: string;
description: string;
version: string;
status: ToolInstallationStatus;
}
export interface ITool {
readonly name: string;
readonly displayName: string;
readonly description: string;
readonly type: ToolType;
readonly supportAutoInstall: boolean;
getInstallationStatus(versionExpression: string): Thenable<ToolInstallationStatus>;
install(version: string): Thenable<void>;
}
export enum ToolInstallationStatus {
NotInstalled,
Installed,
Installing,
FailedToInstall
}