Skip to content
Commits on May 28, 2016
  1. Bump copyright year

    committed May 28, 2016
  2. Relicense under the Lesser GNU Public License (LGPL), version 3.

    I've decided to relicense python-netsnmpagent under the LGPL instead of the
    GPL to facilitate integration with LGPL-licensed as well as proprietary
    software. Ie. using python-netsnmpagent in your proprietary subagent does not
    mean that you have to license your subagent under python-netsnmpagent's
    license as well.
    committed May 28, 2016
Commits on Jun 1, 2015
  1. @atodorov-storpool

    netsnmpagent: Fix Table's value() cutting off ASN_COUNTER64 table values

    When returning a table row's data, we accessed ASN_COUNTER64 values via a
    32-bit pointer, effectively cutting off the other 32 bits. Using the "data"
    union's "counter64" pointer fixes this.
    atodorov-storpool committed with May 27, 2015
Commits on Apr 17, 2015
  1. Update README with extended credits

    committed Apr 17, 2015
  2. @atodorov-storpool

    Fix format string in threading_agent example's logging

    Python 2.6 requires positional argument specifiers, omitting them only
    works on Python 2.7 and later.
    
    Cf. https://docs.python.org/2/library/string.html#formatstrings
    atodorov-storpool committed with Apr 15, 2015
Commits on Apr 16, 2015
  1. @atodorov-storpool

    examples/run_* scripts: Trap additional signals for cleanup

    In some cases the tempdirs were left because we seem to have missed some
    signals.
    atodorov-storpool committed with Apr 15, 2015
Commits on Mar 22, 2015
  1. netsnmpagent: Drop special string handling in Table's init()/setRowCe…

    …ll()
    
    Because of issues with strings inside tables, we used to implement some
    special handling for (what we thought were) the trailing zero byte in C
    strings in Table's init() and setRowCell() methods, passing size+1 to
    netsnmp_set_row_column().
    
    However, while this seemed to work on older net-snmp versions, with newer
    net-snmp versions we suddently had different issues, with irregular dot chars
    appearing at the end of strings.
    
    Turns out, we had a bug, but fixed it at the wrong place: right here, passing
    size (not size+1) appears to be correct. a8181dd fixes the real culprit in
    Table's value() method.
    committed Mar 22, 2015
  2. netsnmpagent: Make Table's value() method regard string lengths

    When creating the dictionary returned by the Table class's value() method,
    we so far assumed that the strings referenced through the "data" field in
    netsnmp_table_data_set_storage structures would be zero byte-terminated, as
    all C strings. However, this does not seem to be the case, as eg.
    netsnmp_set_row_column() uses memcpy(), not strcpy(), ie. when setting a
    string it is NOT zero byte-terminated. We thus need to regard "data_len"
    when returning data to the Python world.
    
    Strangely, this does not seem to be necessary with the simple scalar types
    such as OctetString and DisplayString which are basically ctypes.c_char_p
    objects as well...
    committed Mar 22, 2015
Commits on Nov 12, 2014
  1. netsnmptestenv: Handle strings without datatype and remove double quotes

    Sometimes, snmpget might return data without an explicit datatype. We'll handle it as strings, then, and remove any heading and trailing double quotes.
    committed Nov 12, 2014
Commits on Nov 11, 2014
  1. Construct packager email from user- and hostname if not set through g…

    …it config
    
    The included RPM .spec file always needs a packager name or email address,
    otherwise rpmbuild will complain. In properly configured git repos, the email
    address configured with "git config user.email" would have been used so far,
    but it should be possible to issue a "make rpms" without this requirement.
    
    Thus we now fall back to constructing a most probably bogus email address by
    combining the username and the hostname. This will allow to build RPMs for
    personal purposes, however, for redistribution purposes one should always
    explicitly configure a proper email address through "git config" beforehand.
    committed Nov 11, 2014
Commits on Aug 5, 2014
  1. Merge pull request #17 from jdevera/mibless

    Make the use of MIB files completely optional
    committed Aug 5, 2014
Commits on Jul 31, 2014
  1. @jdevera

    Rename as suggested in review

    jdevera committed Jul 31, 2014
Commits on Jul 21, 2014
  1. @jdevera
Commits on May 16, 2014
  1. Update README

    committed May 17, 2014
  2. Add "tests" target to Makefile and README explaining why to use it

    net-snmp's broken shutdown semantics force use to wrap nosetests so that it
    spawns a new Python process for each test case file.
    committed May 17, 2014
  3. Do not call net-snmp's shutdown_agent() anymore

    Unfortunately, the situation is even worse than described in 9c6c556 so that
    we'll have to revert that change. Calling shutdown_agent() will cause trouble
    if SNMP objects have been registered (double free()s).
    committed May 16, 2014
  4. Add first test cases for netsnmpagent SNMP objects (Unsigned32)

    This first set of test cases tests
    - SNMPGET on a read/write Unsigned32 object without initval returns 0
    - SNMPSET of that object to 42 raises no exception
    - SNMPGET on that object then returns 42
    - SNMPGET on a Unsigned32 object with initval 0 returns 0
    - SNMPGET on a Unsigned32 object with initval -1 returns 4294967295
    - SNMPGET on a Unsigned32 object with initval 4294967295 returns 4294967295
    - SNMPGET on a read-only Unsigned32 object without initval returns 0
    - SNMPSET on that object raises a NotWritableError exception
    committed May 16, 2014
  5. netsnmptestenv: Make snmpget() extract and return data and datatype

    Calling functions will have no interest in extracting the data themselves.
    committed May 16, 2014
  6. Re-import os and time once more in netsnmptestenv's shutdown() method

    Especially "os" may have been __del__'d when shutdown() gets called a second
    time by netsnmptestenv's own __del__() method.
    committed May 16, 2014
  7. Use __file__ instead of sys.argv[0] to find path to TEST-MIB

    If run through the "nosetests" script, sys.argv will be /usr/bin/nosetests,
    not the path of test_netsnmpagent_init.py. We have to use __file__ instead.
    committed May 16, 2014
  8. Rename test_netsnmpagent.py to test_netsnmpagent_init.py

    We can only test the init behavior of the netsnmpagent module in this file as,
    among other things, we explicitly test that calling agent.start() without
    registering any SNMP objects does not make them available. So we can't at the
    same time register and test SNMP objects -- calling shutdown() and
    instantiating a new netsnmpAgent instance wouldn't work for the reasons laid
    down in 9c6c556.
    committed May 16, 2014
Commits on May 15, 2014
  1. Add first test cases for netsnmpagent module itself

    These test cases so far yet deal with rather low level issues of the module
    only, such as the expected behavior after instance creation, whether a
    connection to a master snmpd agent inside a net-snmp test environment set
    up with the netsnmptestenv module could be successfully established etc.
    
    More important tests such as the behavior of the different types of SNMP
    objects are yet to follow. For this reason, the included new TEST-MIB.txt
    so far gets used only indirectly (to test when it becomes available to the
    test environment's snmpd).
    committed May 16, 2014
  2. Add test cases for snmpcmd() exceptions to test_netsnmptestenv.py

    These test cases cover the changes done in 706ecb0.
    committed May 15, 2014
Something went wrong with that request. Please try again.