Skip to content

Commit ee65274

Browse files
committed
Releasing v23.10
1 parent bb1becc commit ee65274

File tree

19 files changed

+514
-44
lines changed

19 files changed

+514
-44
lines changed

docs/changelog/2023/october.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
October 2023
2+
==========
3+
4+
October 31 - Unicon v23.10
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v23.10
13+
``unicon``, v23.10
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+
* unicon.eal.backend
44+
* Added telnetlib backend.
45+
* Set `<connection_object>.settings.BACKEND = "auto"` to use the new telnetlib backend.
46+
47+
* unicon.mock
48+
* Update mock_device_cli to work with telnetlib backend
49+
50+
* unicon.bases.connection
51+
* learn_hostname
52+
* skip hostname learning if the device is in bash shell.
53+
54+
* unicon.bases.routers
55+
* Modified BaseSingleRpConnectionProvider
56+
* Updated establish_connection method to update cred_list in context if login_creds is not None
57+
58+
59+
--------------------------------------------------------------------------------
60+
New
61+
--------------------------------------------------------------------------------
62+
63+
* unicon.adapters
64+
* updated topology
65+
* add fallback credentials to the context for each connection.
66+
* Update pattern for invalid password.
67+
68+
69+
--------------------------------------------------------------------------------
70+
Fix
71+
--------------------------------------------------------------------------------
72+
73+
* cheetah
74+
* ap
75+
* Added support for device reload.
76+
77+

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+
2023/october
78
2023/september
89
2023/august
910
2023/july
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
October 2023
2+
==========
3+
4+
October 31 - Unicon.Plugins v23.10
5+
------------------------
6+
7+
8+
9+
.. csv-table:: Module Versions
10+
:header: "Modules", "Versions"
11+
12+
``unicon.plugins``, v23.10
13+
``unicon``, v23.10
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+
* Empty sendline to get the prompt for go_to any state
45+
46+
* iosxe/cat9k
47+
* Updated container ssh prompt pattern
48+
49+
* nxos
50+
* Modified
51+
* Added alt_cred password lab2 in nxos_mock_data_n5k.yaml
52+
53+
54+
--------------------------------------------------------------------------------
55+
New
56+
--------------------------------------------------------------------------------
57+
58+
* generic
59+
* Adding fallback credentials for handling authentication failure.
60+
61+
* iosxe
62+
* Adding new password statement for setting up the password on the device after the device has booted in controller mode.
63+
64+

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+
2023/october
78
2023/september
89
2023/august
910
2023/july

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__ = '23.9'
1+
__version__ = '23.10'
22

33
supported_chassis = [
44
'single_rp',

src/unicon/plugins/cheetah/ap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self):
1919
self.expect = gsvc.Expect
2020
self.enable = gsvc.Enable
2121
self.disable = gsvc.Disable
22-
self.reload = gsvc.Reload
22+
self.reload = svc.Reload
2323
self.log_user = gsvc.LogUser
2424
self.bash_console = iosxe_svc.BashService
2525

src/unicon/plugins/cheetah/ap/service_implementation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
from unicon.plugins.generic.service_implementation import \
55
Execute as GenericExecute
6+
from unicon.plugins.generic.service_implementation import \
7+
Reload as GenericReload
68
from unicon.eal.dialogs import Dialog
79
from unicon.plugins.iosxe.service_statements import confirm
810

11+
from .service_statement import ap_reload_list
912

1013
class Execute(GenericExecute):
1114
def call_service(self, command=None, reply=Dialog([]), timeout=None, *args,
@@ -14,3 +17,8 @@ def call_service(self, command=None, reply=Dialog([]), timeout=None, *args,
1417
super().call_service(command,
1518
reply=reply + Dialog([confirm,]),
1619
timeout=timeout, *args, **kwargs)
20+
21+
class Reload(GenericReload):
22+
def __init__(self, connection, context, **kwargs):
23+
super().__init__(connection, context, **kwargs)
24+
self.dialog = self.dialog + Dialog(ap_reload_list)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""AP Reload Service Patterns"""
2+
3+
from unicon.plugins.generic.service_patterns import ReloadPatterns
4+
5+
class APReloadPatterns(ReloadPatterns):
6+
def __init__(self):
7+
super().__init__()
8+
self.ap_shell_prompt = r'^Proceed with reload (command (\W+cold\W)?)?(\?) (\[)+confirm+(\])$'
9+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"""
2+
Module:
3+
unicon.plugins.generic
4+
5+
Authors:
6+
7+
8+
Description:
9+
Module for defining all Services Statement, handlers(callback) and Statement
10+
list for service dialog would be defined here.
11+
"""
12+
13+
from time import sleep
14+
15+
from unicon.eal.dialogs import Statement
16+
from unicon.plugins.generic.statements import chatty_term_wait
17+
from .service_patterns import APReloadPatterns
18+
from unicon.plugins.generic.service_statements import reload_statement_list
19+
20+
pat = APReloadPatterns()
21+
22+
23+
def send_response(spawn, response=""):
24+
chatty_term_wait(spawn)
25+
spawn.sendline(response)
26+
27+
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
28+
# Reload Statements
29+
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
30+
31+
ap_shell_prompt = Statement(pattern=pat.ap_shell_prompt,
32+
action=send_response, args={'response': '\r'},
33+
loop_continue=True,
34+
continue_timer=False)
35+
36+
ap_reload_list = list(reload_statement_list)
37+
ap_reload_list.insert(0,ap_shell_prompt)
38+

src/unicon/plugins/generic/patterns.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ def __init__(self):
8383

8484
# VT100 patterns
8585
self.get_cursor_position = r'\x1b\[6n'
86+
87+
self.new_password = r'^(Enter new password|Confirm password):\s*$'

0 commit comments

Comments
 (0)