Skip to content

Commit 77047c3

Browse files
committed
Releasing v24.2
1 parent e07178f commit 77047c3

File tree

15 files changed

+331
-121
lines changed

15 files changed

+331
-121
lines changed

docs/changelog/2024/february.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
February 2024
2+
==========
3+
4+
February 27 - Unicon v24.2
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.2
13+
``unicon``, v24.2
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+
* connection_provider
44+
* Updated try/except to log error message as warning
45+
46+
* unicon.eal
47+
* Add EOF handler for connection errors with telnet backend
48+
49+
* sshutils
50+
* Add a new pattern for add tunnel
51+
52+
53+
--------------------------------------------------------------------------------
54+
New
55+
--------------------------------------------------------------------------------
56+
57+
* utils
58+
* AbstractTokenDiscovey
59+
* Update the logic so the paltform set to sdwan if device is in controller mode.
60+
61+

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/february
78
2024/january
89
2023/november
910
2023/october
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
February 2024
2+
==========
3+
4+
February 27 - Unicon.Plugins v24.2
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v24.2
13+
``unicon``, v24.2
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+
* generic
44+
* Add EOF statement to handle connection loss when using telnet backend
45+
46+
* iosxe
47+
* Added below config error patterns
48+
* % Invalid address
49+
* % Deletion of RD in progress; wait for it to complete
50+
51+
52+
--------------------------------------------------------------------------------
53+
Add
54+
--------------------------------------------------------------------------------
55+
56+
* utils
57+
* Update assertRegexpMatches to assertRegex to fix attribute error in python 3.12
58+
59+

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/february
78
2024/january
89
2023/november
910
2023/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__ = '24.1'
1+
__version__ = '24.2'
22

33
supported_chassis = [
44
'single_rp',

src/unicon/plugins/generic/patterns.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ def __init__(self):
2323
""" initialises all generic patterns
2424
"""
2525
super().__init__()
26+
# self.enable_prompt = r'.*%N#\s?$'
2627
self.default_hostname_pattern = r'WLC|RouterRP|Router|[Ss]witch|Controller|ios'
2728

2829
self.enable_prompt = r'^(.*?)(Router|Router-stby|Router-sdby|RouterRP|RouterRP-standby|%N-standby|%N\(standby\)|%N-sdby|%N-stby|(S|s)witch|(S|s)witch\(standby\)|Controller|ios|-Slot[0-9]+|%N)(\(boot\))*#\s?$'
2930

31+
# self.disable_prompt = r'.*%N>\s?$'
3032
self.disable_prompt = r'^(.*?)(Router|Router-stby|Router-sdby|RouterRP|RouterRP-standby|%N-standby|%N-sdby|%N-stby|(S|s)witch|s(S|s)witch\(standby\)|Controller|ios|-Slot[0-9]+|%N)(\(boot\))*>\s?$'
3133

34+
# self.config_prompt = r'.*%N\(config.*\)#\s?$'
3235
self.config_prompt = r'^(.*)\(.*(con|cfg|ipsec-profile|ca-trustpoint|gkm-local-server)\S*\)#\s?$'
3336
self.rommon_prompt = r'^(.*?)(rommon[\s\d]*>|switch:)\s?$'
3437
# self.standby_enable_prompt = r'^(.*?)(RouterRP-standby|%N-standby|%N-sdby|%N\(standby\))#\s?$'
@@ -68,7 +71,7 @@ def __init__(self):
6871

6972
self.config_locked = r'Configuration (mode )?(is )?locked|Config mode cannot be entered'
7073

71-
self.config_start = r'\nEnter configuration commands, one per line\.\s+End with CNTL/Z\.\s*$'
74+
self.config_start = r'Enter configuration commands, one per line\.\s+End with CNTL/Z\.\s*$'
7275

7376
self.enable_secret = r'^.*?(Enter|Confirm) enable secret:\s*$'
7477

src/unicon/plugins/generic/service_statements.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ def config_session_locked_handler(context):
337337
loop_continue=False,
338338
continue_timer=False)
339339

340+
eof_statement = Statement(pattern='__eof__',
341+
action=connection_closed_handler,
342+
args=None,
343+
loop_continue=False,
344+
continue_timer=False)
345+
340346
reload_statement_list = [save_env, confirm_reset, reload_confirm,
341347
reload_confirm_ios, reload_confirm_iosxe, useracess,
342348
confirm_config, setup_dialog, auto_install_dialog,
@@ -348,7 +354,7 @@ def config_session_locked_handler(context):
348354
generic_statements.syslog_msg_stmt,
349355
# Below statements have loop_continue=False
350356
password_stmt, press_enter, press_return,
351-
connection_closed_stmt
357+
connection_closed_stmt, eof_statement
352358
]
353359

354360
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#

src/unicon/plugins/generic/settings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,11 @@ def __init__(self):
7070
self.BOOT_FILESYSTEM = 'bootflash:'
7171
self.BOOT_FILE_REGEX = r'(\S+\.bin)'
7272

73-
# Time to wait for the config prompt to appear
74-
self.CONFIG_TRANSITION_WAIT = 15
73+
# Wait for the config prompt to appear
74+
# before checking for the config prompt.
75+
# This may need to be adjusted if the RTT between
76+
# the execution host and lab device is high.
77+
self.CONFIG_TRANSITION_WAIT = 0.2
7578

7679
# If learn_hostname is requested but no hostname was actually learned,
7780
# substitute this default hostname when occurances of HOSTNAME_SUBST_PAT

src/unicon/plugins/iosxe/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self):
2020
r'% Unknown command or computer name, or unable to find computer address'
2121
]
2222
self.CONFIGURE_ERROR_PATTERN = [
23-
r'^%\s*[Ii]nvalid (command|input|number)',
23+
r'^%\s*[Ii]nvalid (command|input|number|address)',
2424
r'routing table \S+ does not exist',
2525
r'^%\s*SR feature is not configured yet, please enable Segment-routing first.',
2626
r'^%\s*\S+ overlaps with \S+',
@@ -31,7 +31,8 @@ def __init__(self):
3131
r'% Specify remote-as or peer-group commands first',
3232
r'% Policy commands not allowed without an address family',
3333
r'% Color set already. Deconfigure first',
34-
r'Invalid policy name, \S+ does not exist'
34+
r'Invalid policy name, \S+ does not exist',
35+
r'% Deletion of RD in progress; wait for it to complete'
3536
]
3637

3738
self.EXECUTE_MATCHED_RETRIES = 1

src/unicon/plugins/nxos/service_patterns.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ class HaNxosReloadPatterns:
2222
# NXOS reload pattern
2323
def __init__(self):
2424
self.reboot = r'(.*?)This command will reboot the system. \(y\/n\)\? \[n\]'
25-
self.secure_password = r'^.*Do you want to enforce secure password standard \(yes\/no\) \[y\]\:'
26-
self.auto_provision = r'Abort( Power On)? Auto Provisioning and continue with normal setup \?\(yes\/no\)\[n\]\:'
27-
self.enable_vdc = r'Do you want to enable admin vdc\s?\(yes\/no\)\s?\[n\]\:'
28-
self.admin_password = r'^.*(Enter|Confirm) the password for .*admin'
29-
self.snmp_port = r'^.*Enable the SNMP port\? \(yes\/no\) \[y\]:'
30-
self.boot_vdc = r'^.*Boot up system with default vdc \(yes\/no\) \[y\]\:'
31-
self.reload_proceed = r'^(.*)Proceed with reload\? \[confirm\]$'
32-
self.loader_prompt = r'^(.*)loader\s*>'
33-
self.redundant = r'^.*REDUNDANCY mode is (RPR|SSO).*'
34-
self.config_byte = r'Uncompressed configuration from [0-9]+ bytes to [0-9]+ bytes'
35-
self.login_notready = r'^.*is not ready or active for login.*'
36-
self.setup_dialog = r'^.*(initial|basic) configuration dialog.*\s?'
37-
self.autoinstall_dialog = r'^(.*)Would you like to terminate autoinstall\? ?\[yes\]: $'
38-
self.useracess = r'^.*User Access Verification'
39-
self.username = r'^.*([Uu]sername|[Ll]ogin): ?$'
40-
self.password = r'^.*[Pp]assword: ?$'
25+
self.secure_password = r'(.*?)Do you want to enforce secure password standard \(yes\/no\) \[y\]\:'
26+
self.auto_provision = r'(.*?)Abort( Power On)? Auto Provisioning and continue with normal setup \?\(yes\/no\)\[n\]\:'
27+
self.enable_vdc = r'(.*?)Do you want to enable admin vdc\s?\(yes\/no\)\s?\[n\]\:'
28+
self.admin_password = r'^(.*?)(Enter|Confirm) the password for .*admin'
29+
self.snmp_port = r'^(.*?)Enable the SNMP port\? \(yes\/no\) \[y\]:'
30+
self.boot_vdc = r'^(.*?)Boot up system with default vdc \(yes\/no\) \[y\]\:'
31+
self.reload_proceed = r'^(.*?)Proceed with reload\? \[confirm\]$'
32+
self.loader_prompt = r'^(.*?)loader\s*>'
33+
self.redundant = r'^(.*?)REDUNDANCY mode is (RPR|SSO).*'
34+
self.config_byte = r'^(.*?)Uncompressed configuration from [0-9]+ bytes to [0-9]+ bytes'
35+
self.login_notready = r'^(.*?)is not ready or active for login.*'
36+
self.setup_dialog = r'^(.*?)(initial|basic) configuration dialog.*\s?'
37+
self.autoinstall_dialog = r'^(.*?)Would you like to terminate autoinstall\? ?\[yes\]: $'
38+
self.useracess = r'^(.*?)User Access Verification'
39+
self.username = r'^(.*?)([Uu]sername|[Ll]ogin): ?$'
40+
self.password = r'^(.*?)[Pp]assword: ?$'
4141
self.run_init = r' Entering runlevel'
42-
self.system_up = r'System is coming up ... Please wait'
43-
self.skip_poap = r'^.*System is not fully online. Skip POAP\? \(yes\/no\)\[n\]:\s*$'
42+
self.system_up = r'^(.*?)System is coming up ... Please wait'
43+
self.skip_poap = r'^(.*?)System is not fully online. Skip POAP\? \(yes\/no\)\[n\]:\s*$'

0 commit comments

Comments
 (0)