mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
use azurecore and azureresource as typings (#11892)
* use azurecore and azureresource as typings * Remove unrelated file
This commit is contained in:
@@ -3,49 +3,50 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TreeDataProvider } from 'vscode';
|
||||
import { DataProvider, Account, TreeItem } from 'azdata';
|
||||
declare module 'azureResource' {
|
||||
import { TreeDataProvider } from 'vscode';
|
||||
import { DataProvider, Account, TreeItem } from 'azdata';
|
||||
export namespace azureResource {
|
||||
export interface IAzureResourceProvider extends DataProvider {
|
||||
getTreeDataProvider(): IAzureResourceTreeDataProvider;
|
||||
}
|
||||
|
||||
export interface IAzureResourceTreeDataProvider extends TreeDataProvider<IAzureResourceNode> {
|
||||
}
|
||||
|
||||
export interface IAzureResourceNode {
|
||||
readonly account: Account;
|
||||
readonly subscription: AzureResourceSubscription;
|
||||
readonly tenantId: string;
|
||||
readonly treeItem: TreeItem;
|
||||
}
|
||||
|
||||
export interface AzureResource {
|
||||
name: string;
|
||||
id: string;
|
||||
tenant?: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceSubscription extends AzureResource {
|
||||
}
|
||||
|
||||
export interface AzureSqlResource extends AzureResource {
|
||||
loginName: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceResourceGroup extends AzureResource {
|
||||
}
|
||||
|
||||
export interface AzureResourceDatabase extends AzureSqlResource {
|
||||
serverName: string;
|
||||
serverFullName: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceDatabaseServer extends AzureSqlResource {
|
||||
fullName: string;
|
||||
defaultDatabaseName: string;
|
||||
}
|
||||
|
||||
|
||||
export namespace azureResource {
|
||||
export interface IAzureResourceProvider extends DataProvider {
|
||||
getTreeDataProvider(): IAzureResourceTreeDataProvider;
|
||||
}
|
||||
|
||||
export interface IAzureResourceTreeDataProvider extends TreeDataProvider<IAzureResourceNode> {
|
||||
}
|
||||
|
||||
export interface IAzureResourceNode {
|
||||
readonly account: Account;
|
||||
readonly subscription: AzureResourceSubscription;
|
||||
readonly tenantId: string;
|
||||
readonly treeItem: TreeItem;
|
||||
}
|
||||
|
||||
export interface AzureResource {
|
||||
name: string;
|
||||
id: string;
|
||||
tenant?: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceSubscription extends AzureResource {
|
||||
}
|
||||
|
||||
export interface AzureSqlResource extends AzureResource {
|
||||
loginName: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceResourceGroup extends AzureResource {
|
||||
}
|
||||
|
||||
export interface AzureResourceDatabase extends AzureSqlResource {
|
||||
serverName: string;
|
||||
serverFullName: string;
|
||||
}
|
||||
|
||||
export interface AzureResourceDatabaseServer extends AzureSqlResource {
|
||||
fullName: string;
|
||||
defaultDatabaseName: string;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { AppContext } from '../appContext';
|
||||
import { azureResource } from './azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { TreeNode } from './treeNode';
|
||||
import { AzureResourceCredentialError } from './errors';
|
||||
import { AzureResourceTreeProvider } from './tree/treeProvider';
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as msRest from '@azure/ms-rest-js';
|
||||
|
||||
import { Account } from 'azdata';
|
||||
|
||||
import { azureResource } from './azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureAccount, Tenant } from '../account-provider/interfaces';
|
||||
|
||||
export interface IAzureResourceSubscriptionService {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceDatabaseTreeDataProvider } from './databaseTreeDataProvider';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ServiceClientCredentials } from '@azure/ms-rest-js';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { serversQuery, DbServerGraphData } from '../databaseServer/databaseServerService';
|
||||
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceItemType } from '../../../azureResource/constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { AzureResourceDatabaseServerTreeDataProvider } from './databaseServerTreeDataProvider';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
|
||||
export interface DbServerGraphData extends GraphData {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../../azureResource/constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class AzureResourceDatabaseServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.databaseServerContainer';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { KustoTreeDataProvider as KustoTreeDataProvider } from './kustoTreeDataProvider';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
|
||||
export interface KustoGraphData extends GraphData {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class KustoTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.KustoContainer';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { PostgresServerArcTreeDataProvider as PostgresServerArcTreeDataProvider } from './postgresServerTreeDataProvider';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export interface PostgresArcServerGraphData extends GraphData {
|
||||
properties: {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class PostgresServerArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.postgresArcServer.treeDataProvider.postgresServerContainer';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { PostgresServerTreeDataProvider as PostgresServerTreeDataProvider } from './postgresServerTreeDataProvider';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
|
||||
interface DbServerGraphData extends GraphData {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class PostgresServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.postgresServerContainer';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { DbServerGraphData } from '../databaseServer/databaseServerService';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { ResourceServiceBase } from '../resourceTreeDataProviderBase';
|
||||
|
||||
export class AzureResourceGroupService extends ResourceServiceBase<DbServerGraphData, azureResource.AzureResourceResourceGroup> {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as azdata from 'azdata';
|
||||
import * as msRest from '@azure/ms-rest-js';
|
||||
|
||||
import { azureResource } from '../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../interfaces';
|
||||
import { AzureResourceErrorMessageUtil } from '../utils';
|
||||
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { SqlInstanceTreeDataProvider as SqlInstanceTreeDataProvider } from './sqlInstanceTreeDataProvider';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
|
||||
interface SqlInstanceGraphData extends GraphData {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class SqlInstanceTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.sqlInstanceContainer';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { ExtensionContext } from 'vscode';
|
||||
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { SqlInstanceArcTreeDataProvider as SqlInstanceArcTreeDataProvider } from './sqlInstanceArcTreeDataProvider';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export interface SqlInstanceArcGraphData extends GraphData {
|
||||
properties: {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
||||
import { generateGuid } from '../../utils';
|
||||
import { IAzureResourceService } from '../../interfaces';
|
||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||
import { azureResource } from '../../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
|
||||
export class SqlInstanceArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||
private static readonly containerId = 'azure.resource.providers.sqlInstanceArcContainer';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { extensions, TreeItem } from 'vscode';
|
||||
import { Account } from 'azdata';
|
||||
|
||||
import { azureResource } from './azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceNodeWithProviderId } from './interfaces';
|
||||
|
||||
export class AzureResourceService {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { Account } from 'azdata';
|
||||
|
||||
import { azureResource } from '../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceSubscriptionFilterService, IAzureResourceCacheService } from '../interfaces';
|
||||
|
||||
interface AzureResourceSelectedSubscriptionsCache {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Account } from 'azdata';
|
||||
import { SubscriptionClient } from '@azure/arm-subscriptions';
|
||||
|
||||
import { azureResource } from '../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceSubscriptionService } from '../interfaces';
|
||||
|
||||
export class AzureResourceSubscriptionService implements IAzureResourceSubscriptionService {
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { AppContext } from '../../appContext';
|
||||
import { azureResource } from '../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { TreeNode } from '../treeNode';
|
||||
import { AzureResourceCredentialError } from '../errors';
|
||||
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { AppContext } from '../../appContext';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { azureResource } from '../azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { TreeNode } from '../treeNode';
|
||||
import { IAzureResourceNodeWithProviderId } from '../interfaces';
|
||||
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { azureResource } from './azure-resource';
|
||||
import { GetResourceGroupsResult, GetSubscriptionsResult } from '../azurecore';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { GetResourceGroupsResult, GetSubscriptionsResult } from 'azurecore';
|
||||
import { isArray } from 'util';
|
||||
import { AzureResourceGroupService } from './providers/resourceGroup/resourceGroupService';
|
||||
import { TokenCredentials } from '@azure/ms-rest-js';
|
||||
|
||||
139
extensions/azurecore/src/azurecore.d.ts
vendored
139
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -3,75 +3,76 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { azureResource } from './azureResource/azure-resource';
|
||||
|
||||
/**
|
||||
* Covers defining what the azurecore extension exports to other extensions
|
||||
*
|
||||
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
||||
* (const enums get evaluated when typescript -> javascript so those are fine)
|
||||
*/
|
||||
export const enum extension {
|
||||
name = 'Microsoft.azurecore'
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
||||
*/
|
||||
export const enum AzureRegion {
|
||||
australiacentral = 'australiacentral',
|
||||
australiacentral2 = 'australiacentral2',
|
||||
australiaeast = 'australiaeast',
|
||||
australiasoutheast = 'australiasoutheast',
|
||||
brazilsouth = 'brazilsouth',
|
||||
canadacentral = 'canadacentral',
|
||||
canadaeast = 'canadaeast',
|
||||
centralindia = 'centralindia',
|
||||
centralus = 'centralus',
|
||||
eastasia = 'eastasia',
|
||||
eastus = 'eastus',
|
||||
eastus2 = 'eastus2',
|
||||
francecentral = 'francecentral',
|
||||
francesouth = 'francesouth',
|
||||
germanynorth = 'germanynorth',
|
||||
germanywestcentral = 'germanywestcentral',
|
||||
japaneast = 'japaneast',
|
||||
japanwest = 'japanwest',
|
||||
koreacentral = 'koreacentral',
|
||||
koreasouth = 'koreasouth',
|
||||
northcentralus = 'northcentralus',
|
||||
northeurope = 'northeurope',
|
||||
norwayeast = 'norwayeast',
|
||||
norwaywest = 'norwaywest',
|
||||
southafricanorth = 'southafricanorth',
|
||||
southafricawest = 'southafricawest',
|
||||
southcentralus = 'southcentralus',
|
||||
southeastasia = 'southeastasia',
|
||||
southindia = 'southindia',
|
||||
switzerlandnorth = 'switzerlandnorth',
|
||||
switzerlandwest = 'switzerlandwest',
|
||||
uaecentral = 'uaecentral',
|
||||
uaenorth = 'uaenorth',
|
||||
uksouth = 'uksouth',
|
||||
ukwest = 'ukwest',
|
||||
westcentralus = 'westcentralus',
|
||||
westeurope = 'westeurope',
|
||||
westindia = 'westindia',
|
||||
westus = 'westus',
|
||||
westus2 = 'westus2',
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
||||
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
||||
declare module 'azurecore' {
|
||||
import * as azdata from 'azdata';
|
||||
import { azureResource } from 'azureResource';
|
||||
/**
|
||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||
* @param region The region value
|
||||
* Covers defining what the azurecore extension exports to other extensions
|
||||
*
|
||||
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
||||
* (const enums get evaluated when typescript -> javascript so those are fine)
|
||||
*/
|
||||
getRegionDisplayName(region?: string): string;
|
||||
provideResources(): azureResource.IAzureResourceProvider[];
|
||||
}
|
||||
export const enum extension {
|
||||
name = 'Microsoft.azurecore'
|
||||
}
|
||||
|
||||
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
||||
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
||||
/**
|
||||
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
||||
*/
|
||||
export const enum AzureRegion {
|
||||
australiacentral = 'australiacentral',
|
||||
australiacentral2 = 'australiacentral2',
|
||||
australiaeast = 'australiaeast',
|
||||
australiasoutheast = 'australiasoutheast',
|
||||
brazilsouth = 'brazilsouth',
|
||||
canadacentral = 'canadacentral',
|
||||
canadaeast = 'canadaeast',
|
||||
centralindia = 'centralindia',
|
||||
centralus = 'centralus',
|
||||
eastasia = 'eastasia',
|
||||
eastus = 'eastus',
|
||||
eastus2 = 'eastus2',
|
||||
francecentral = 'francecentral',
|
||||
francesouth = 'francesouth',
|
||||
germanynorth = 'germanynorth',
|
||||
germanywestcentral = 'germanywestcentral',
|
||||
japaneast = 'japaneast',
|
||||
japanwest = 'japanwest',
|
||||
koreacentral = 'koreacentral',
|
||||
koreasouth = 'koreasouth',
|
||||
northcentralus = 'northcentralus',
|
||||
northeurope = 'northeurope',
|
||||
norwayeast = 'norwayeast',
|
||||
norwaywest = 'norwaywest',
|
||||
southafricanorth = 'southafricanorth',
|
||||
southafricawest = 'southafricawest',
|
||||
southcentralus = 'southcentralus',
|
||||
southeastasia = 'southeastasia',
|
||||
southindia = 'southindia',
|
||||
switzerlandnorth = 'switzerlandnorth',
|
||||
switzerlandwest = 'switzerlandwest',
|
||||
uaecentral = 'uaecentral',
|
||||
uaenorth = 'uaenorth',
|
||||
uksouth = 'uksouth',
|
||||
ukwest = 'ukwest',
|
||||
westcentralus = 'westcentralus',
|
||||
westeurope = 'westeurope',
|
||||
westindia = 'westindia',
|
||||
westus = 'westus',
|
||||
westus2 = 'westus2',
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
||||
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
||||
/**
|
||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||
* @param region The region value
|
||||
*/
|
||||
getRegionDisplayName(region?: string): string;
|
||||
provideResources(): azureResource.IAzureResourceProvider[];
|
||||
}
|
||||
|
||||
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
||||
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ import { SqlInstanceArcProvider } from './azureResource/providers/sqlinstanceArc
|
||||
import { SqlInstanceArcResourceService } from './azureResource/providers/sqlinstanceArc/sqlInstanceArcService';
|
||||
import { PostgresServerArcProvider } from './azureResource/providers/postgresArcServer/postgresServerProvider';
|
||||
import { PostgresServerArcService } from './azureResource/providers/postgresArcServer/postgresServerService';
|
||||
import { azureResource } from './azureResource/azure-resource';
|
||||
import * as azurecore from './azurecore';
|
||||
import { azureResource } from 'azureResource';
|
||||
import * as azurecore from 'azurecore';
|
||||
import * as azureResourceUtils from './azureResource/utils';
|
||||
import * as utils from './utils';
|
||||
import * as loc from './localizedConstants';
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
||||
import * as sinon from 'sinon';
|
||||
import 'mocha';
|
||||
|
||||
import { azureResource } from '../../../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceDatabaseTreeDataProvider } from '../../../../azureResource/providers/database/databaseTreeDataProvider';
|
||||
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
||||
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
||||
import * as sinon from 'sinon';
|
||||
import 'mocha';
|
||||
|
||||
import { azureResource } from '../../../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceDatabaseServerTreeDataProvider } from '../../../../azureResource/providers/databaseServer/databaseServerTreeDataProvider';
|
||||
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
||||
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as TypeMoq from 'typemoq';
|
||||
import 'mocha';
|
||||
import { fail } from 'assert';
|
||||
|
||||
import { azureResource } from '../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceService } from '../../azureResource/resourceService';
|
||||
import { AzureAccount } from '../../account-provider/interfaces';
|
||||
import settings from '../../account-provider/providerSettings';
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as TypeMoq from 'typemoq';
|
||||
import * as vscode from 'vscode';
|
||||
import 'mocha';
|
||||
|
||||
import { azureResource } from '../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { AzureResourceService } from '../../azureResource/resourceService';
|
||||
import { AzureResourceResourceTreeNode } from '../../azureResource/resourceTreeNode';
|
||||
import { AppContext } from '../../appContext';
|
||||
|
||||
@@ -12,7 +12,7 @@ import 'mocha';
|
||||
import { TokenCredentials } from '@azure/ms-rest-js';
|
||||
import { AppContext } from '../../../appContext';
|
||||
|
||||
import { azureResource } from '../../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import {
|
||||
IAzureResourceCacheService,
|
||||
IAzureResourceSubscriptionService,
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
||||
import 'mocha';
|
||||
import { AppContext } from '../../../appContext';
|
||||
|
||||
import { azureResource } from '../../../azureResource/azure-resource';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { IAzureResourceTreeChangeHandler } from '../../../azureResource/tree/treeChangeHandler';
|
||||
import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/subscriptionTreeNode';
|
||||
import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
import { getRegionDisplayName } from '../utils';
|
||||
import { AzureRegion } from '../azurecore';
|
||||
import { AzureRegion } from 'azurecore';
|
||||
import * as loc from '../localizedConstants';
|
||||
|
||||
describe('Azurecore Utils Tests', function (): void {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as loc from './localizedConstants';
|
||||
import { AzureRegion } from './azurecore';
|
||||
import { AzureRegion } from 'azurecore';
|
||||
|
||||
/**
|
||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||
|
||||
Reference in New Issue
Block a user