napalm-hios


Namenapalm-hios JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/yourusername/napalm-hios
SummaryNAPALM driver for HiOS network switches by Belden
upload_time2024-10-11 21:12:38
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NAPALM HiOS Driver

This is a NAPALM driver for HiOS network switches by Belden. It currently supports SSH protocol for interacting with HiOS devices.

## Features

- Supports SSH protocol
- Implements standard NAPALM methods
- Includes comprehensive unit and integration tests
- Offers a mock device for testing and development

## Installation

To install the NAPALM HiOS driver, run:

```
pip install napalm-hios
```

## Quick Start

Here's a basic example of how to use the NAPALM HiOS driver:

```python
from napalm import get_network_driver

# Initialize the driver
driver = get_network_driver('hios')
device = driver(
    hostname='your_device_ip',
    username='your_username',
    password='your_password',
    optional_args={'ssh_port': 22}  # Optional: specify SSH port if different from default
)

# Open the connection
device.open()

# Use NAPALM methods
facts = device.get_facts()
interfaces = device.get_interfaces()

# Close the connection
device.close()
```
If you want to see it in action without a specific purpose or use case, simply create your virtual environment, install with the pip command above and then execute the test_hios.py file found in examples/test_all_commands.py
This command takes <hostname> <username> <password> [ip address for ping] [count] (with the later two being optional)
it will log the json returned dicts into the current folder in a file called test_live_device.md

## Documentation

For detailed information about the NAPALM HiOS driver, including supported methods, advanced usage, and error handling, please refer to the [comprehensive documentation](docs/usage.md).
This docuemntation was written by Claude from Anthropic so if anything is wrong I take no responsibility.

## Supported Methods

The NAPALM HiOS driver supports the following standard NAPALM methods:

- `get_facts()`
- `get_interfaces()`
- `get_interfaces_ip()`
- `get_interfaces_counters()`
- `get_lldp_neighbors()`
- `get_lldp_neighbors_detail()`
- `get_mac_address_table()`
- `get_arp_table()`
- `get_ntp_servers()`
- `get_ntp_stats()`
- `get_users()`
- `get_optics()`
- `get_config()`
- `get_environment()`
- `get_snmp_information()`
- `ping()`
- `get_vlans()`

Note: Configuration-related methods like `load_merge_candidate()`, `load_replace_candidate()`, `compare_config()`, `commit_config()`, `discard_config()`, and `rollback()` are not currently implemented.

For a complete list and detailed explanations including custom vendor-specific methods, see the [documentation](docs/usage.md).

## Example

```
python -m examples/ssh_examply.py
```
Note: the example runs with user permissions against an online application lab provided by Hirschmann in Germany, this limits which commands you can execute.

For more details about the application lab, see http://applicationlab.hirschmann.de/remoteaccess

## Testing

To run the unit tests:

```
python -m unittest discover tests/unit
```
Note: tests are still a work in progress...

To run the integration tests (requires a real HiOS device or a properly configured mock):

```
python -m unittest discover tests/integration
```

Note: I've been using example/test_all_commands.py against real devices by calling it with <hostname> <user> <password> <ping ip> <count>, the ping ip and count are optional and will default to 8.8.8.8 if not specified. This writes results to test_live_device.md and i've included an example output from a live device

## Mock Device

The driver includes a mock HiOS device for testing and development purposes. To use the mock device, set the hostname to 'localhost' when initializing the driver.

Note: The mock device functionality is still in development

## To-do

Some musings about what to do for next release, [Wishlist](TODO.md), feel free to make suggestions if you have a specific need.

## Known Issues

Since we have focused on SSH driver with fallback methods saying "Protocol Not Implemented" for the other protocols we plan to support, if SSH connection fails you might get a response of "Protocol Not Implemented".

## Contributing

Contributions to the NAPALM HiOS driver are welcome! Please refer to the CONTRIBUTING.md file for guidelines.

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/napalm-hios",
    "name": "napalm-hios",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "your.email@example.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/fe/20eb198d85cb51bda8725d61c7843dd9263c5983e79e7c012c1f1f4fb673/napalm_hios-1.0.2.tar.gz",
    "platform": null,
    "description": "# NAPALM HiOS Driver\n\nThis is a NAPALM driver for HiOS network switches by Belden. It currently supports SSH protocol for interacting with HiOS devices.\n\n## Features\n\n- Supports SSH protocol\n- Implements standard NAPALM methods\n- Includes comprehensive unit and integration tests\n- Offers a mock device for testing and development\n\n## Installation\n\nTo install the NAPALM HiOS driver, run:\n\n```\npip install napalm-hios\n```\n\n## Quick Start\n\nHere's a basic example of how to use the NAPALM HiOS driver:\n\n```python\nfrom napalm import get_network_driver\n\n# Initialize the driver\ndriver = get_network_driver('hios')\ndevice = driver(\n    hostname='your_device_ip',\n    username='your_username',\n    password='your_password',\n    optional_args={'ssh_port': 22}  # Optional: specify SSH port if different from default\n)\n\n# Open the connection\ndevice.open()\n\n# Use NAPALM methods\nfacts = device.get_facts()\ninterfaces = device.get_interfaces()\n\n# Close the connection\ndevice.close()\n```\nIf you want to see it in action without a specific purpose or use case, simply create your virtual environment, install with the pip command above and then execute the test_hios.py file found in examples/test_all_commands.py\nThis command takes <hostname> <username> <password> [ip address for ping] [count] (with the later two being optional)\nit will log the json returned dicts into the current folder in a file called test_live_device.md\n\n## Documentation\n\nFor detailed information about the NAPALM HiOS driver, including supported methods, advanced usage, and error handling, please refer to the [comprehensive documentation](docs/usage.md).\nThis docuemntation was written by Claude from Anthropic so if anything is wrong I take no responsibility.\n\n## Supported Methods\n\nThe NAPALM HiOS driver supports the following standard NAPALM methods:\n\n- `get_facts()`\n- `get_interfaces()`\n- `get_interfaces_ip()`\n- `get_interfaces_counters()`\n- `get_lldp_neighbors()`\n- `get_lldp_neighbors_detail()`\n- `get_mac_address_table()`\n- `get_arp_table()`\n- `get_ntp_servers()`\n- `get_ntp_stats()`\n- `get_users()`\n- `get_optics()`\n- `get_config()`\n- `get_environment()`\n- `get_snmp_information()`\n- `ping()`\n- `get_vlans()`\n\nNote: Configuration-related methods like `load_merge_candidate()`, `load_replace_candidate()`, `compare_config()`, `commit_config()`, `discard_config()`, and `rollback()` are not currently implemented.\n\nFor a complete list and detailed explanations including custom vendor-specific methods, see the [documentation](docs/usage.md).\n\n## Example\n\n```\npython -m examples/ssh_examply.py\n```\nNote: the example runs with user permissions against an online application lab provided by Hirschmann in Germany, this limits which commands you can execute.\n\nFor more details about the application lab, see http://applicationlab.hirschmann.de/remoteaccess\n\n## Testing\n\nTo run the unit tests:\n\n```\npython -m unittest discover tests/unit\n```\nNote: tests are still a work in progress...\n\nTo run the integration tests (requires a real HiOS device or a properly configured mock):\n\n```\npython -m unittest discover tests/integration\n```\n\nNote: I've been using example/test_all_commands.py against real devices by calling it with <hostname> <user> <password> <ping ip> <count>, the ping ip and count are optional and will default to 8.8.8.8 if not specified. This writes results to test_live_device.md and i've included an example output from a live device\n\n## Mock Device\n\nThe driver includes a mock HiOS device for testing and development purposes. To use the mock device, set the hostname to 'localhost' when initializing the driver.\n\nNote: The mock device functionality is still in development\n\n## To-do\n\nSome musings about what to do for next release, [Wishlist](TODO.md), feel free to make suggestions if you have a specific need.\n\n## Known Issues\n\nSince we have focused on SSH driver with fallback methods saying \"Protocol Not Implemented\" for the other protocols we plan to support, if SSH connection fails you might get a response of \"Protocol Not Implemented\".\n\n## Contributing\n\nContributions to the NAPALM HiOS driver are welcome! Please refer to the CONTRIBUTING.md file for guidelines.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "NAPALM driver for HiOS network switches by Belden",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/napalm-hios"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "344aa49f9f3dd28622d0155a606f67dcaa5e06f1ad1b890597a42da93d2a3f14",
                "md5": "161b5bcb2fd1417778d0a319318aee7f",
                "sha256": "9efa1ff1f5d966a4092a960dbb1201ed543653ca010de972bf6635c2cb22536c"
            },
            "downloads": -1,
            "filename": "napalm_hios-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "161b5bcb2fd1417778d0a319318aee7f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 28662,
            "upload_time": "2024-10-11T21:12:37",
            "upload_time_iso_8601": "2024-10-11T21:12:37.093761Z",
            "url": "https://files.pythonhosted.org/packages/34/4a/a49f9f3dd28622d0155a606f67dcaa5e06f1ad1b890597a42da93d2a3f14/napalm_hios-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4fe20eb198d85cb51bda8725d61c7843dd9263c5983e79e7c012c1f1f4fb673",
                "md5": "f1ee18be1412a8bd54a251567e304fbe",
                "sha256": "2bb5790c765eee7ad0f2e334b9c06f134a11fdd5f92308200633a09b314298ea"
            },
            "downloads": -1,
            "filename": "napalm_hios-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f1ee18be1412a8bd54a251567e304fbe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 26924,
            "upload_time": "2024-10-11T21:12:38",
            "upload_time_iso_8601": "2024-10-11T21:12:38.707372Z",
            "url": "https://files.pythonhosted.org/packages/e4/fe/20eb198d85cb51bda8725d61c7843dd9263c5983e79e7c012c1f1f4fb673/napalm_hios-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-11 21:12:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "napalm-hios",
    "github_not_found": true,
    "lcname": "napalm-hios"
}
        
Elapsed time: 0.40376s