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

device type and ssh autodetect for ArubaOS-CX switches #3133

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

robinreinhardt
Copy link
Contributor

@robinreinhardt robinreinhardt commented Mar 3, 2023

The device type aruba_os seems to be for the controllers and gateways.

The device types aruba_osswitch and aruba_procurve point to the HPProcurve class and seem to be intended for the HP/Aruba 2500 and 2900 series switches.

The new device type arubaos_cx should be for the switches Aruba CX 6000/8300/10000 series.
I've mapped this to the HPProcurve class.

The Aruba CX switches can be recognized quite easily.
show version produces the following output:

6300M# show version 
-----------------------------------------------------------------------------
ArubaOS-CX
(c) Copyright 2017-2022 Hewlett Packard Enterprise Development LP
-----------------------------------------------------------------------------
Version      : FL.10.09.1031                                                 
Build Date   : 2022-06-14 04:21:23 UTC                                       
Build ID     : ArubaOS-CX:FL.10.09.1031:dea0ef74d35b:202206140343            
Build SHA    : dea0ef74d35b187ab79b41ffba4d68ec38cb5a63                      
Active Image : secondary                     

Service OS Version : FL.01.09.0002                 
BIOS Version       : FL.01.0002

I think looking for the string "ArubaOS-CX" should be a solid solution.

@ktbyers
Copy link
Owner

ktbyers commented Mar 12, 2023

Does the HP ProCurve driver actually work with the Aruba-CX devices?

We should probably do the standard show and config tests against a CX device? Can you do this?

@ktbyers
Copy link
Owner

ktbyers commented Mar 12, 2023

@robinreinhardt
Copy link
Contributor Author

I ran both tests (test_netmiko_show.py and test_netmiko_config.py) against an Aruba 6405.
I've added examples for the Aruba switches in the test example files.

test_netmiko_show.py

test_netmiko_show.py::test_failed_key SKIPPED (Not using SSH-keys)                                                                                                                                                                                                                       [  4%]
test_netmiko_show.py::test_disable_paging PASSED                                                                                                                                                                                                                                         [  8%]
test_netmiko_show.py::test_terminal_width PASSED                                                                                                                                                                                                                                         [ 12%]
test_netmiko_show.py::test_ssh_connect PASSED                                                                                                                                                                                                                                            [ 16%]
test_netmiko_show.py::test_ssh_connect_cm PASSED                                                                                                                                                                                                                                         [ 20%]
test_netmiko_show.py::test_send_command_timing PASSED                                                                                                                                                                                                                                    [ 24%]
test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED                                                                                                                                                                                                                     [ 28%]
test_netmiko_show.py::test_send_command PASSED                                                                                                                                                                                                                                           [ 32%]
test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED                                                                                                                                                                                                                            [ 36%]
test_netmiko_show.py::test_complete_on_space_disabled SKIPPED                                                                                                                                                                                                                            [ 40%]
test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported on this platform)                                                                                                                                                                           [ 44%]
test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform)                                                                                                                                                                                        [ 48%]
test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform)                                                                                                                                                                                             [ 52%]
test_netmiko_show.py::test_send_multiline_timing SKIPPED                                                                                                                                                                                                                                 [ 56%]
test_netmiko_show.py::test_send_multiline SKIPPED                                                                                                                                                                                                                                        [ 60%]
test_netmiko_show.py::test_send_multiline_prompt SKIPPED                                                                                                                                                                                                                                 [ 64%]
test_netmiko_show.py::test_send_multiline_simple SKIPPED                                                                                                                                                                                                                                 [ 68%]
test_netmiko_show.py::test_base_prompt PASSED                                                                                                                                                                                                                                            [ 72%]
test_netmiko_show.py::test_strip_prompt PASSED                                                                                                                                                                                                                                           [ 76%]
test_netmiko_show.py::test_strip_command PASSED                                                                                                                                                                                                                                          [ 80%]
test_netmiko_show.py::test_normalize_linefeeds PASSED                                                                                                                                                                                                                                    [ 84%]
test_netmiko_show.py::test_clear_buffer PASSED                                                                                                                                                                                                                                           [ 88%]
test_netmiko_show.py::test_enable_mode PASSED                                                                                                                                                                                                                                            [ 92%]
test_netmiko_show.py::test_disconnect PASSED                                                                                                                                                                                                                                             [ 96%]
test_netmiko_show.py::test_disconnect_no_enable SKIPPED                                                                                                                                                                                                                                  [100%]

test_netmiko_conf.py

test_netmiko_config.py::test_ssh_connect PASSED                                                                                                                                                                                                                                          [  7%]
test_netmiko_config.py::test_enable_mode PASSED                                                                                                                                                                                                                                          [ 15%]
test_netmiko_config.py::test_config_mode PASSED                                                                                                                                                                                                                                          [ 23%]
test_netmiko_config.py::test_exit_config_mode PASSED                                                                                                                                                                                                                                     [ 30%]
test_netmiko_config.py::test_config_set PASSED                                                                                                                                                                                                                                           [ 38%]
test_netmiko_config.py::test_config_set_generator PASSED                                                                                                                                                                                                                                 [ 46%]
test_netmiko_config.py::test_config_set_longcommand PASSED                                                                                                                                                                                                                               [ 53%]
test_netmiko_config.py::test_config_hostname PASSED                                                                                                                                                                                                                                      [ 61%]
test_netmiko_config.py::test_config_from_file SKIPPED                                                                                                                                                                                                                                    [ 69%]
test_netmiko_config.py::test_config_error_pattern SKIPPED (No error_pattern defined.)                                                                                                                                                                                                    [ 76%]
test_netmiko_config.py::test_banner SKIPPED (No banner defined.)                                                                                                                                                                                                                         [ 84%]
test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.)                                                                                                                                                                                                              [ 92%]
test_netmiko_config.py::test_disconnect PASSED                                                                                                                                                                                                                                           [100%

@robinreinhardt
Copy link
Contributor Author

Is anything else necessary?

@alextremblay
Copy link

Interesting... I tested the HPProcurve class against my ArubaOS-CX switches (version FL10.10.1060), and could not get it to work. specifically

self.enable()

was causing it to fail, as the ArubaOS CX switches do not have an enable mode.

I was able to get at least config backup working by connecting to my AOS-CX switches with the basic CiscoSSHConnection driver class...

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.

3 participants