%global _empty_manifest_terminate_build 0 Name: python-netmiko Version: 4.1.2 Release: 1 Summary: Multi-vendor library to simplify legacy CLI connections to network devices License: MIT URL: https://github.com/ktbyers/netmiko Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0b/83/030a32a4d728e8cda107243385989af2376e92b6845b4484abf2737ed46c/netmiko-4.1.2.tar.gz BuildArch: noarch Requires: python3-setuptools Requires: python3-paramiko Requires: python3-scp Requires: python3-tenacity Requires: python3-pyyaml Requires: python3-textfsm Requires: python3-ntc-templates Requires: python3-pyserial %description Multi-vendor library to simplify CLI connections to network devices
## Why Netmiko? Network automation to screen-scraping devices is primarily concerned with gathering output from show commands and with making configuration changes. Netmiko aims to accomplish both of these operations and to do it across a very broad set of platforms. It seeks to do this while abstracting away low-level state control (i.e. eliminate low-level regex pattern matching to the extent practical).
## Getting Started - [Getting Started](#getting-started-1)
## Examples *You really should look here.* - [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
## Supported Platforms [PLATFORMS](PLATFORMS.md)
## Installation To install netmiko, simply us pip: ``` $ pip install netmiko ```
## API-Documentation [API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
## Common Issues/FAQ Answers to some [common questions](COMMON_ISSUES.md)
### Tutorials - [Netmiko Overview](https://pynet.twb-tech.com/blog/automation/netmiko.html) - [Secure Copy](https://pynet.twb-tech.com/blog/automation/netmiko-scp.html) - [Netmiko through SSH Proxy](https://pynet.twb-tech.com/blog/automation/netmiko-proxy.html) - [Netmiko and TextFSM](https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html) - [Netmiko and what constitutes done](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html)
### Getting Started: #### Create a dictionary representing the device. Supported device_types can be found in [ssh_dispatcher.py](https://github.com/ktbyers/netmiko/blob/master/netmiko/ssh_dispatcher.py), see CLASS_MAPPER keys. ```py from netmiko import ConnectHandler cisco_881 = { 'device_type': 'cisco_ios', 'host': '10.10.10.10', 'username': 'test', 'password': 'password', 'port' : 8022, # optional, defaults to 22 'secret': 'secret', # optional, defaults to '' } ``` #### Establish an SSH connection to the device by passing in the device dictionary. ```py net_connect = ConnectHandler(**cisco_881) ``` #### Execute show commands. ```py output = net_connect.send_command('show ip int brief') print(output) ``` ``` Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset down down FastEthernet1 unassigned YES unset down down FastEthernet2 unassigned YES unset down down FastEthernet3 unassigned YES unset down down FastEthernet4 10.10.10.10 YES manual up up Vlan1 unassigned YES unset down down ``` #### Execute configuration change commands (will automatically enter into config mode) ```py config_commands = [ 'logging buffered 20000', 'logging buffered 20010', 'no logging console' ] output = net_connect.send_config_set(config_commands) print(output) ``` ``` pynet-rtr1#config term Enter configuration commands, one per line. End with CNTL/Z. pynet-rtr1(config)#logging buffered 20000 pynet-rtr1(config)#logging buffered 20010 pynet-rtr1(config)#no logging console pynet-rtr1(config)#end pynet-rtr1# ```
## API-Documentation API Documentation Below are some of the particularly handy Classes/functions for easy reference: - [Base Connection Object](https://ktbyers.github.io/netmiko/docs/netmiko/base_connection.html) - [SSH Autodetect](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.SSHDetect) - [SSH Dispatcher](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.ssh_dispatcher) - [Redispatch](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.redispatch)
## Contributing Contributors are welcome. You can contribute to Netmiko in a variety of ways: answering questions on Slack (see below in Questions/Discussions), responding to issues, adding to the common issues, reporting/fixing bugs, or even adding your own device type. Before contributing a new vendor/platform device type, remember that any code added needs to be supported in some fashion. To add a vendor/platform you can follow the outline [here](VENDOR.md). Once you've worked on your first pass of your driver and have it functional, you'll need to include test data in order for it to be merged into develop, you can see the general flow of how to do that [here](TESTING.md). For all code contributions, please ensure that you have ran `black` against the code or your code will fail the Travis CI build.
## Questions/Discussion If you find an issue with Netmiko, then you can open an issue on this projects issue page here: [https://github.com/ktbyers/netmiko/issues](https://github.com/ktbyers/netmiko/issues). Please make sure you've read through the common issues and examples prior to opening an issue. Please only open issues for bugs, feature requests, or other topics related to development of Netmiko. If you simply have a question, join us on Slack... %package -n python3-netmiko Summary: Multi-vendor library to simplify legacy CLI connections to network devices Provides: python-netmiko BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-netmiko Multi-vendor library to simplify CLI connections to network devices
## Why Netmiko? Network automation to screen-scraping devices is primarily concerned with gathering output from show commands and with making configuration changes. Netmiko aims to accomplish both of these operations and to do it across a very broad set of platforms. It seeks to do this while abstracting away low-level state control (i.e. eliminate low-level regex pattern matching to the extent practical).
## Getting Started - [Getting Started](#getting-started-1)
## Examples *You really should look here.* - [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
## Supported Platforms [PLATFORMS](PLATFORMS.md)
## Installation To install netmiko, simply us pip: ``` $ pip install netmiko ```
## API-Documentation [API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
## Common Issues/FAQ Answers to some [common questions](COMMON_ISSUES.md)
### Tutorials - [Netmiko Overview](https://pynet.twb-tech.com/blog/automation/netmiko.html) - [Secure Copy](https://pynet.twb-tech.com/blog/automation/netmiko-scp.html) - [Netmiko through SSH Proxy](https://pynet.twb-tech.com/blog/automation/netmiko-proxy.html) - [Netmiko and TextFSM](https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html) - [Netmiko and what constitutes done](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html)
### Getting Started: #### Create a dictionary representing the device. Supported device_types can be found in [ssh_dispatcher.py](https://github.com/ktbyers/netmiko/blob/master/netmiko/ssh_dispatcher.py), see CLASS_MAPPER keys. ```py from netmiko import ConnectHandler cisco_881 = { 'device_type': 'cisco_ios', 'host': '10.10.10.10', 'username': 'test', 'password': 'password', 'port' : 8022, # optional, defaults to 22 'secret': 'secret', # optional, defaults to '' } ``` #### Establish an SSH connection to the device by passing in the device dictionary. ```py net_connect = ConnectHandler(**cisco_881) ``` #### Execute show commands. ```py output = net_connect.send_command('show ip int brief') print(output) ``` ``` Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset down down FastEthernet1 unassigned YES unset down down FastEthernet2 unassigned YES unset down down FastEthernet3 unassigned YES unset down down FastEthernet4 10.10.10.10 YES manual up up Vlan1 unassigned YES unset down down ``` #### Execute configuration change commands (will automatically enter into config mode) ```py config_commands = [ 'logging buffered 20000', 'logging buffered 20010', 'no logging console' ] output = net_connect.send_config_set(config_commands) print(output) ``` ``` pynet-rtr1#config term Enter configuration commands, one per line. End with CNTL/Z. pynet-rtr1(config)#logging buffered 20000 pynet-rtr1(config)#logging buffered 20010 pynet-rtr1(config)#no logging console pynet-rtr1(config)#end pynet-rtr1# ```
## API-Documentation API Documentation Below are some of the particularly handy Classes/functions for easy reference: - [Base Connection Object](https://ktbyers.github.io/netmiko/docs/netmiko/base_connection.html) - [SSH Autodetect](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.SSHDetect) - [SSH Dispatcher](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.ssh_dispatcher) - [Redispatch](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.redispatch)
## Contributing Contributors are welcome. You can contribute to Netmiko in a variety of ways: answering questions on Slack (see below in Questions/Discussions), responding to issues, adding to the common issues, reporting/fixing bugs, or even adding your own device type. Before contributing a new vendor/platform device type, remember that any code added needs to be supported in some fashion. To add a vendor/platform you can follow the outline [here](VENDOR.md). Once you've worked on your first pass of your driver and have it functional, you'll need to include test data in order for it to be merged into develop, you can see the general flow of how to do that [here](TESTING.md). For all code contributions, please ensure that you have ran `black` against the code or your code will fail the Travis CI build.
## Questions/Discussion If you find an issue with Netmiko, then you can open an issue on this projects issue page here: [https://github.com/ktbyers/netmiko/issues](https://github.com/ktbyers/netmiko/issues). Please make sure you've read through the common issues and examples prior to opening an issue. Please only open issues for bugs, feature requests, or other topics related to development of Netmiko. If you simply have a question, join us on Slack... %package help Summary: Development documents and examples for netmiko Provides: python3-netmiko-doc %description help Multi-vendor library to simplify CLI connections to network devices
## Why Netmiko? Network automation to screen-scraping devices is primarily concerned with gathering output from show commands and with making configuration changes. Netmiko aims to accomplish both of these operations and to do it across a very broad set of platforms. It seeks to do this while abstracting away low-level state control (i.e. eliminate low-level regex pattern matching to the extent practical).
## Getting Started - [Getting Started](#getting-started-1)
## Examples *You really should look here.* - [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
## Supported Platforms [PLATFORMS](PLATFORMS.md)
## Installation To install netmiko, simply us pip: ``` $ pip install netmiko ```
## API-Documentation [API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
## Common Issues/FAQ Answers to some [common questions](COMMON_ISSUES.md)
### Tutorials - [Netmiko Overview](https://pynet.twb-tech.com/blog/automation/netmiko.html) - [Secure Copy](https://pynet.twb-tech.com/blog/automation/netmiko-scp.html) - [Netmiko through SSH Proxy](https://pynet.twb-tech.com/blog/automation/netmiko-proxy.html) - [Netmiko and TextFSM](https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html) - [Netmiko and what constitutes done](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html)
### Getting Started: #### Create a dictionary representing the device. Supported device_types can be found in [ssh_dispatcher.py](https://github.com/ktbyers/netmiko/blob/master/netmiko/ssh_dispatcher.py), see CLASS_MAPPER keys. ```py from netmiko import ConnectHandler cisco_881 = { 'device_type': 'cisco_ios', 'host': '10.10.10.10', 'username': 'test', 'password': 'password', 'port' : 8022, # optional, defaults to 22 'secret': 'secret', # optional, defaults to '' } ``` #### Establish an SSH connection to the device by passing in the device dictionary. ```py net_connect = ConnectHandler(**cisco_881) ``` #### Execute show commands. ```py output = net_connect.send_command('show ip int brief') print(output) ``` ``` Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset down down FastEthernet1 unassigned YES unset down down FastEthernet2 unassigned YES unset down down FastEthernet3 unassigned YES unset down down FastEthernet4 10.10.10.10 YES manual up up Vlan1 unassigned YES unset down down ``` #### Execute configuration change commands (will automatically enter into config mode) ```py config_commands = [ 'logging buffered 20000', 'logging buffered 20010', 'no logging console' ] output = net_connect.send_config_set(config_commands) print(output) ``` ``` pynet-rtr1#config term Enter configuration commands, one per line. End with CNTL/Z. pynet-rtr1(config)#logging buffered 20000 pynet-rtr1(config)#logging buffered 20010 pynet-rtr1(config)#no logging console pynet-rtr1(config)#end pynet-rtr1# ```
## API-Documentation API Documentation Below are some of the particularly handy Classes/functions for easy reference: - [Base Connection Object](https://ktbyers.github.io/netmiko/docs/netmiko/base_connection.html) - [SSH Autodetect](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.SSHDetect) - [SSH Dispatcher](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.ssh_dispatcher) - [Redispatch](https://ktbyers.github.io/netmiko/docs/netmiko/index.html#netmiko.redispatch)
## Contributing Contributors are welcome. You can contribute to Netmiko in a variety of ways: answering questions on Slack (see below in Questions/Discussions), responding to issues, adding to the common issues, reporting/fixing bugs, or even adding your own device type. Before contributing a new vendor/platform device type, remember that any code added needs to be supported in some fashion. To add a vendor/platform you can follow the outline [here](VENDOR.md). Once you've worked on your first pass of your driver and have it functional, you'll need to include test data in order for it to be merged into develop, you can see the general flow of how to do that [here](TESTING.md). For all code contributions, please ensure that you have ran `black` against the code or your code will fail the Travis CI build.
## Questions/Discussion If you find an issue with Netmiko, then you can open an issue on this projects issue page here: [https://github.com/ktbyers/netmiko/issues](https://github.com/ktbyers/netmiko/issues). Please make sure you've read through the common issues and examples prior to opening an issue. Please only open issues for bugs, feature requests, or other topics related to development of Netmiko. If you simply have a question, join us on Slack... %prep %autosetup -n netmiko-4.1.2 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-netmiko -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 07 2023 Python_Bot - 4.1.2-1 - Package Spec generated