n8n-nodes-netdevices
Version:
n8n node to interact with network devices (Cisco, Juniper, Palo Alto PAN-OS, Ciena SAOS, Linux, etc.)
33 lines (32 loc) • 1.5 kB
TypeScript
import { BaseConnection } from '../base-connection';
import { DeviceCredentials, CommandResult } from '../index';
export declare class LinuxConnection extends BaseConnection {
protected basePrompt: string;
private rootUser;
constructor(credentials: DeviceCredentials);
sessionPreparation(): Promise<void>;
private createLinuxShellChannel;
private stripAnsi;
protected setBasePrompt(): Promise<void>;
sendCommand(command: string): Promise<CommandResult>;
private readUntilPattern;
protected readChannel(timeout?: number): Promise<string>;
private escapeRegex;
protected sanitizeOutput(output: string, command: string): string;
protected disablePaging(): Promise<void>;
sendConfig(configCommands: string[]): Promise<CommandResult>;
getCurrentConfig(): Promise<CommandResult>;
saveConfig(): Promise<CommandResult>;
rebootDevice(): Promise<CommandResult>;
isRootUser(): boolean;
executeAsRoot(command: string): Promise<CommandResult>;
getSystemInfo(): Promise<CommandResult>;
getProcessList(): Promise<CommandResult>;
getDiskUsage(): Promise<CommandResult>;
getMemoryInfo(): Promise<CommandResult>;
getNetworkInterfaces(): Promise<CommandResult>;
getServiceStatus(serviceName: string): Promise<CommandResult>;
startService(serviceName: string): Promise<CommandResult>;
stopService(serviceName: string): Promise<CommandResult>;
restartService(serviceName: string): Promise<CommandResult>;
}