Skip to content

Commit 4835c2e

Browse files
authored
Merge pull request #100 from CiscoTestAutomation/release_24.5
Releasing v24.5
2 parents 85e2791 + c361060 commit 4835c2e

File tree

17 files changed

+355
-12
lines changed

17 files changed

+355
-12
lines changed

docs/changelog/2024/may.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
May 2024
2+
==========
3+
4+
May 28 - Unicon v24.5
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.5
13+
``unicon``, v24.5
14+
15+
Install Instructions
16+
^^^^^^^^^^^^^^^^^^^^
17+
18+
.. code-block:: bash
19+
20+
bash$ pip install unicon.plugins
21+
bash$ pip install unicon
22+
23+
Upgrade Instructions
24+
^^^^^^^^^^^^^^^^^^^^
25+
26+
.. code-block:: bash
27+
28+
bash$ pip install --upgrade unicon.plugins
29+
bash$ pip install --upgrade unicon
30+
31+
Features and Bug Fixes:
32+
^^^^^^^^^^^^^^^^^^^^^^^
33+
34+
35+
36+
37+
Changelogs
38+
^^^^^^^^^^
39+
--------------------------------------------------------------------------------
40+
Fix
41+
--------------------------------------------------------------------------------
42+
43+
* playback
44+
* mock_helper
45+
* Added show version | include operating mode to list of recorded commands
46+
47+
48+
--------------------------------------------------------------------------------
49+
Fix
50+
--------------------------------------------------------------------------------
51+
52+
* iosxe
53+
* cat9k
54+
* Modified summary.py
55+
* Added reload_confirm_iosxe to reload_to_rommon_statement_list
56+
* Added post time
57+
* Added POST_SWITCHOVER_WAIT before enable
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+
2024/may
78
2024/april
89
2024/march
910
2024/february
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
May 2024
2+
==========
3+
4+
May 28 - Unicon.Plugins v24.5
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.5
13+
``unicon``, v24.5
14+
15+
Install Instructions
16+
^^^^^^^^^^^^^^^^^^^^
17+
18+
.. code-block:: bash
19+
20+
bash$ pip install unicon.plugins
21+
bash$ pip install unicon
22+
23+
Upgrade Instructions
24+
^^^^^^^^^^^^^^^^^^^^
25+
26+
.. code-block:: bash
27+
28+
bash$ pip install --upgrade unicon.plugins
29+
bash$ pip install --upgrade unicon
30+
31+
Features and Bug Fixes:
32+
^^^^^^^^^^^^^^^^^^^^^^^
33+
34+
35+
36+
37+
Changelogs
38+
^^^^^^^^^^
39+
--------------------------------------------------------------------------------
40+
Fix
41+
--------------------------------------------------------------------------------
42+
43+
* sros
44+
* Updated mdcli regex prompt to accommodate various output
45+
46+
* iosxe
47+
* CAT9K
48+
* Updated regex in Rommon service
49+
* Modified learn_tokens to go to enable mode before sending stop PnP disovery
50+
51+

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+
2024/may
78
2024/april
89
2024/march
910
2024/february

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__ = '24.4'
1+
__version__ = '24.5'
22

33
supported_chassis = [
44
'single_rp',

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ def call_service(self, command=None,
115115
timeout=con.connection_timeout,
116116
context=self.context
117117
)
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+
118122
con.spawn.sendline()
119123
con.state_machine.go_to(
120124
'enable',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ def pre_service(self, *args, **kwargs):
125125
con.spawn,
126126
context=self.context)
127127
boot_info = con.execute('show boot')
128-
m = re.search(r'Enable Break = (yes|no)|ENABLE_BREAK variable (= yes|does not exist)', boot_info)
128+
m = re.search(r'Enable Break = (yes|no|0|1)|ENABLE_BREAK variable (= yes|does not exist)', boot_info)
129129
if m:
130130
break_enabled = m.group()
131-
if 'yes' not in break_enabled:
131+
if all(i not in break_enabled for i in ['yes', '1']):
132132
con.configure('boot enable-break')
133133
else:
134134
raise SubCommandFailure('Could not determine if break is enabled, cannot transition to rommon')

src/unicon/plugins/iosxe/cat9k/statements.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
from unicon.eal.dialogs import Statement
33
from unicon.plugins.generic.service_statements import (
4-
save_env, confirm_reset, reload_confirm, reload_confirm_ios)
4+
save_env, confirm_reset, reload_confirm, reload_confirm_ios, reload_confirm_iosxe)
55

66
from .patterns import IosXECat9kPatterns
77

@@ -20,4 +20,5 @@
2020
confirm_reset,
2121
reload_confirm,
2222
reload_confirm_ios,
23+
reload_confirm_iosxe,
2324
boot_interrupt_stmt]

src/unicon/plugins/iosxe/connection_provider.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ def learn_tokens(self):
4747
GenericPatterns().learn_os_prompt)
4848
con.state_machine.add_state(self.learn_tokens_state)
4949

50+
# Change to enable state before sending stop PnP disovery
51+
con.state_machine.go_to('enable',
52+
con.spawn,
53+
context=con.context,
54+
timeout=con.connection_timeout,
55+
prompt_recovery=con.prompt_recovery)
56+
5057
# The first thing we need to is to send stop PnP discovery otherwise device will not execute any command.
5158
con.spawn.sendline('pnpa service discovery stop')
5259
# The device may reload after the command we get the dialog statements from reload service and try to handle that

src/unicon/plugins/iosxr/spitfire/service_implementation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ def call_service(self,
312312
line_type = line_type[1]
313313

314314
if reload_creds:
315-
context = self.context.copy()
315+
context = con.active.context.copy()
316316
context.update(cred_list=reload_creds)
317317
else:
318-
context = self.context
318+
context = con.active.context
319319

320320
if line_type != 'Console':
321321
raise Exception("Console is not used.")

0 commit comments

Comments
 (0)