Skip to content

Commit 9226cb1

Browse files
authored
Merge pull request #198 from CiscoTestAutomation/release_25.10
Release 25.10
2 parents 8fb2e5b + 3f69e12 commit 9226cb1

File tree

320 files changed

+16125
-7641
lines changed

Some content is hidden

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

320 files changed

+16125
-7641
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ RELATED_PKGS += genie.libs.filetransferutils
4848
# Adding pyasyncore pkg to fix pysnmp scripts for python 3.12
4949
DEPENDENCIES = restview psutil Sphinx wheel asynctest 'pysnmp>=6.1.4,<6.2' pyasn1==0.6.0
5050
DEPENDENCIES += sphinx-rtd-theme==1.1.0 pyftpdlib tftpy\<0.8.1 robotframework
51-
DEPENDENCIES += Cython requests ruamel.yaml grpcio protobuf jinja2
51+
DEPENDENCIES += Cython requests ruamel.yaml grpcio protobuf jinja2 pyVmomi
5252
# Internal variables.
5353
# (note - build examples & templates last because it will fail uploading to pypi
5454
# due to duplicates, and we'll for now accept that error)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--------------------------------------------------------------------------------
2+
Fix
3+
--------------------------------------------------------------------------------
4+
5+
* iosxe
6+
* Modified configure_enable_aes_encryption API
7+
* Added support to handle Old Masteer key prompt.
8+
9+
* clean-pkg/stages
10+
* iosxe
11+
* Updated ping_gateway in ConfigureManagement stage to attempt ping multiple times
12+
* iosxe
13+
* Increased the default reload_wait from 30 seconds to 150 seconds to allow sufficient time to match the reload patterns.
14+
* iosxe
15+
* Updated install image logic to skip the "Check for previous uncommitted install operation" step when the show install active output has no packages to commit.
16+
17+
18+
--------------------------------------------------------------------------------
19+
New
20+
--------------------------------------------------------------------------------
21+
22+
* clean
23+
* IOSXE
24+
* Update clean install images to retry install image if there is not enough space after cleaning unprotected files.
25+
* IOSXE/cat9k
26+
* Delete clean install images logic for car9k stack devices to use the logic from IOSXE.
27+
28+
* iosxe
29+
* clean-pkg
30+
* Updated install image stage to collect debug logs on failure
31+
32+

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

Lines changed: 94 additions & 94 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.9"
11+
__version__ = "25.10"
1212
__author__ = 'Cisco Systems Inc.'
1313
1414
__copyright__ = 'Copyright (c) 2019, Cisco Systems Inc.'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ class StackMemberConfigException(CleanException):
66
"""
77
Exception for when all the member of stack device is configured
88
"""
9-
pass
9+
pass

pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/asr1k/tests/test_verify_running_image/mock_data/iosxe/mock_data.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,16 @@ execute1:
129129
130130
131131
Configuration register is 0x2102
132+
config term:
133+
new_state: configure
132134
prompt: "%N#"
133135

136+
configure:
137+
prompt: "%N(config)#"
138+
commands:
139+
end:
140+
new_state: execute1
141+
134142
do_you_want_to_remove1:
135143
preface:
136144
timing:

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

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import time
66
from datetime import datetime, timedelta
77

8-
98
from pyats.async_ import pcall
109

1110
from genie.abstract import Lookup
@@ -36,7 +35,6 @@
3635
# Logger
3736
log = logging.getLogger(__name__)
3837

39-
4038
class ChangeBootVariable(IOSXEChangeBootVariable):
4139
"""This stage configures boot variables of the device using the following steps:
4240
@@ -910,119 +908,3 @@ def check_start_up_config_variables(self, steps, device):
910908
except Exception as e:
911909
step.failed("Failed to check for debug config in rommon variables",
912910
from_exception=e)
913-
914-
def install_image(self, steps, device, images,
915-
install_timeout=INSTALL_TIMEOUT,
916-
save_system_config=SAVE_SYSTEM_CONFIG,
917-
reload_args=RELOAD_SERVICE_ARGS,
918-
issu=ISSU, stack_member_timeout=STACK_MEMBER_TIMEOUT,
919-
stack_member_interval=STACK_MEMBER_INTERVAL,
920-
skip_save_running_config=SKIP_SAVE_RUNNING_CONFIG,
921-
reload_wait=RELOAD_WAIT):
922-
# check if device is a stack device otherwise call the InstallImage for
923-
# iosxe devices.
924-
if hasattr(device, 'chassis_type') and device.chassis_type == 'stack':
925-
with steps.start(f"Installing image '{images[0]}'") as step:
926-
# create a new instance for stackutils which include some utility
927-
# apis for working with stack devices
928-
stack_utils = StackUtils()
929-
# get tredundancy info of the stack device
930-
stack_redundency_info = stack_utils.get_redundancy_details(device)
931-
number_of_stack_members = len(stack_redundency_info)
932-
# make sure device is do not manual boot
933-
device.api.configure_no_boot_manual()
934-
# write to memory
935-
device.api.execute_write_memory()
936-
937-
def _update_counter_for_member_config(spawn, context, session):
938-
""" Handles the number of apply configure message seen after install image """
939-
if not session.get("member_config"):
940-
session['member_config'] = 1
941-
spawn.log.debug(f"member config {session['member_config']}")
942-
else:
943-
session['member_config'] += 1
944-
spawn.log.debug(f"member config {session['member_config']}")
945-
if session['member_config'] == number_of_stack_members - 1:
946-
# this is raised when all the member are done for configuration
947-
raise StackMemberConfigException
948-
949-
def _failed_to_install_image(spawn):
950-
raise Exception
951-
952-
def _check_for_member_config(spawn, session):
953-
# check the session for member_config, if this is not the spawn of
954-
# active connection we will not see the member config in buffer so
955-
# we should get out of the dialog loop after seeing press return.
956-
if not session.get('member_config'):
957-
raise StackMemberConfigException
958-
959-
dialog = Dialog([
960-
Statement(pattern=r"Do you want to proceed\? \[y\/n\]",
961-
action='sendline(y)',
962-
loop_continue=True,
963-
continue_timer=False),
964-
Statement(pattern=r".*Applying config on Switch \d+.*\[DONE\]$",
965-
action= _update_counter_for_member_config,
966-
loop_continue=True,
967-
continue_timer=False),
968-
Statement(pattern=r".*FAILED:.*?",
969-
action=_failed_to_install_image,
970-
loop_continue=False,
971-
continue_timer=False),
972-
Statement(pattern=r'Press RETURN to get started.*',
973-
action=_check_for_member_config,
974-
loop_continue=True,
975-
continue_timer=False)
976-
])
977-
978-
install_cmd = 'install add file {} activate commit'
979-
if issu:
980-
install_cmd = 'install add file {} activate issu commit'
981-
982-
device.sendline(install_cmd.format(images[0]))
983-
984-
try:
985-
dialog.process(device.spawn,
986-
timeout = install_timeout,
987-
context=device.context)
988-
except StackMemberConfigException:
989-
log.debug("Expected exception continue with the stage")
990-
log.info('Waiting for buffer to settle down')
991-
post_reload_wait_time = reload_args.get('post_reload_wait', 15)
992-
post_reload_timeout = reload_args.get('post_reload_timeout', 60)
993-
start_time = current_time = datetime.now()
994-
timeout_time = timedelta(seconds=post_reload_timeout)
995-
settle_time = current_time = datetime.now()
996-
while (current_time - settle_time) < timeout_time:
997-
if buffer_settled(device.spawn, post_reload_wait_time):
998-
log.info('Buffer settled, accessing device..')
999-
break
1000-
current_time = datetime.now()
1001-
if (current_time - start_time) > timeout_time:
1002-
log.info('Time out, trying to access device..')
1003-
break
1004-
device.enable()
1005-
except Exception as e:
1006-
step.failed("Failed to install the image", from_exception=e)
1007-
1008-
# Check all the members are ready and then try to disconnect and connect to device.
1009-
if stack_utils.is_all_member_ready(device, stack_member_timeout, stack_member_interval):
1010-
log.info('Disconnecting and reconnecting')
1011-
device.disconnect()
1012-
device.connect()
1013-
else:
1014-
step.failed("Stack members are not ready")
1015-
1016-
image_mapping = self.history['InstallImage'].parameters.setdefault(
1017-
'image_mapping', {})
1018-
if hasattr(self, 'new_boot_var'):
1019-
image_mapping.update({images[0]: self.new_boot_var})
1020-
else:
1021-
# if device is not a stack device we all the install image for iosxe
1022-
super().install_image(steps, device, images,
1023-
save_system_config=save_system_config,
1024-
install_timeout=install_timeout,
1025-
reload_service_args=None,
1026-
issu=issu,
1027-
reload_wait=reload_wait
1028-
)

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

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)