forked from etingof/pysnmp
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,16 @@ | |
# Zachary Lorusso <[email protected]> | ||
# | ||
import asyncio | ||
import sys | ||
|
||
|
||
from pysnmp.entity.engine import SnmpEngine | ||
from pysnmp.entity.rfc3413 import ntforg | ||
from pysnmp.hlapi.transport import AbstractTransportTarget | ||
from pysnmp.hlapi.v3arch.asyncio.auth import CommunityData, UsmUserData | ||
from pysnmp.hlapi.v3arch.asyncio.context import ContextData | ||
from pysnmp.hlapi.v3arch.asyncio.lcd import NotificationOriginatorLcdConfigurator | ||
from pysnmp.hlapi.v3arch.asyncio.transport import ( | ||
Udp6TransportTarget, | ||
UdpTransportTarget, | ||
) | ||
from pysnmp.hlapi.varbinds import NotificationOriginatorVarBinds | ||
from pysnmp.smi.rfc1902 import NotificationType, ObjectIdentity | ||
from pysnmp.smi.rfc1902 import NotificationType | ||
|
||
__all__ = ["sendNotification"] | ||
|
||
|
@@ -29,7 +27,13 @@ | |
|
||
|
||
async def sendNotification( | ||
snmpEngine, authData, transportTarget, contextData, notifyType, varBinds, **options | ||
snmpEngine: SnmpEngine, | ||
authData: "CommunityData | UsmUserData", | ||
transportTarget: AbstractTransportTarget, | ||
contextData: ContextData, | ||
notifyType: str, | ||
*varBinds: NotificationType, | ||
**options | ||
): | ||
r"""Creates a generator to send SNMP notification. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters