summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-25 04:41:42 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-25 04:41:42 +0000
commit3ee7eebed21714b759a7d5e80d201f2be2cea6e5 (patch)
treed5fa616944365f583165d16fc8583c4174a1d33c
parent968c02da434f261ac5d23ce40aa3a63907eed6c2 (diff)
automatic import of python3-netmikoopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-netmiko.spec379
-rw-r--r--sources1
3 files changed, 381 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..de15fb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/netmiko-4.1.2.tar.gz
diff --git a/python-netmiko.spec b/python-netmiko.spec
new file mode 100644
index 0000000..c6b21ad
--- /dev/null
+++ b/python-netmiko.spec
@@ -0,0 +1,379 @@
+%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
+<br />
+## 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).
+<br />
+## Getting Started
+- [Getting Started](#getting-started-1)
+<br />
+## Examples
+*You really should look here.*
+- [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
+<br />
+## Supported Platforms
+[PLATFORMS](PLATFORMS.md)
+<br />
+## Installation
+To install netmiko, simply us pip:
+```
+$ pip install netmiko
+```
+<br />
+## API-Documentation
+[API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
+<br />
+## Common Issues/FAQ
+Answers to some [common questions](COMMON_ISSUES.md)
+<br />
+### 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)
+<br />
+### 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#
+```
+<br />
+## API-Documentation
+<a href="https://ktbyers.github.io/netmiko/docs/netmiko/index.html" title="Docs">API Documentation</a>
+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)
+<br />
+## 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.
+<br />
+## 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
+%description -n python3-netmiko
+Multi-vendor library to simplify CLI connections to network devices
+<br />
+## 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).
+<br />
+## Getting Started
+- [Getting Started](#getting-started-1)
+<br />
+## Examples
+*You really should look here.*
+- [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
+<br />
+## Supported Platforms
+[PLATFORMS](PLATFORMS.md)
+<br />
+## Installation
+To install netmiko, simply us pip:
+```
+$ pip install netmiko
+```
+<br />
+## API-Documentation
+[API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
+<br />
+## Common Issues/FAQ
+Answers to some [common questions](COMMON_ISSUES.md)
+<br />
+### 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)
+<br />
+### 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#
+```
+<br />
+## API-Documentation
+<a href="https://ktbyers.github.io/netmiko/docs/netmiko/index.html" title="Docs">API Documentation</a>
+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)
+<br />
+## 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.
+<br />
+## 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
+<br />
+## 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).
+<br />
+## Getting Started
+- [Getting Started](#getting-started-1)
+<br />
+## Examples
+*You really should look here.*
+- [Netmiko Examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md)
+<br />
+## Supported Platforms
+[PLATFORMS](PLATFORMS.md)
+<br />
+## Installation
+To install netmiko, simply us pip:
+```
+$ pip install netmiko
+```
+<br />
+## API-Documentation
+[API-Documentation](https://ktbyers.github.io/netmiko/#api-documentation)
+<br />
+## Common Issues/FAQ
+Answers to some [common questions](COMMON_ISSUES.md)
+<br />
+### 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)
+<br />
+### 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#
+```
+<br />
+## API-Documentation
+<a href="https://ktbyers.github.io/netmiko/docs/netmiko/index.html" title="Docs">API Documentation</a>
+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)
+<br />
+## 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.
+<br />
+## 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
+* Sat Feb 25 2023 Python_Bot <Python_Bot@openeuler.org> - 4.1.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..be85a6d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+be8844e32f2a15931e15594801d1af39 netmiko-4.1.2.tar.gz