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.
同名套件的其他儲存庫
安裝
$
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)
}