Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Adva drivers #3079

Merged
merged 14 commits into from
Jan 13, 2023
Merged

Updated Adva drivers #3079

merged 14 commits into from
Jan 13, 2023

Conversation

ktbyers
Copy link
Owner

@ktbyers ktbyers commented Jan 12, 2023

No description provided.

guychilton77 and others added 13 commits August 4, 2022 16:03
Added Adva F2 Device Driver
Added Adva F3 Device Driver
Updated ssh_dispatcher.py with Adva Drivers
Successfully ran unit Tests
Test Configuration not included in the branch but available for review
Created Tests specific for the Adva Devices
Create an issue with the ssh_dispatcher.py file by copying an older version
Restoring Current version with updated Adva Drivers
Updated Missing Type Hints in F2 and F3 Adva Driver Files
mypy tests were failing due to set_base_prompt method in the driver
file missing the parameters set in the baseconnection.py.

Fixed a bug with login without a banner prompt
Missing typehint in set_base_prompt method
Had an error in send_config_from_set method
Removed walrus operator from the set_base_prompt method
@ktbyers ktbyers changed the title Updated Adva drivers (pending) Updated Adva drivers Jan 13, 2023
@ktbyers
Copy link
Owner Author

ktbyers commented Jan 13, 2023

@guychilton77 Can you regression test this with your test device(s). Most of these items we covered in the other PR. I also fixed some mypy issues and made a few other things more consistent with typical/common Netmiko patterns.

@ktbyers
Copy link
Owner Author

ktbyers commented Jan 13, 2023

Note, I changed the device_type names to:

    "adva_fsp150f2": AdvaAosFsp150F2SSH,
    "adva_fsp150f3": AdvaAosFsp150F3SSH,

Format should be:

vendor_platform_transport

Where transport defaults to ssh automatically.

If there are better names for the platform field just let me know.

@ktbyers ktbyers mentioned this pull request Jan 13, 2023
@guychilton77
Copy link
Contributor

@ktbyers perfect thanks for your help and work on this. No issues with the device_type name changes, they look perfect. I'll try and get the regression testing done over the weekend or first thing Monday morning and will post up the results

@ktbyers
Copy link
Owner Author

ktbyers commented Jan 13, 2023

I am going to go ahead and merge this into develop and then we can do an additional PR if there are additional changes that are necessary.

@ktbyers ktbyers merged commit 372d986 into develop Jan 13, 2023
@guychilton77
Copy link
Contributor

@ktbyers Regression tests passed fine.

(net_reg_tests) [guych@spiderbaby test_adva]$ ./adva_tests.sh
Starting tests...good luck:
Adva F3
================================================================================================================================== test session starts ===================================================================================================================================
platform linux -- Python 3.9.7, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/guych/projects_python/netmiko, configfile: setup.cfg
plugins: cov-3.0.0, mock-3.6.1
collected 32 items

test_netmiko_show.py::test_disable_paging PASSED
test_netmiko_show.py::test_terminal_width PASSED
test_netmiko_show.py::test_ssh_connect PASSED
test_netmiko_show.py::test_ssh_connect_cm PASSED
test_netmiko_show.py::test_send_command_timing PASSED
test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED
test_netmiko_show.py::test_send_command PASSED
test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED
test_netmiko_show.py::test_complete_on_space_disabled SKIPPED
test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported on this platform)
test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform)
test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform)
test_netmiko_show.py::test_send_multiline_timing SKIPPED
test_netmiko_show.py::test_send_multiline_timing_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_prompt_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_simple_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_timing_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_prompt_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_simple_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline SKIPPED
test_netmiko_show.py::test_send_multiline_prompt SKIPPED
test_netmiko_show.py::test_send_multiline_simple SKIPPED
test_netmiko_show.py::test_base_prompt PASSED
test_netmiko_show.py::test_strip_prompt PASSED
test_netmiko_show.py::test_strip_command PASSED
test_netmiko_show.py::test_normalize_linefeeds PASSED
test_netmiko_show.py::test_clear_buffer PASSED
test_netmiko_show.py::test_enable_mode PASSED
test_netmiko_show.py::test_disconnect PASSED
test_netmiko_show.py::test_disconnect_no_enable SKIPPED

================================================================================================================================ short test summary info =================================================================================================================================
SKIPPED [1] test_netmiko_show.py:70: Skipped
SKIPPED [1] test_netmiko_show.py:88: Skipped
SKIPPED [1] test_netmiko_show.py:110: Skipped
SKIPPED [1] test_netmiko_show.py:131: TextFSM/ntc-templates not supported on this platform
SKIPPED [1] test_netmiko_show.py:153: TTP template not existing for this platform
SKIPPED [1] test_netmiko_show.py:193: Genie not supported on this platform
SKIPPED [1] test_netmiko_show.py:213: Skipped
SKIPPED [1] test_netmiko_show.py:226: Skipped
SKIPPED [1] test_netmiko_show.py:245: Skipped
SKIPPED [1] test_netmiko_show.py:262: Skipped
SKIPPED [1] test_netmiko_show.py:282: Skipped
SKIPPED [1] test_netmiko_show.py:301: Skipped
SKIPPED [1] test_netmiko_show.py:316: Skipped
SKIPPED [1] test_netmiko_show.py:332: Skipped
SKIPPED [1] test_netmiko_show.py:352: Skipped
SKIPPED [1] test_netmiko_show.py:374: Skipped
SKIPPED [1] test_netmiko_show.py:399: Skipped
SKIPPED [1] test_netmiko_show.py:423: Skipped
SKIPPED [1] test_netmiko_show.py:525: Skipped
============================================================================================================================ 13 passed, 19 skipped in 34.07s =============================================================================================================================
================================================================================================================================== test session starts ===================================================================================================================================
platform linux -- Python 3.9.7, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/guych/projects_python/netmiko, configfile: setup.cfg
plugins: cov-3.0.0, mock-3.6.1
collected 12 items

test_netmiko_config.py::test_ssh_connect PASSED
test_netmiko_config.py::test_enable_mode PASSED
test_netmiko_config.py::test_config_mode SKIPPED (Platform doesn't support config mode.)
test_netmiko_config.py::test_exit_config_mode SKIPPED (Platform doesn't support config mode.)
test_netmiko_config.py::test_config_set PASSED
test_netmiko_config.py::test_config_set_longcommand PASSED
test_netmiko_config.py::test_config_hostname PASSED
test_netmiko_config.py::test_config_from_file PASSED
test_netmiko_config.py::test_config_error_pattern PASSED
test_netmiko_config.py::test_banner SKIPPED (No banner defined.)
test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.)
test_netmiko_config.py::test_disconnect PASSED

================================================================================================================================ short test summary info =================================================================================================================================
SKIPPED [1] test_netmiko_config.py:39: Platform doesn't support config mode.
SKIPPED [1] test_netmiko_config.py:48: Platform doesn't support config mode.
SKIPPED [1] test_netmiko_config.py:164: No banner defined.
SKIPPED [1] test_netmiko_config.py:197: No banner defined.
============================================================================================================================= 8 passed, 4 skipped in 43.30s ==============================================================================================================================
Adva F2
================================================================================================================================== test session starts ===================================================================================================================================
platform linux -- Python 3.9.7, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/guych/projects_python/netmiko, configfile: setup.cfg
plugins: cov-3.0.0, mock-3.6.1
collected 32 items

test_netmiko_show.py::test_disable_paging PASSED
test_netmiko_show.py::test_terminal_width PASSED
test_netmiko_show.py::test_ssh_connect PASSED
test_netmiko_show.py::test_ssh_connect_cm PASSED
test_netmiko_show.py::test_send_command_timing PASSED
test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED
test_netmiko_show.py::test_send_command PASSED
test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED
test_netmiko_show.py::test_complete_on_space_disabled SKIPPED
test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported on this platform)
test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform)
test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform)
test_netmiko_show.py::test_send_multiline_timing SKIPPED
test_netmiko_show.py::test_send_multiline_timing_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_prompt_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_simple_adva_f3 SKIPPED
test_netmiko_show.py::test_send_multiline_timing_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_prompt_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline_simple_adva_f2 SKIPPED
test_netmiko_show.py::test_send_multiline SKIPPED
test_netmiko_show.py::test_send_multiline_prompt SKIPPED
test_netmiko_show.py::test_send_multiline_simple SKIPPED
test_netmiko_show.py::test_base_prompt PASSED
test_netmiko_show.py::test_strip_prompt PASSED
test_netmiko_show.py::test_strip_command PASSED
test_netmiko_show.py::test_normalize_linefeeds PASSED
test_netmiko_show.py::test_clear_buffer PASSED
test_netmiko_show.py::test_enable_mode PASSED
test_netmiko_show.py::test_disconnect PASSED
test_netmiko_show.py::test_disconnect_no_enable SKIPPED

================================================================================================================================ short test summary info =================================================================================================================================
SKIPPED [1] test_netmiko_show.py:70: Skipped
SKIPPED [1] test_netmiko_show.py:88: Skipped
SKIPPED [1] test_netmiko_show.py:110: Skipped
SKIPPED [1] test_netmiko_show.py:131: TextFSM/ntc-templates not supported on this platform
SKIPPED [1] test_netmiko_show.py:153: TTP template not existing for this platform
SKIPPED [1] test_netmiko_show.py:193: Genie not supported on this platform
SKIPPED [1] test_netmiko_show.py:213: Skipped
SKIPPED [1] test_netmiko_show.py:226: Skipped
SKIPPED [1] test_netmiko_show.py:245: Skipped
SKIPPED [1] test_netmiko_show.py:262: Skipped
SKIPPED [1] test_netmiko_show.py:282: Skipped
SKIPPED [1] test_netmiko_show.py:301: Skipped
SKIPPED [1] test_netmiko_show.py:316: Skipped
SKIPPED [1] test_netmiko_show.py:332: Skipped
SKIPPED [1] test_netmiko_show.py:352: Skipped
SKIPPED [1] test_netmiko_show.py:374: Skipped
SKIPPED [1] test_netmiko_show.py:399: Skipped
SKIPPED [1] test_netmiko_show.py:423: Skipped
SKIPPED [1] test_netmiko_show.py:525: Skipped
============================================================================================================================ 13 passed, 19 skipped in 24.50s =============================================================================================================================
================================================================================================================================== test session starts ===================================================================================================================================
platform linux -- Python 3.9.7, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/guych/projects_python/netmiko, configfile: setup.cfg
plugins: cov-3.0.0, mock-3.6.1
collected 12 items

test_netmiko_config.py::test_ssh_connect PASSED
test_netmiko_config.py::test_enable_mode PASSED
test_netmiko_config.py::test_config_mode SKIPPED (Platform doesn't support config mode.)
test_netmiko_config.py::test_exit_config_mode SKIPPED (Platform doesn't support config mode.)
test_netmiko_config.py::test_config_set PASSED
test_netmiko_config.py::test_config_set_longcommand PASSED
test_netmiko_config.py::test_config_hostname PASSED
test_netmiko_config.py::test_config_from_file PASSED
test_netmiko_config.py::test_config_error_pattern PASSED
test_netmiko_config.py::test_banner SKIPPED (No banner defined.)
test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.)
test_netmiko_config.py::test_disconnect PASSED

================================================================================================================================ short test summary info =================================================================================================================================
SKIPPED [1] test_netmiko_config.py:39: Platform doesn't support config mode.
SKIPPED [1] test_netmiko_config.py:48: Platform doesn't support config mode.
SKIPPED [1] test_netmiko_config.py:164: No banner defined.
SKIPPED [1] test_netmiko_config.py:197: No banner defined.
============================================================================================================================= 8 passed, 4 skipped in 14.87s ==============================================================================================================================

@ktbyers
Copy link
Owner Author

ktbyers commented Jan 17, 2023

@guychilton77 Thanks for all your help on this.

ktbyers added a commit that referenced this pull request May 5, 2023
Co-authored-by: Guy Chilton <guychilton@gmail.com>
@ktbyers ktbyers deleted the adva_new_driver branch February 28, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants