lizi600jin/dsh-ensp ↗★ 0

dsh-ensp

Automate Huawei eNSP labs: generate .topo files, start and stop devices, and push configuration one command at a time with per-command error reporting.

パッケージ
dsh-ensp
互換性
未検証
バージョン
0.1.9
ライセンス
GPL-3.0-or-later
最終更新
2026/11/11

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lizi600jin/dsh-ensp

ドキュメント

README 全文を読む ↗

下发配置

逐条发送,每条命令确认提示符返回后才继续。任一命令出错即中断,并回报行号、命令与设备原始输出。

import { pushConfig } from 'dsh-ensp'

const result = await pushConfig({
  device: 'SW1',
  port: 2000,
  script: `
    system-view
    vlan 10
     quit
    interface GigabitEthernet0/0/1
     port link-type access
     port default vlan 10
     quit
  `,
})

if (!result.ok) {
  console.log(result.failedAt.line, result.failedAt.command, result.failedAt.error)
}