Skip to content

Commit 8fb2e5b

Browse files
authored
Merge pull request #195 from CiscoTestAutomation/release_25.9
Release 25.9
2 parents c02323b + e956928 commit 8fb2e5b

File tree

170 files changed

+3832
-798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+3832
-798
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--------------------------------------------------------------------------------
2+
Fix
3+
--------------------------------------------------------------------------------
4+
5+
* stages/iosxe
6+
* connect
7+
* Added optional logout argument (default True) to accommodate various scenarios.
8+
9+
* iosxe
10+
* Modified InstallImage
11+
* Added logic to handle ISSU in progress scenario.
12+
* Fixed the logic of InstallRemoveSmu stage and added support to handle uncommitted SMU images
13+
14+
* clean
15+
* IOSXE/cat9k
16+
* Update clean install images to use execute service and pass install timeout.
17+
* IOSXE/cat9k
18+
* Update clean install images to do configure no boot manual on the device.
19+
20+
* iosxe/cat9k/install_image
21+
* Added 'rommon_vars' to install_image stage to support setting rommon variables when booting an image in rommon mode.
22+
23+
* iosxe/install_image
24+
* add image_to_boot to install image
25+
26+
* clean-pkg
27+
* Fix syntax warning
28+
* Added support for matching interfaces by alias in ConfigureInterfaces.
29+
30+
* iosxe/connect
31+
* Removed duplicate configure boot manual in connect stage.
32+
33+

pkgs/clean-pkg/sdk_generator/output/github_clean.json

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

pkgs/clean-pkg/src/genie/libs/clean/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
'''
99

1010
# metadata
11-
__version__ = "25.8"
11+
__version__ = "25.9"
1212
__author__ = 'Cisco Systems Inc.'
1313
1414
__copyright__ = 'Copyright (c) 2019, Cisco Systems Inc.'

pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/stages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def install_image(self, steps, device, images, save_system_config=SAVE_SYSTEM_CO
9797
loop_continue=True,
9898
continue_timer=False),
9999

100-
Statement(pattern='Press RETURN to get started.*',
100+
Statement(pattern=r'Press RETURN to get started.*',
101101
action='sendline()',
102102
args=None,
103103
loop_continue=False,

pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,10 @@ class InstallImage(IOSXEInstallImage):
809809
810810
post_reload_timeout(int, optional): maximum time before accessing the device after
811811
reload. Default to 60 seconds.
812+
813+
rommon_vars (dict, optional): Dictionary of rommon variables to set during
814+
the reload process. Default: {"DEBUG_CONF": ""}
815+
812816
<Key>: <Value>
813817
Any other arguments that the Unicon reload service supports
814818
@@ -834,7 +838,10 @@ class InstallImage(IOSXEInstallImage):
834838
'prompt_recovery': True,
835839
'error_pattern': [r"FAILED:.*?$",],
836840
'post_reload_wait': 15,
837-
'post_reload_timeout': 60
841+
'post_reload_timeout': 60,
842+
"rommon_vars": {
843+
"DEBUG_CONF": ""
844+
}
838845
}
839846
ISSU = False
840847
SKIP_BOOT_VARIABLE = False
@@ -866,6 +873,7 @@ class InstallImage(IOSXEInstallImage):
866873
Optional('error_pattern'): list,
867874
Optional('post_reload_wait'): int,
868875
Optional('post_reload_timeout'):int,
876+
Optional('rommon_vars'): dict,
869877
Any(): Any()
870878
}
871879
}
@@ -874,16 +882,35 @@ class InstallImage(IOSXEInstallImage):
874882
# Execution order of Stage steps
875883
# ==============================
876884
exec_order = [
885+
'configure_no_boot_manual',
877886
'delete_boot_variable',
878887
'set_boot_variable',
879888
'configure_and_verify_startup_config',
880889
'save_running_config',
881890
'verify_boot_variable',
891+
'check_start_up_config_variables',
882892
'verify_running_image',
883893
'install_image'
884894
]
885895

886896

897+
def check_start_up_config_variables(self, steps, device):
898+
""" Check if debug config is set in rommon variables
899+
"""
900+
with steps.start("Check for debug config in rommon variables") as step:
901+
cmd = 'show romvar'
902+
try:
903+
output = device.parse(cmd)
904+
if debug_conf:=output.get('rommon_variables', {}).get('debug_conf'):
905+
log.info(f"DEBUG_CONF {debug_conf} is set in rommon variables")
906+
self.image_to_boot = "bootflash:packages.conf"
907+
else:
908+
self.image_to_boot = None
909+
log.info("DEBUG_CONF is not set in rommon variables")
910+
except Exception as e:
911+
step.failed("Failed to check for debug config in rommon variables",
912+
from_exception=e)
913+
887914
def install_image(self, steps, device, images,
888915
install_timeout=INSTALL_TIMEOUT,
889916
save_system_config=SAVE_SYSTEM_CONFIG,
@@ -948,11 +975,12 @@ def _check_for_member_config(spawn, session):
948975
continue_timer=False)
949976
])
950977

978+
install_cmd = 'install add file {} activate commit'
951979
if issu:
952-
device.sendline('install add file {} activate issu commit'.format(images[0]))
953-
else:
954-
device.sendline('install add file {} activate commit'.format(images[0]))
980+
install_cmd = 'install add file {} activate issu commit'
955981

982+
device.sendline(install_cmd.format(images[0]))
983+
956984
try:
957985
dialog.process(device.spawn,
958986
timeout = install_timeout,

pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/tests/test_install_image.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ def test_iosxe_install_image_skip(self):
5353
"genie.libs.clean.stages.iosxe.cat9k.stages.Dialog.process") as dialog_mock:
5454
dialog_mock.side_effect = Exception
5555
cls.install_image(steps=steps, device=device, images=['sftp://server/image.bin'])
56-
self.assertEqual(Failed, steps.details[0].result)
57-
56+
self.assertEqual(Failed, steps.details[0].result)

0 commit comments

Comments
 (0)