diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-07 13:07:31 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-07 13:07:31 +0000 |
commit | 7c378c5d06f09732764a0bed5fe5d5323e85c460 (patch) | |
tree | 64c6fa9beecbccb378242aa50b1805a7e0b406d9 | |
parent | 4b98946761fc837f7d31396e6bfb290ad7f49289 (diff) |
automatic import of python-aioasuswrt
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-aioasuswrt.spec | 275 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 277 insertions, 0 deletions
@@ -0,0 +1 @@ +/aioasuswrt-1.4.0.tar.gz diff --git a/python-aioasuswrt.spec b/python-aioasuswrt.spec new file mode 100644 index 0000000..3f48f02 --- /dev/null +++ b/python-aioasuswrt.spec @@ -0,0 +1,275 @@ +%global _empty_manifest_terminate_build 0 +Name: python-aioasuswrt +Version: 1.4.0 +Release: 1 +Summary: Api wrapper for Asuswrt https://www.asus.com/ASUSWRT/ +License: MIT +URL: https://github.com/kennedyshead/aioasuswrt +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/97/e4/3abe75db55e5bbfd435ed8e7bfe4aeb628f74207a4543cc3d6e8913723d6/aioasuswrt-1.4.0.tar.gz +BuildArch: noarch + +Requires: python3-asyncssh +Requires: python3-check-manifest + +%description +Small wrapper for asuswrt.  + +### How to run tests + +`python setup.py test` + +## Credits: +[@mvn23](https://github.com/mvn23) +[@halkeye](https://github.com/halkeye) +[@maweki](https://github.com/maweki) +[@quarcko](https://github.com/quarcko) +[@wdullaer](https://github.com/wdullaer) + +## Info +There are many different versions of asuswrt and sometimes they just dont work in current implementation. +If you have a problem with your specific router open an issue, but please add as much info as you can and atleast: + +* Version of router +* Version of Asuswrt + +## Known issues + +## Bugs +You can always create an issue in this tracker. +To test and give us the information needed you could run: +```python +#!/usr/bin/env python +import asyncio +import logging + +import sys + +from aioasuswrt.asuswrt import AsusWrt + +component = AsusWrt('192.168.1.1', 22, username='****', password='****') +logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) +logger = logging.getLogger(__name__) + + +async def print_data(): + logger.debug("wl") + logger.debug(await component.connection.async_run_command('for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done')) + dev = await component.async_get_wl() + logger.debug(dev) + logger.debug("arp") + logger.debug(await component.connection.async_run_command('arp -n')) + dev.update(await component.async_get_arp()) + logger.debug(dev) + logger.debug("neigh") + logger.debug(await component.connection.async_run_command('ip neigh')) + dev.update(await component.async_get_neigh(dev)) + logger.debug(dev) + logger.debug("leases") + logger.debug(await component.connection.async_run_command('cat /var/lib/misc/dnsmasq.leases')) + dev.update(await component.async_get_leases(dev)) + logger.debug(dev) + + +loop = asyncio.get_event_loop() + +loop.run_until_complete(print_data()) +loop.close() + +``` +Coffeefund: 1Huz6vNN6drX3Fq1sU98wPqNSdMPvkMBJG + + + + +%package -n python3-aioasuswrt +Summary: Api wrapper for Asuswrt https://www.asus.com/ASUSWRT/ +Provides: python-aioasuswrt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-aioasuswrt +Small wrapper for asuswrt.  + +### How to run tests + +`python setup.py test` + +## Credits: +[@mvn23](https://github.com/mvn23) +[@halkeye](https://github.com/halkeye) +[@maweki](https://github.com/maweki) +[@quarcko](https://github.com/quarcko) +[@wdullaer](https://github.com/wdullaer) + +## Info +There are many different versions of asuswrt and sometimes they just dont work in current implementation. +If you have a problem with your specific router open an issue, but please add as much info as you can and atleast: + +* Version of router +* Version of Asuswrt + +## Known issues + +## Bugs +You can always create an issue in this tracker. +To test and give us the information needed you could run: +```python +#!/usr/bin/env python +import asyncio +import logging + +import sys + +from aioasuswrt.asuswrt import AsusWrt + +component = AsusWrt('192.168.1.1', 22, username='****', password='****') +logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) +logger = logging.getLogger(__name__) + + +async def print_data(): + logger.debug("wl") + logger.debug(await component.connection.async_run_command('for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done')) + dev = await component.async_get_wl() + logger.debug(dev) + logger.debug("arp") + logger.debug(await component.connection.async_run_command('arp -n')) + dev.update(await component.async_get_arp()) + logger.debug(dev) + logger.debug("neigh") + logger.debug(await component.connection.async_run_command('ip neigh')) + dev.update(await component.async_get_neigh(dev)) + logger.debug(dev) + logger.debug("leases") + logger.debug(await component.connection.async_run_command('cat /var/lib/misc/dnsmasq.leases')) + dev.update(await component.async_get_leases(dev)) + logger.debug(dev) + + +loop = asyncio.get_event_loop() + +loop.run_until_complete(print_data()) +loop.close() + +``` +Coffeefund: 1Huz6vNN6drX3Fq1sU98wPqNSdMPvkMBJG + + + + +%package help +Summary: Development documents and examples for aioasuswrt +Provides: python3-aioasuswrt-doc +%description help +Small wrapper for asuswrt.  + +### How to run tests + +`python setup.py test` + +## Credits: +[@mvn23](https://github.com/mvn23) +[@halkeye](https://github.com/halkeye) +[@maweki](https://github.com/maweki) +[@quarcko](https://github.com/quarcko) +[@wdullaer](https://github.com/wdullaer) + +## Info +There are many different versions of asuswrt and sometimes they just dont work in current implementation. +If you have a problem with your specific router open an issue, but please add as much info as you can and atleast: + +* Version of router +* Version of Asuswrt + +## Known issues + +## Bugs +You can always create an issue in this tracker. +To test and give us the information needed you could run: +```python +#!/usr/bin/env python +import asyncio +import logging + +import sys + +from aioasuswrt.asuswrt import AsusWrt + +component = AsusWrt('192.168.1.1', 22, username='****', password='****') +logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) +logger = logging.getLogger(__name__) + + +async def print_data(): + logger.debug("wl") + logger.debug(await component.connection.async_run_command('for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done')) + dev = await component.async_get_wl() + logger.debug(dev) + logger.debug("arp") + logger.debug(await component.connection.async_run_command('arp -n')) + dev.update(await component.async_get_arp()) + logger.debug(dev) + logger.debug("neigh") + logger.debug(await component.connection.async_run_command('ip neigh')) + dev.update(await component.async_get_neigh(dev)) + logger.debug(dev) + logger.debug("leases") + logger.debug(await component.connection.async_run_command('cat /var/lib/misc/dnsmasq.leases')) + dev.update(await component.async_get_leases(dev)) + logger.debug(dev) + + +loop = asyncio.get_event_loop() + +loop.run_until_complete(print_data()) +loop.close() + +``` +Coffeefund: 1Huz6vNN6drX3Fq1sU98wPqNSdMPvkMBJG + + + + +%prep +%autosetup -n aioasuswrt-1.4.0 + +%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-aioasuswrt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Mar 07 2023 Python_Bot <Python_Bot@openeuler.org> - 1.4.0-1 +- Package Spec generated @@ -0,0 +1 @@ +6d0127c83fa59dc1724b727c663cd3d7 aioasuswrt-1.4.0.tar.gz |