Skip to content

Commit 908f1ab

Browse files
authored
Merge pull request #122 from CiscoTestAutomation/release_26.2
Releasing v26.2
2 parents 7d6f1b2 + cd4a32a commit 908f1ab

19 files changed

Lines changed: 247 additions & 36 deletions

docs/changelog/2026/february.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
February 2026
2+
==========
3+
4+
February 24 - Unicon v26.2
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v26.2
13+
``unicon``, v26.2
14+
15+
16+
17+
18+
Changelogs
19+
^^^^^^^^^^
20+
--------------------------------------------------------------------------------
21+
Fix
22+
--------------------------------------------------------------------------------
23+
24+
* mock_device
25+
* Fix asyncio deprecation warning for python 3.14
26+
27+
* routers.connection_provider
28+
* Added logic to merge settings dict instead of replacing Settings object
29+
* When settings dict is passed to connect(), it now properly updates existing Settings object using update() method
30+
31+
32+
--------------------------------------------------------------------------------
33+
Fix
34+
--------------------------------------------------------------------------------
35+
36+
* stackwisevirtualconnectionprovider
37+
* Avoid traceback on empty 'show switch' output
38+
39+
* unicon.plugin/cat8k
40+
* Modified the Switchover implementaion of cat8k to connect post switchover
41+
* This is to avoid any prompt mismatch issues post switchover
42+
43+
* generic/statements
44+
* Modified terminal_position_handler
45+
* Changed terminal position response to \x1b[0;0R
46+
47+
* generic/service_pattern
48+
* Modified ping verbose regex patterns for verbose prompts to correctly match the prompt.
49+
50+
51+
--------------------------------------------------------------------------------
52+
New
53+
--------------------------------------------------------------------------------
54+
55+
* linux
56+
* Modified LinuxPatterns
57+
* Add support for linux prompt (server.cisco.com)~
58+
59+

docs/changelog/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
.. toctree::
55
:maxdepth: 2
66

7+
2026/february
78
2026/january
89
2025/december
910
2025/october
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
February 2026
2+
==========
3+
4+
February 24 - Unicon.Plugins v26.2
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v26.2
13+
``unicon``, v26.2
14+
15+
16+
17+
18+
Changelogs
19+
^^^^^^^^^^
20+
--------------------------------------------------------------------------------
21+
Fix
22+
--------------------------------------------------------------------------------
23+
24+
* generic
25+
* fix for 3.14 runtime emits extra terminal/argparse warnings
26+
* Update PID tokens for C8000V
27+
28+
* iosxe/cat9k/stackwise_virtual
29+
* Added support to handle standby unlocked in designate handles
30+
* Fix the designate handle to wait for the boot process to complete before designating handles.
31+
32+

docs/changelog_plugins/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Plugins Changelog
44
.. toctree::
55
:maxdepth: 2
66

7+
2026/february
78
2026/january
89
2025/december
910
2025/october

src/unicon/plugins/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "26.1"
1+
__version__ = "26.2"
22

33
supported_chassis = [
44
'single_rp',

src/unicon/plugins/generic/service_patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self):
6464
self.tunnel = r'^.*Tunnel interface number \[.+\]\s?: $'
6565
self.repeat = r'^.*Repeat count \[.+\]\s?: $'
6666
self.size = r'^.*Datagram size \[.+\]\s?: $'
67-
self.verbose = r'^.*Verbose \[.+\]\s?: $'
67+
self.verbose = r'^.*Verbose(\?)? \[.+\]\s?: $'
6868
self.interval = r'^.*Interval in milliseconds \[.+\]: $'
6969
self.packet_timeout = r'^.*Timeout in seconds \[.+\]\s?: $'
7070
self.sending_interval = r'^.*Sending interval in seconds \[.+\]\s?: $'

src/unicon/plugins/generic/statements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def terminal_position_handler(spawn, session, context):
4242
""" send terminal position (VT100) """
43-
spawn.send('\x1b[0;200R')
43+
spawn.send('\x1b[0;0R')
4444

4545

4646
def connection_refused_handler(spawn, context):

src/unicon/plugins/iosxe/cat8k/service_implementation.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,8 @@ def call_service(self, command=None,
108108
sleep(con.settings.POST_SWITCHOVER_WAIT)
109109

110110
con.spawn.sendline()
111-
con.state_machine.go_to(
112-
'any',
113-
con.spawn,
114-
prompt_recovery=self.prompt_recovery,
115-
timeout=con.connection_timeout,
116-
context=self.context
117-
)
118-
119-
con.log.info(f'Waiting {con.settings.POST_SWITCHOVER_WAIT} seconds before going to enable mode')
120-
sleep(con.settings.POST_SWITCHOVER_WAIT)
121-
122-
con.spawn.sendline()
123-
con.state_machine.go_to(
124-
'enable',
125-
con.spawn,
126-
prompt_recovery=self.prompt_recovery,
127-
context=self.context
128-
)
111+
112+
con.connection_provider.connect()
129113
self.result = True
130114

131115
if not sync_standby:

src/unicon/plugins/iosxe/cat8k/service_statements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
continue_timer=True)
3030

3131
switchover_complete = Statement(pattern=pat.switchover_complete,
32-
action='sendline()',
32+
action=None,
3333
loop_continue=False,
3434
continue_timer=False)
3535

src/unicon/plugins/iosxe/cat9k/stackwise_virtual/connection_provider.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
pyATS TEAM (pyats-support@cisco.com, pyats-support-ext@cisco.com)
44
"""
55
import re
6-
from unicon.eal.dialogs import Dialog
6+
7+
from unicon.eal.dialogs import Dialog, Statement
78
from unicon.bases.routers.connection_provider import BaseStackRpConnectionProvider
89

10+
from genie.metaparser.util.exceptions import SchemaEmptyParserError
11+
912
from unicon.plugins.generic.statements import connection_statement_list, custom_auth_statements
1013

14+
1115
class StackwiseVirtualConnectionProvider(BaseStackRpConnectionProvider):
1216
""" Implements Stack Connection Provider,
1317
This class overrides the base class with the
@@ -36,12 +40,23 @@ def designate_handles(self):
3640
other_alias = None
3741

3842
# Try to go to enable mode on both connections
43+
standby_locked_dialog = Dialog([
44+
Statement(
45+
pattern=r'.*Standby console disabled.*',
46+
action=None,
47+
loop_continue=False,
48+
continue_timer=False,
49+
)
50+
])
51+
3952
for subcon in [subcon1, subcon2]:
4053
try:
4154
subcon.state_machine.go_to(
4255
'enable',
4356
subcon.spawn,
4457
context=subcon.context,
58+
timeout=con.settings.BOOT_TIMEOUT,
59+
dialog=standby_locked_dialog,
4560
)
4661
except Exception:
4762
pass
@@ -63,7 +78,11 @@ def designate_handles(self):
6378
device = con.device
6479
try:
6580
# To check if the device is in SVL state
66-
output = device.parse("show switch")
81+
try:
82+
output = device.parse("show switch")
83+
except SchemaEmptyParserError:
84+
con.log.debug("show switch returned empty output")
85+
output = {}
6786
stack_info = output.get("switch", {}).get("stack", {})
6887
roles = [switch_info.get("role") for switch_info in stack_info.values()]
6988

0 commit comments

Comments
 (0)