设为首页收藏本站language 语言切换
查看: 1457|回复: 7
收起左侧

[LAB战报] 4.14 CCIE EI LAB挂了 自动化部分58分 都不知道为什么分这么低

[复制链接]
发表于 2025-4-16 09:53:52 | 显示全部楼层 |阅读模式

" {$ U4 t  r; ~第五部分自动化得分58 我都蒙蔽了 现场lab环境R23进行现象测试 shutdown l10口 然后more /bootflash/guest-share/RCA_Capture.txt文件 可以看到show 命令输出
' }6 `/ x/ ?$ d; p/ Q我的代码如下:
! g$ [* }0 N! b! w+ a4 F$ w7 wimport cli
' u- U( n+ R  [9 d& f3 Iimport sys" a: D8 g0 w( Y9 v* D% f$ T
. o0 E' [  R/ E
int=sys.argv[1]+ i, ?6 M# R+ A- r9 s5 I
cmds=['show ip int brief','show ip ospf nei','show ip route','show int '+int,'show log']0 s$ i( ]+ F( x1 c
with open('/bootflash/guest-share/RCA_Capture.txt','w') as f:$ N6 T+ k' A; ^. `: m) p
  for cmd in cmds:6 @3 ]) v5 k/ W$ Y1 I1 e/ e
    a=cli.execute(cmd)
& F; r: u; V  L1 I, P    f.write(a)' G# b# d! V0 e) d0 Q1 v' b- |
可能我shutdown l10接口后more /bootflash/guest-share/RCA_Capture.txt文件 可以看到show 说明我eem python track app-host 配置块均没问题,难道和我l10接口shutdown后可能是未no shutdown有关 也可能是和我show命令没写完整命令导致的?(题目要求不能使用缩写)但这真会导致只给我58分?python后面那道改错题也做了 现象也出了 最后一题选择题也做了 现在是死都不知道自己怎么死的
发表于 2025-4-17 16:22:49 | 显示全部楼层
  NOTE: do not use abbreviated versions of the CLI commands.
  A/ l1 [& ~. Q7 Y3 |! r5 ?题目要求不能缩写
板凳 2025-4-17 16:22:49 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2025-4-29 15:36:53 | 显示全部楼层
int 是python内置的整数类型 不能用于设置变量 语法错误
地板 2025-4-29 15:36:53 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2025-4-29 15:38:33 | 显示全部楼层
本帖最后由 chashen 于 2025-4-29 15:48 编辑 . f" ?7 Q2 b* D8 j$ Q5 q

' y! F+ ]' h& [9 s$ ]Use of int as a variable name:/ s6 J9 P0 }' W0 I  y2 D  U
    int is a built-in Python type. Using it as a variable name can cause bugs or confusion.9 h$ D6 o4 n5 i& w2 V0 E" ~
    Fix: Rename it to something like interface.
5# 2025-4-29 15:38:33 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-26 01:25 , Processed in 0.081799 second(s), 25 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表