diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a1f6bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +__pycache__/ +*.pyc +*.egg-info/ +.venv/ +build/ +dist/ diff --git a/napalm_hpe_aruba_procurve.egg-info/PKG-INFO b/napalm_hpe_aruba_procurve.egg-info/PKG-INFO deleted file mode 100644 index 40b9e52..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/PKG-INFO +++ /dev/null @@ -1,142 +0,0 @@ -Metadata-Version: 2.4 -Name: napalm-hpe-aruba-procurve -Version: 0.2.0 -Summary: NAPALM driver for HPE/Aruba ProCurve switches with auto-detecting transport (REST API, SSH, legacy SSH, Telnet) -Author: Christian Manivong -License: Apache-2.0 -Project-URL: Repository, https://github.com/chrismanivong/napalm-hpe-aruba-procurve -Classifier: Topic :: Utilities -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Operating System :: POSIX :: Linux -Classifier: Operating System :: MacOS -Requires-Python: >=3.8 -Description-Content-Type: text/markdown -Requires-Dist: napalm>=4.0.0 -Requires-Dist: netmiko>=4.0.0 -Requires-Dist: paramiko>=5.0.0 -Requires-Dist: netaddr -Requires-Dist: requests>=2.25.0 -Requires-Dist: urllib3 -Provides-Extra: dev -Requires-Dist: pytest; extra == "dev" -Requires-Dist: pytest-cov; extra == "dev" -Requires-Dist: black; extra == "dev" -Requires-Dist: ruff; extra == "dev" - -# napalm-hpe-aruba-procurve - -NAPALM driver for **HPE / Aruba ProCurve** switches — from ancient 2520G-8-PoE -to modern 2530/2540 series. - -## Transport auto-detection - -The driver probes transports in order and uses the first one that succeeds: - -| Priority | Transport | Notes | -|----------|-----------|-------| -| 1 | REST API (HTTPS → HTTP, v7 → v6) | Newer 2530/2540 with `rest-interface` enabled | -| 2 | SSH (standard) | hp_procurve netmiko driver | -| 3 | SSH (legacy KEX) | Forces older kex/cipher negotiation for 2520G-8-PoE etc. | -| 4 | Telnet | Oldest devices without SSH or with broken SSH | - -Override the transport with `optional_args={"transport": "ssh_legacy"}` to skip -auto-detection. - -## Switch prerequisites - -### REST API (newer switches, e.g. 2530, 2540) - -``` -web-management ssl -rest-interface -rest-interface session-idle-timeout 120 -``` - -### SSH (all ProCurve) - -``` -crypto key generate ssh rsa -ip ssh -``` - -Telnet is enabled by default on most ProCurve switches. - -## Installation - -```bash -pip install napalm napalm-hpe-aruba-procurve -``` - -Or from source: - -```bash -git clone https://github.com/chrismanivong/napalm-hpe-aruba-procurve -pip install -e napalm-hpe-aruba-procurve/ -``` - -## Quick start - -```python -from napalm import get_network_driver - -Driver = get_network_driver("procurve") - -with Driver( - "10.0.0.1", - "manager", - "secret", - optional_args={ - # "transport": "ssh", # force transport (api/ssh/ssh_legacy/telnet) - # "port": 22, - # "ssl_verify": False, # disable SSL cert check for API - # "api_version": "v7", # API version hint (v3/v6/v7) - # "secret": "enablepassword", # enable password for CLI - }, -) as dev: - print(dev.get_facts()) - print(dev.get_interfaces()) -``` - -## Supported NAPALM methods - -| Method | API | SSH/Telnet | -|--------|-----|------------| -| `open()` | ✅ | ✅ | -| `close()` | ✅ | ✅ | -| `is_alive()` | ✅ | ✅ | -| `get_facts()` | ✅ | ✅ | -| `get_interfaces()` | ✅ | ✅ | -| `get_interfaces_ip()` | ✅ | ✅ | -| `get_arp_table()` | ✅ | ✅ | -| `get_mac_address_table()` | ✅ | ✅ | -| `get_lldp_neighbors()` | ✅ | ✅ | -| `get_lldp_neighbors_detail()` | ✅ | ✅ | -| `get_config()` | ✅ | ✅ | -| `get_ntp_servers()` | ✅ | ✅ | -| `get_environment()` | ❌ | ✅ | -| `get_users()` | ❌ | ✅ | -| `get_snmp_information()` | ❌ | ✅ | -| `ping()` | ✅ | ✅ | -| `cli()` | ✅ | ✅ | -| `load_merge_candidate()` | ❌ | ✅ | -| `load_replace_candidate()` | ❌ | ✅ | -| `compare_config()` | ❌ | ✅ | -| `commit_config()` | ❌ | ✅ | -| `discard_config()` | ❌ | ✅ | -| `rollback()` | ❌ | ✅ | - -## Tested devices - -- HP ProCurve 2520G-8-PoE (J9565A) — SSH legacy / Telnet -- HP ProCurve 2920-48G — SSH -- Aruba 2530-8-PoE+ — SSH + REST API - -## License - -Apache 2.0 diff --git a/napalm_hpe_aruba_procurve.egg-info/SOURCES.txt b/napalm_hpe_aruba_procurve.egg-info/SOURCES.txt deleted file mode 100644 index f15b5c3..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/SOURCES.txt +++ /dev/null @@ -1,12 +0,0 @@ -README.md -pyproject.toml -napalm_hpe_aruba_procurve.egg-info/PKG-INFO -napalm_hpe_aruba_procurve.egg-info/SOURCES.txt -napalm_hpe_aruba_procurve.egg-info/dependency_links.txt -napalm_hpe_aruba_procurve.egg-info/entry_points.txt -napalm_hpe_aruba_procurve.egg-info/requires.txt -napalm_hpe_aruba_procurve.egg-info/top_level.txt -napalm_procurve/__init__.py -napalm_procurve/api_client.py -napalm_procurve/parsers.py -napalm_procurve/procurve.py \ No newline at end of file diff --git a/napalm_hpe_aruba_procurve.egg-info/dependency_links.txt b/napalm_hpe_aruba_procurve.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/napalm_hpe_aruba_procurve.egg-info/entry_points.txt b/napalm_hpe_aruba_procurve.egg-info/entry_points.txt deleted file mode 100644 index 04560d5..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[napalm.drivers] -procurve = napalm_procurve:ProcurveDriver diff --git a/napalm_hpe_aruba_procurve.egg-info/requires.txt b/napalm_hpe_aruba_procurve.egg-info/requires.txt deleted file mode 100644 index bcdacea..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/requires.txt +++ /dev/null @@ -1,12 +0,0 @@ -napalm>=4.0.0 -netmiko>=4.0.0 -paramiko>=5.0.0 -netaddr -requests>=2.25.0 -urllib3 - -[dev] -pytest -pytest-cov -black -ruff diff --git a/napalm_hpe_aruba_procurve.egg-info/top_level.txt b/napalm_hpe_aruba_procurve.egg-info/top_level.txt deleted file mode 100644 index 51a2d42..0000000 --- a/napalm_hpe_aruba_procurve.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -napalm_procurve diff --git a/napalm_procurve/__pycache__/__init__.cpython-312.pyc b/napalm_procurve/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 73a8967..0000000 Binary files a/napalm_procurve/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/napalm_procurve/__pycache__/api_client.cpython-312.pyc b/napalm_procurve/__pycache__/api_client.cpython-312.pyc deleted file mode 100644 index 76db29a..0000000 Binary files a/napalm_procurve/__pycache__/api_client.cpython-312.pyc and /dev/null differ diff --git a/napalm_procurve/__pycache__/parsers.cpython-312.pyc b/napalm_procurve/__pycache__/parsers.cpython-312.pyc deleted file mode 100644 index e7329a4..0000000 Binary files a/napalm_procurve/__pycache__/parsers.cpython-312.pyc and /dev/null differ diff --git a/napalm_procurve/__pycache__/procurve.cpython-312.pyc b/napalm_procurve/__pycache__/procurve.cpython-312.pyc deleted file mode 100644 index c435f0f..0000000 Binary files a/napalm_procurve/__pycache__/procurve.cpython-312.pyc and /dev/null differ diff --git a/pyproject.toml b/pyproject.toml index 9973f20..4c6d6cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "napalm-hpe-aruba-procurve" -version = "0.3.0" +version = "0.4.0" description = "NAPALM driver for HPE/Aruba ProCurve switches with auto-detecting transport (REST API, SSH, legacy SSH, Telnet)" readme = "README.md" license = { text = "Apache-2.0" } @@ -26,6 +26,7 @@ classifiers = [ ] dependencies = [ "napalm>=4.0.0", + "napalm-device-types>=4.13.0", "netmiko>=4.0.0", "paramiko>=5.0.0", # CVE-2026-44405 "netaddr", diff --git a/tests/__pycache__/__init__.cpython-312.pyc b/tests/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index b33a6ff..0000000 Binary files a/tests/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/tests/unit/__pycache__/__init__.cpython-312.pyc b/tests/unit/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 5e9f8d1..0000000 Binary files a/tests/unit/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/tests/unit/__pycache__/test_driver.cpython-312-pytest-9.1.1.pyc b/tests/unit/__pycache__/test_driver.cpython-312-pytest-9.1.1.pyc deleted file mode 100644 index e59bb8e..0000000 Binary files a/tests/unit/__pycache__/test_driver.cpython-312-pytest-9.1.1.pyc and /dev/null differ