Skip to content

Commit f31a0d9

Browse files
authored
Merge pull request #106 from CiscoTestAutomation/release_24.11
Releasing v24.11
2 parents bb8271e + 9951e78 commit f31a0d9

File tree

21 files changed

+558
-65
lines changed

21 files changed

+558
-65
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ develop:
8484
@echo ""
8585
@pip uninstall -y $(PKG_NAME)
8686
@pip install $(DEPENDENCIES)
87-
@$(PYTHON) setup.py develop --no-deps
87+
@pip install -e . --no-deps
8888
@echo ""
8989
@echo "Completed building and installing: $@"
9090
@echo ""
@@ -97,7 +97,7 @@ undevelop:
9797
@echo "Uninstalling $(PKG_NAME) development distributable: $@"
9898
@echo ""
9999

100-
@$(PYTHON) setup.py develop --no-deps -q --uninstall
100+
@pip uninstall $(PKG_NAME) -y
101101

102102
@echo ""
103103
@echo "Completed uninstalling: $@"

docs/changelog/2024/november.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
November 2024
2+
==========
3+
4+
November 26 - Unicon v24.11
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.11
13+
``unicon``, v24.11
14+
15+
16+
17+
18+
Changelogs
19+
^^^^^^^^^^
20+
--------------------------------------------------------------------------------
21+
Fix
22+
--------------------------------------------------------------------------------
23+
24+
* unicon/bases
25+
* Router/connection_provider
26+
* Updated designate_handles to not change state of standby if it is locked.
27+
* Added quad device specific unlock_standby method to execute configs only on Active console
28+
29+

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/november
78
2024/october
89
2024/September
910
2024/august
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
November 2024
2+
==========
3+
4+
November 26 - Unicon.Plugins v24.11
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.11
13+
``unicon``, v24.11
14+
15+
16+
17+
18+
Changelogs
19+
^^^^^^^^^^
20+
--------------------------------------------------------------------------------
21+
Fix
22+
--------------------------------------------------------------------------------
23+
24+
* iosxe
25+
* Added UT for Quad device to test scenario when standby console is disabled
26+
27+
* iosxr
28+
* SPITFIRE plugin
29+
* Added UNICON_BACKEND_DECODE_ERROR_LIMIT with a default value of 10, to handle scenarios when the device is slow
30+
31+
* hvrp
32+
* Update config pattern
33+
* Update configure service to handle immediate vs two-stage config mode
34+
35+
* nxos
36+
* modify regex to handle new error pattern for NXOS
37+
38+
* generic
39+
* Modified enable_secret regex pattern to accommodate various outputs
40+
* Updated password_handler to pass password if password key in context dict
41+
42+
43+
--------------------------------------------------------------------------------
44+
Add
45+
--------------------------------------------------------------------------------
46+
47+
* iosxe
48+
* Update prompt recovery command
49+
50+

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/november
78
2024/october
89
2024/September
910
2024/august

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.10'
1+
__version__ = '24.11'
22

33
supported_chassis = [
44
'single_rp',

src/unicon/plugins/generic/patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self):
7373

7474
self.config_start = r'Enter configuration commands, one per line\.\s+End with CNTL/Z\.\s*$'
7575

76-
self.enable_secret = r'^.*?(Enter|Confirm) enable secret:\s*$'
76+
self.enable_secret = r'^.*?(Enter|Confirm) enable secret( \[<Use current secret>\])?:\s*$'
7777
self.enable_password = r'^.*?enable[\r\n]*.*?[Pp]assword( for )?(\S+)?: ?$'
7878

7979
self.enter_your_selection_2 = r'^.*?Enter your selection( \[2])?:\s*$'

src/unicon/plugins/generic/statements.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ def password_handler(spawn, context, session):
368368
if context.get('username', '') == spawn.last_sent.rstrip() or ssh_tacacs_handler(spawn, context):
369369
if (tacacs_password := context.get('tacacs_password')):
370370
spawn.sendline(tacacs_password)
371+
elif context.get('password'):
372+
spawn.sendline(context['password'])
371373
else:
372374
spawn.sendline(context['line_password'])
373375

src/unicon/plugins/hvrp/patterns.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ def __init__(self):
2121
self.username = r'^.*[Ll]ogin:'
2222
self.password = r'^.*[Pp]assword:'
2323

24-
# <HOSTNAME-01> | <HOSTNAME>#
24+
# <HOSTNAME>
2525
self.enable_prompt = r'^(.*)\<%N.*\>$'
2626

27-
28-
# [~HOSTNAME] | <HOSTNAME-01> # # breaks on [\y\n] # Warning: All the configuration will be saved to the next startup configuration. Continue? [y/n]:
29-
self.config_prompt = r'^.*\[(~|\*)%N.*\]'
27+
# [~HOSTNAME] # two-stage config mode
28+
# [HOSTNAME] # immediate config mode
29+
self.config_prompt = r'^.*\[(?P<two_stage>~|\*)?%N.*\]'
3030

3131
# Exit with uncommitted changes? [yes,no] (yes)
3232
self.commit_changes_prompt = r'Exit with uncommitted changes? [yes,no] (yes)\s*'

src/unicon/plugins/hvrp/service_implementation.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ def __init__(self, connection, context, **kwargs):
2222
self.start_state = 'config'
2323
self.end_state = 'enable'
2424
self.service_name = 'config'
25-
self.commit_cmd = 'commit'
25+
26+
def pre_service(self, *args, **kwargs):
27+
super().pre_service(*args, **kwargs)
28+
29+
# Check if device is operating in two-stage configuration mode.
30+
# =============================================================
31+
spawn = self.get_spawn()
32+
two_stage = spawn.match.last_match.groupdict().get('two_stage')
33+
34+
# In the two-stage mode, if the user has modified configurations but has
35+
# not submit the modification, the system prompt ~ is changed to *,
36+
# prompting the user that the configurations are not submitted. After
37+
# the user runs the commit command to submit the configurations, the
38+
# system prompt * is restored to ~.
39+
40+
if two_stage:
41+
self.commit_cmd = 'commit'
42+
else:
43+
self.commit_cmd = ''

0 commit comments

Comments
 (0)