**> Этот код не работает, есть идеи почему?
передача json object {'vmUserName': 'admin', 'partitionCpuUsage': 3.0}
def sendTrap_gen (self, event, eventvals):
mibViewController = view.MibViewController(self.snmpEngine.getMibBuilder())
# Create Notification Originator App instance.
ntfOrg = ntforg.NotificationOriginator()
ntfOrg.snmpContext = self.snmpContext
trapName = rfc1902.ObjectIdentity('PARTITION-MIB', event)
ntfOrg.sendVarBinds(
self.snmpEngine,
'my-notification', # notification targets
None, '', # contextEngineId, contextName
rfc1902.NotificationType(
trapName,
objects={('PARTITION-MIB', k): v for k, v in eventvals.items()}
).resolveWithMib(mibViewController)
)