ensp_get_running_config
Retrieve the current running configuration from a Huawei eNSP device. Use it to avoid command errors and build accurate configurations based on existing settings.
Instructions
获取设备当前运行配置(display current-configuration)。
这是配置前必须做的探查步骤。eNSP 不同镜像 / VRP 版本支持的命令集并不一致,
直接套用记忆中的命令很可能报错(Error: Unrecognized command)。正确做法是:
先用 :func:
ensp_get_device_info拿到型号与 VRP 版本;再用本工具拿到设备 已有的 配置(已存在的接口 IP、VLAN、路由、特性开关等);
基于这两份真实信息生成配置命令,而非凭空猜测;
下发后用 :func:
ensp_send_command的errored回显 / :func:ensp_verify_interfaces等校验,失败则据设备反馈修正。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||