Skip to content

Commit

Permalink
Revert "Firewall feature (#119)" (#126)
Browse files Browse the repository at this point in the history
This reverts commit d9bcf53.
  • Loading branch information
rishky-msft authored Feb 15, 2023
1 parent 59100fe commit c8747de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 140 deletions.
73 changes: 3 additions & 70 deletions src/features/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as azdata from 'azdata';
import { NotificationType, RequestType } from "vscode-languageclient";
import { NotificationType } from "vscode-languageclient";
import * as telemetry from '@microsoft/ads-extension-telemetry';


// ------------------------------- < Telemetry Feature Events > ------------------------------------
// ------------------------------- < Telemetry Sent Event > ------------------------------------

/**
* Event sent when the language service send a telemetry event
Expand All @@ -29,71 +28,5 @@ export class TelemetryParams {
measures: telemetry.TelemetryEventMeasures;
}
}
// ------------------------------- </ Telemetry Feature Events > ------------------------------------
// ------------------------------- </ Telemetry Sent Event > ------------------------------------

// ------------------------------- < Firewall Rule Feature Events > ------------------------------------

/**
* A request to open up a firewall rule
*/
export namespace CreateFirewallRuleRequest {
export const type = new RequestType<CreateFirewallRuleParams, azdata.CreateFirewallRuleResponse, void, void>('resource/createFirewallRule');
}

/**
* Firewall rule request handler
*/
export namespace HandleFirewallRuleRequest {
export const type = new RequestType<HandleFirewallRuleParams, azdata.HandleFirewallRuleResponse, void, void>('resource/handleFirewallRule');
}

/**
* Firewall rule creation parameters
*/
export interface CreateFirewallRuleParams {
/**
* Account information to use in connecting to Azure
*/
account: azdata.Account;
/**
* Fully qualified name of the server to create a new firewall rule on
*/
serverName: string;
/**
* Start of the IP address range
*/
startIpAddress: string;
/**
* End of the IP address range
*/
endIpAddress: string;
/**
* Firewall rule name
*/
firewallRuleName: string;
/**
* Per-tenant token mappings. Ideally would be set independently of this call,
* but for now this allows us to get the tokens necessary to find a server and open a firewall rule
*/
securityTokenMappings: {};
}

/**
* Firewall rule handling parameters
*/
export interface HandleFirewallRuleParams {
/**
* The error code used to defined the error type
*/
errorCode: number;
/**
* The error message from which to parse the IP address
*/
errorMessage: string;
/**
* The connection type, for example MSSQL
*/
connectionTypeId: string;
}

// ------------------------------- </ Firewall Rule Feature Events > ------------------------------------
66 changes: 0 additions & 66 deletions src/features/firewall.ts

This file was deleted.

6 changes: 2 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import * as Utils from './utils';
import { TelemetryReporter, LanguageClientErrorHandler } from './telemetry';
import { TelemetryFeature } from './features/telemetry';
import { registerDbDesignerCommands } from './features/dbDesigner';
import { FireWallFeature } from './features/firewall'

const baseConfig = require('./config.json');
const outputChannel = vscode.window.createOutputChannel(Constants.serviceName);
Expand Down Expand Up @@ -55,9 +54,8 @@ export async function activate(context: vscode.ExtensionContext) {
features: [
// we only want to add new features
...SqlOpsDataClient.defaultFeatures,
TelemetryFeature,
FireWallFeature
],
TelemetryFeature
]
};

const installationStart = Date.now();
Expand Down

0 comments on commit c8747de

Please sign in to comment.