Giter VIP home page Giter VIP logo

Comments (10)

dvolodin7 avatar dvolodin7 commented on July 20, 2024 1

Sure, you are welcome.

To be correct, we're developing NOC for over than 16 years.

from gufo_snmp.

dvolodin7 avatar dvolodin7 commented on July 20, 2024

Rust part does not use async indeed. But timeout handling in syncronous code may be rather tricky

from gufo_snmp.

wangxin688 avatar wangxin688 commented on July 20, 2024

Rust part does not use async indeed. But timeout handling in syncronous code may be rather tricky
I totally agree with you. Asyncio is better to handle io bound task. It's just a good option to use sync integrate with threading(sure i can run asyncio code in a separate thread). Cause a lot of history project was written with sync way.
Currently there is no good option for snmplibs to choose. pysnmp is good but with poor performance and API sucks.
easysnmp is fast for synchronize But pure C code is not maintainced anymore and lack of upgrading. As well as aiosnmp.
I saw you guys has developed noc system more than 7 years in netdevops field.
some things similar like netmiko nornir in this field is sync way.

from gufo_snmp.

wangxin688 avatar wangxin688 commented on July 20, 2024

If that's is acceptable. Maybe I can make some contributions on that

from gufo_snmp.

dvolodin7 avatar dvolodin7 commented on July 20, 2024

Timeout handling may be implemented either by:

  • Setting SO_RCVTIMEO socket option
  • Prepending recv by select/epoll with timeout set

from gufo_snmp.

wangxin688 avatar wangxin688 commented on July 20, 2024

Sure, you are welcome.

To be correct, we're developing NOC for over than 16 years.

amazing! I’m the new birds on netdevops ,although I have worked as network engineer more than 7 years. Your noc system is absolutely fantastic

from gufo_snmp.

dvolodin7 avatar dvolodin7 commented on July 20, 2024

I've successfully implemented synchronous GET operations with minimal adjustments to the Rust core. However, we're currently facing challenges with getnext/getbulk, and I'm actively investigating and addressing these issues.

from gufo_snmp.

wangxin688 avatar wangxin688 commented on July 20, 2024

I've successfully implemented synchronous GET operations with minimal adjustments to the Rust core. However, we're currently facing challenges with getnext/getbulk, and I'm actively investigating and addressing these issues.

omg, you guys are absolutely amazing. I was just trying to start with source code, I see the docs has been updated, thanks

from gufo_snmp.

wangxin688 avatar wangxin688 commented on July 20, 2024

seems it's broken when install package on macOS. ubuntu 20.4 works fine.
I have tested on MACOS 14.2.1(Intel chip). I remember a few days ago. I installed the package on my M1 and M3 laptop, it's worked. I could do some test later.
here's the message on Inter chip:
python version: 3.11.6
pip: 23.3.2

(.venv) ➜  netsight git:(main) ✗ rye sync                     
Reusing already existing virtualenv
Generating production lockfile: /Users/jeffry/Documents/netsight/requirements.lock
Generating dev lockfile: /Users/jeffry/Documents/netsight/requirements-dev.lock
Installing dependencies
Looking in indexes: https://pypi.org/simple/
Obtaining file:///. (from -r /var/folders/hp/4_09kt050ygf18xnhj6nd1mw0000gn/T/tmptbkftrax (line 1))
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting gufo-snmp==0.3.0 (from -r /var/folders/hp/4_09kt050ygf18xnhj6nd1mw0000gn/T/tmptbkftrax (line 2))
  Using cached gufo_snmp-0.3.0.tar.gz (21 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: gufo-snmp, netsight
  Building wheel for gufo-snmp (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for gufo-snmp (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-311
      creating build/lib.macosx-10.9-x86_64-cpython-311/gufo
      creating build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/version.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/util.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/protocol.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/client.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/getnext.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/policer.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/snmpd.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/typing.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/getbulk.py -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      running egg_info
      writing src/gufo_snmp.egg-info/PKG-INFO
      writing dependency_links to src/gufo_snmp.egg-info/dependency_links.txt
      writing top-level names to src/gufo_snmp.egg-info/top_level.txt
      reading manifest file 'src/gufo_snmp.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching '__pycache__'
      warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
      adding license file 'LICENSE.md'
      writing manifest file 'src/gufo_snmp.egg-info/SOURCES.txt'
      copying src/gufo/snmp/_fast.pyi -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      copying src/gufo/snmp/py.typed -> build/lib.macosx-10.9-x86_64-cpython-311/gufo/snmp
      running build_ext
      running build_rust
      error: can't find Rust compiler
      
      If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
      
      To update pip, run:
      
          pip install --upgrade pip
      
      and then retry package installation.
      
      If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gufo-snmp
  Building editable for netsight (pyproject.toml) ... done
  Created wheel for netsight: filename=netsight-0.1.0-py3-none-any.whl size=3958 sha256=4b770a979cc8f36b25d334cc3f5d12ec718d90cbc3007e781dcbe4facae08bbd
  Stored in directory: /private/var/folders/hp/4_09kt050ygf18xnhj6nd1mw0000gn/T/pip-ephem-wheel-cache-stg4tzvx/wheels/97/54/f5/d849319cdfa096e074df352654ee2e7c919da8951f090690c6
Successfully built netsight
Failed to build gufo-snmp
ERROR: Could not build wheels for gufo-snmp, which is required to install pyproject.toml-based projects
Traceback (most recent call last):
  File "/Users/jeffry/.rye/pip-tools/[email protected]/bin/pip-sync", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/piptools/scripts/sync.py", line 174, in cli
    sync.sync(
  File "/Users/jeffry/.rye/pip-tools/[email protected]/lib/python3.11/site-packages/piptools/sync.py", line 244, in sync
    run(  # nosec
  File "/Users/jeffry/.rye/py/[email protected]/install/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/jeffry/Documents/netsight/.venv/bin/python', '-m', 'pip', 'install', '-r', '/var/folders/hp/4_09kt050ygf18xnhj6nd1mw0000gn/T/tmptbkftrax', '--index-url', 'https://pypi.org/simple/', '--python=/Users/jeffry/Documents/netsight/.venv/bin/python', '--no-deps']' returned non-zero exit status 1.
error: Installation of dependencies failed

from gufo_snmp.

dvolodin7 avatar dvolodin7 commented on July 20, 2024

Building of binary wheels for MacOS and for MUSL is disabled for now.
You may try to install rust toolchain using tools/build/setup-rust.sh script.

from gufo_snmp.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.