Commit Graph

62 Commits (d5b3c90d29d9f0099c686e838a8731c6f2723088)

Author SHA1 Message Date
Ilya Etingof d5b3c90d29 email changed, copyright extended to the year 2017 2017-01-12 01:05:56 +01:00
Ilya Etingof 90bbf397ad pep8 reformatted 2016-04-02 23:43:14 +02:00
elie c50fe2a466 copyright updated 2015-12-29 20:34:33 +00:00
elie 87a7a35d1e copyright notice added to source code 2015-11-20 20:57:28 +00:00
elie a46f37c265 linted for bad-whitespace and some other issues 2015-10-17 20:22:30 +00:00
elie 71dd5565a4 linted for trailing whitespaces 2015-10-17 09:54:53 +00:00
elie 5d5673dfcd * Asyncore and asyncio-based APIs reworked to become functions.
* Asyncio and Twisted API moved entirely into high-level domain to
  be aligned with other high-level APIs. This WILL BREAK backward
  compatibility for those apps that use Twisted API.
2015-09-27 10:26:25 +00:00
elie b0fd0d6dea post-move documentation and code fixes 2015-09-21 18:35:05 +00:00
elie c8b8797cac major revamp:
* oneliner API moved to pysnmp.hlapi.asyncore location
* all hlapi components now pulled from inner modules to into
  pysnmp.hlapi.asyncore.
* LCD configuration moved from SNMP apps classes to be stand-alone
* var-binds MIB<->protocol representation code moved from SNMP apps
  classes to be stand-alone
2015-09-20 18:40:58 +00:00
elie 2a528e36ac asynchronous notification originator documented + fixes here and there 2015-09-17 23:16:45 +00:00
elie ddc989155d * synchronous oneliner apps redesigned to offer Python generator-based
API along with a more comprehensive set of accepted parameters.
* massively documented (in Sphinx, NumPy style)
2015-09-14 05:20:24 +00:00
elie f308702c78 synchronous oneliner apps redesigned to offer Python generator-based
API along with more comprehensive set of accepted parameters
2015-07-06 21:30:04 +00:00
elie 27c1c8ef97 Major overhaul related to PySMI integration and Standard SNMP Applications
API redesign:
* MibVariable becomes ObjectIdentity and moves to pysnmp.smi.rfc1902
* ObjectType and NotificationType classes resempling corresponding MIB MACROs
  implemented
* SNMP Standard Applications and examples modified to support ObjectType
  and NotificationType parameters
2015-05-31 19:35:10 +00:00
elie cc9845a0d3 * unnecessary inheritance of AsyncNotificationOriginator() and
AsynNotificationOriginator() tranformed into a referenced object
  relationship
* made use of AsyncCommandGenerator.getMibViewController()
2014-06-17 15:24:48 +00:00
elie b8dbda56e8 fix to auth objects cleanup code 2014-06-15 14:21:45 +00:00
elie 8028defd66 sendNotification() API correction 2014-06-09 13:07:07 +00:00
elie de2be96ea9 ContextData container introduced to the newest (async) API 2014-06-09 09:35:43 +00:00
elie b272b371ed Major rewrite of native SNMPv3 CommandGenerator and NotificationOriginator
applications towards the following goals:
* avoid bonding with particular SNMP engine instance to promote single
  app instance using many SNMP engine instances
* support two APIs for working with request data: one operates on the
  whole PDU object while the other on PDU contents
* keep callback context data in stack rather than in stateful application
  cache
* newly introduced sendVarBinds() method offers a more functional and
  logical signatures.
* keep backward compatibility for all existing major/documented interfaces
2014-04-04 15:03:22 +00:00
elie a402a7f151 - Internal oneliner apps configuration cache moved from respective
apps objects to [a singular] snmpEngine object. That would allow
  for better cache reuse and allow for a single app working with
  many snmpEngine instances.
- Legacy interfaces and APIs dropped in new oneliner AsyncCommandGenerator
  and AsyncNotificationOriginator classes (notice 'c' in Async). Original
  AsynCommandGenerator and AsynNotificationOriginator implementations
  rebuilt on top of these new optimized versions keeping all the legacy
  for compatibility reasons. These classes no more keep references to
  SnmpEngine what makes them reusable with many SnmpEngine class instances.
- Example on a single Transport Dispatcher use with multiple SnmpEngine's
  in oneliner AsyncCommandGenerator & AsyncNotificationOriginator basaed
  applicatons added.
2013-11-17 19:10:09 +00:00
elie 74c60bd882 Internal oneliner apps configuration cache moved from respective
apps objects to [a singular] snmpEngine object. That would allow
for better cache reuse and allow for a single   app working with
many snmpEngine instances.
2013-11-10 14:38:29 +00:00
elie c3da4f9fff credential caching improved to allow unbalanced add/del configuration
calls by use counting
2013-06-12 08:08:27 +00:00
elie bc0048832f unused variables, imports; wrong indentation; undefined prototype attribues
all the things that bothers linter
2013-06-04 06:26:02 +00:00
elie b2d46549dd SNMP credentials management reworked to allow multiple securityNames's in
snmpCommunityEntry and usmUserEntry tables. Changes made to addV1System(),
addV3User() functions as well as to their oneliner's wrappers.
2013-05-18 13:26:49 +00:00
elie 2aa7fa3e53 AsynCommandGenerator.makeReadVarBinds() generalized into a new
makeVarBinds() method which replaces somewhat redundant code at setCmd()
and AsynNotificationOriginator.sendNotification().
2013-05-09 10:37:53 +00:00
elie a705915f93 * AsynCommandGenerator.uncfgCmdGen() & AsynNotificationOriginator.uncfgCmdGen()
methods now accept optional authData parameter to remove specific entries
  from LCD. This can be useful for modifying security parameters for
  specific securityName.
* AsynNotificationOriginator.cfgCmdGen() does not take into account
  securityModel & securityLevel when reducing LCD access via addTrapUser().
  This improves LCD consistency on sparse add/del operatons but also
  does not let you to configure different securityModels per securityname
  at VACM though the cfgCmdGen() wrapper.
2013-05-09 07:39:45 +00:00
elie a0399991a8 fix to bool(ErrorIndicationReturn()) 2013-01-05 14:48:51 +00:00
elie 2c4175582a typo 2012-12-29 08:52:09 +00:00
elie a99977146e make sure user callback object is supplied before calling it 2012-12-29 08:49:37 +00:00
elie d1479dbbbc at AsynNotificationOriginator.sendNotification()
* the notificationType param is no more optional
* the varBinds param is now truly optional
2012-12-28 17:27:39 +00:00
elie 927f3f9623 * The missing functionality of passing Response PDU contents of INFORM
request is now implemented at Notification Originator app. The return
  value of NotificationOriginator.sendNotification is now a composite object
  that includes errorStatus, errorIndex and varBinds.
* The missing functionality of passing lookupNames & lookupValues params
  to Notification Originator is now implemented. It may make sense for
  INFORMs.
* The missing functionality of passing contextName to oneliner
  version of NotificationOriginator.sendNotification is now implemented.
2012-12-15 22:29:56 +00:00
elie b5920009c2 additionalVarBinds made really optional 2012-09-29 06:43:08 +00:00
elie ce994b5b6b moved the implicit auth & transport objects tagging from sync into async
NotificationOriginator
2012-09-04 20:55:36 +00:00
elie e6fd4d3b92 auth & transport configuration objects made non-hashable for
clarity
2012-08-27 09:38:59 +00:00
elie 0aabc820af make a default for notificationName param of sendNotification() 2012-08-12 08:13:13 +00:00
elie fbfced5b46 auth & target configuration containers moved to separate modules 2012-08-12 06:52:29 +00:00
elie 063f1f9a06 converted to MibVariable-based parameters passing 2012-08-11 21:58:56 +00:00
elie 1c5adf1b67 autogenerate missing transport tag from both auth & transport info
at synchronous app
2012-07-20 14:31:49 +00:00
elie 0340371c3f community\transport tag processing changed:
1) CommunityData and TransportTarget classes now take optional
   tag and tagList initializers respectively
2) NotificationOriginator.cfgNtfOrg() method does not take tagList parameter
   anymore but uses tag values carried by CommunityData and TransportTarget
   instances
3) If no tag information is specified, use TransportTarget instance hash
   as a tag which binds CommunityData instance with TransportTarget instance
   (the above is needed for notification generation)
2012-07-19 10:22:00 +00:00
elie ca444ba9e1 IPv6/UDP and Local Domain Socket transport interfaces added to the
oneliner API
2012-07-06 15:18:16 +00:00
elie 4770631c3e major rework of oneliner LCD configuration routine. 2011-12-03 12:33:05 +00:00
elie 0df571a7b1 exlicit repr() calls replaced with '%r' 2011-11-08 15:04:59 +00:00
elie f0406dd01c major overhawl aimed at Python 2.4 through 3.2 compatibility 2011-11-06 20:37:09 +00:00
elie 287cfd6f0d sync versions of oneliner apps split off async implementation for clarity 2011-02-11 20:40:36 +00:00
elie 2d34d4d970 all dict.has_key() & dict.get() invocations replaced with modern syntax
(this breaks compatibility with Python 2.1 and older).
2011-01-20 17:11:43 +00:00
elie cfc993fc05 extended Security Options (3DESEDE, AES192, AES256) privacy protocols
implemented.
2011-01-16 23:59:08 +00:00
elie baebea6e77 fix to INFORM sending 2010-07-07 15:28:59 +00:00
elie ad2d9bb953 fix to proper tagList format (still needs a look) 2008-11-12 21:32:59 +00:00
elie 6853c38dc1 Bind tagList to targetAddress to prevent sending dups to list members 2008-11-09 23:13:30 +00:00
elie 423350132e added support for AES cipher (rfc3826) 2007-07-09 13:39:47 +00:00
elie 2f54afb519 allow plain Python values in var-binds (invokes MIB lookup) 2007-05-28 17:44:43 +00:00