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

下发配置

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

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)
}