Fix interface naming and save command for BOSS v7.9.6
- Use FastEthernet {p} instead of GigabitEthernet {p} for interface commands
- Use save config instead of copy running-config nvram:config.cfg
https://claude.ai/code/session_01JR2EMK7rwrZJowpstcaxQ6
This commit is contained in:
+2
-2
@@ -393,7 +393,7 @@ def push_one_by_one(commands: list[str]) -> dict:
|
|||||||
_run_one(ch, "end")
|
_run_one(ch, "end")
|
||||||
saved = False
|
saved = False
|
||||||
if stopped_at is None:
|
if stopped_at is None:
|
||||||
_, save_err = _run_one(ch, "copy running-config nvram:config.cfg")
|
_, save_err = _run_one(ch, "save config")
|
||||||
saved = not save_err
|
saved = not save_err
|
||||||
if saved:
|
if saved:
|
||||||
log.info("Config saved to NVRAM")
|
log.info("Config saved to NVRAM")
|
||||||
@@ -607,7 +607,7 @@ def build_port(cfg: PortConfig) -> list[str]:
|
|||||||
Returns a list of CLI command strings ready for push_one_by_one().
|
Returns a list of CLI command strings ready for push_one_by_one().
|
||||||
"""
|
"""
|
||||||
p = cfg.port
|
p = cfg.port
|
||||||
iface = f"GigabitEthernet {p}"
|
iface = f"FastEthernet {p}"
|
||||||
cmds = []
|
cmds = []
|
||||||
if cfg.description:
|
if cfg.description:
|
||||||
cmds += [f"interface {iface}", f' name "{cfg.description}"']
|
cmds += [f"interface {iface}", f' name "{cfg.description}"']
|
||||||
|
|||||||
Reference in New Issue
Block a user