File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,14 @@ def _os_version(request):
163163 ssh = request .getfixturevalue (f"{ name } _ssh" )
164164 assert ssh .cli_flavor in {"eos" , "mos" }
165165 output = ssh .sendcmd ("show version" , timeout = 300 )
166- matcher = re .search (r"Software image version: (\S*)" , output )
166+ if ssh .cli_flavor == "mos" :
167+ matcher = re .search (r"Software image version: (\S*)" , output )
168+ else :
169+ # On release SWIs the "Sofware image version" only contains the version, e.g.
170+ # Software image version: 4.31.0F
171+ # Architecture: x86_64
172+ # Internal build version: 4.31.0F-33797590.4310F
173+ matcher = re .search (r"Internal build version: (\S*)" , output )
167174 logging .info ("Got OS version: %s" , matcher .group (1 ))
168175 yield matcher .group (1 )
169176
You can’t perform that action at this time.
0 commit comments