forked from pool/python-snimpy
Accepting request 787598 from home:mnhauke
resurrect package python-snimpy OBS-URL: https://build.opensuse.org/request/show/787598 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-snimpy?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
11
python-snimpy-disable-IPv6-tests.diff
Normal file
11
python-snimpy-disable-IPv6-tests.diff
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
diff --git a/tests/test_snmp.py b/tests/test_snmp.py
|
||||||
|
index 9ee8b93..c354f2c 100644
|
||||||
|
--- a/tests/test_snmp.py
|
||||||
|
+++ b/tests/test_snmp.py
|
||||||
|
@@ -435,6 +435,3 @@ class TestSnmpTransports(unittest.TestCase):
|
||||||
|
"""Test IPv4 transport with name resolution"""
|
||||||
|
self._test(False, "localhost")
|
||||||
|
|
||||||
|
- def testIpv6(self):
|
||||||
|
- """Test IPv6 transport"""
|
||||||
|
- self._test(True, "[::1]")
|
18
python-snimpy.changes
Normal file
18
python-snimpy.changes
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 23 22:22:07 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Convert to singlespec
|
||||||
|
- Update to version 0.8.13
|
||||||
|
* Compatibility with Python 3.7.
|
||||||
|
* Fix an issue with implied index when reusing indexes between
|
||||||
|
tables.
|
||||||
|
- Update to version 0.8.12
|
||||||
|
* Support for more recent versions of IPython.
|
||||||
|
* Support for SNMPv3 context name.
|
||||||
|
* Support for notification nodes (MIB only).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 12 18:30:08 UTC 2016 - mardnh@gmx.de
|
||||||
|
|
||||||
|
- initial package, version 0.8.11
|
||||||
|
|
93
python-snimpy.spec
Normal file
93
python-snimpy.spec
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-snimpy
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016-2020, Martin Hauke <mardnh@gmx.de>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
Name: python-snimpy
|
||||||
|
Version: 0.8.13
|
||||||
|
Release: 0
|
||||||
|
Summary: Interactive SNMP tool
|
||||||
|
License: ISC
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
URL: https://github.com/vincentbernat/snimpy
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/s/snimpy/snimpy-%{version}.tar.gz
|
||||||
|
Patch0: python-snimpy-disable-IPv6-tests.diff
|
||||||
|
BuildRequires: %{python_module cffi >= 1.0.0}
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module vcversioner}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: libsmi-devel
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module cffi >= 1.0.0}
|
||||||
|
BuildRequires: %{python_module mock}
|
||||||
|
BuildRequires: %{python_module nose}
|
||||||
|
BuildRequires: %{python_module pycryptodomex}
|
||||||
|
BuildRequires: %{python_module pysnmp >= 4}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
# /SECTION
|
||||||
|
Requires: python-cffi >= 1.0.0
|
||||||
|
Requires: python-pycryptodomex
|
||||||
|
Requires: python-pysnmp >= 4
|
||||||
|
Requires: python-setuptools
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
Snimpy is a Python-based tool providing a simple interface to build
|
||||||
|
SNMP query. You can either use Snimpy interactively through its console
|
||||||
|
(derived from Python own console or from IPython_ if available) or write
|
||||||
|
Snimpy scripts which are just Python scripts with some global variables
|
||||||
|
available.
|
||||||
|
|
||||||
|
Snimpy is aimed at being the more Pythonic possible. You should forget
|
||||||
|
that you are doing SNMP requests. Snimpy will rely on MIB to hide SNMP
|
||||||
|
details. Here are some "features":
|
||||||
|
|
||||||
|
* MIB parser based on libsmi (through CFFI)
|
||||||
|
* SNMP requests are handled by PySNMP (SNMPv1, SNMPv2 and SNMPv3
|
||||||
|
support)
|
||||||
|
* scalars are just attributes of your session object
|
||||||
|
* columns are like a Python dictionary and made available as an
|
||||||
|
attribute
|
||||||
|
* getting an attribute is like issuing a GET method
|
||||||
|
* setting an attribute is like issuing a SET method
|
||||||
|
* iterating over a table is like using GETNEXT
|
||||||
|
* when something goes wrong, you get an exception
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n snimpy-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="%{optflags}"
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%python_exec setup.py test
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license docs/license.rst
|
||||||
|
%doc AUTHORS.rst README.rst
|
||||||
|
%python3_only %{_bindir}/snimpy
|
||||||
|
%python3_only %{_mandir}/man1/snimpy.1%{ext_man}
|
||||||
|
%{python_sitearch}/snimpy*
|
||||||
|
|
||||||
|
%changelog
|
3
snimpy-0.8.13.tar.gz
Normal file
3
snimpy-0.8.13.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:98b1790977b435332c03ab2603f6621eeeee69a50453ac01ca55dc7696d08535
|
||||||
|
size 74574
|
Reference in New Issue
Block a user