diff options
author | Micael Karlberg <[email protected]> | 2011-04-15 12:01:11 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-15 12:01:11 +0200 |
commit | f794bf0043b8955f74061b004dcb056ab0952815 (patch) | |
tree | 649fe2116d997d99deca81c26af9a10d28d58749 /lib/snmp/test/snmp_manager_user.erl | |
parent | 4bdcd8b56cc6446012542db1df5fba893f0f38f0 (diff) | |
download | otp-f794bf0043b8955f74061b004dcb056ab0952815.tar.gz otp-f794bf0043b8955f74061b004dcb056ab0952815.tar.bz2 otp-f794bf0043b8955f74061b004dcb056ab0952815.zip |
Async get-bulk test case for version 3 request API.
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r-- | lib/snmp/test/snmp_manager_user.erl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl index c2b5886c4a..30b5dd1fc7 100644 --- a/lib/snmp/test/snmp_manager_user.erl +++ b/lib/snmp/test/snmp_manager_user.erl @@ -57,7 +57,7 @@ sync_set/1, sync_set/2, sync_set/3, sync_set2/3, async_set/1, async_set/2, async_set/3, async_set2/3, sync_get_bulk/3, sync_get_bulk/4, sync_get_bulk/5, sync_get_bulk2/5, - async_get_bulk/3, async_get_bulk/4, async_get_bulk/5, + async_get_bulk/3, async_get_bulk/4, async_get_bulk/5, async_get_bulk2/5, name_to_oid/1, oid_to_name/1, purify_oid/1 ]). @@ -270,6 +270,9 @@ async_get_bulk(Addr_or_TargetName, NonRep, MaxRep, Oids) -> async_get_bulk(Addr, Port, NonRep, MaxRep, Oids) -> call({async_get_bulk, Addr, Port, NonRep, MaxRep, Oids}). +async_get_bulk2(TargetName, NonRep, MaxRep, Oids, SendOpts) -> + call({async_get_bulk2, TargetName, NonRep, MaxRep, Oids, SendOpts}). + %% -- name_to_oid(Name) -> @@ -741,6 +744,20 @@ loop(#state{parent = Parent, id = Id} = S) -> %% -- (async) get-bulk-request -- %% + {{async_get_bulk2, TargetName, NonRep, MaxRep, Oids, SendOpts}, + From, Ref} when is_list(TargetName) -> + d("loop -> received async_get_bulk2 request with" + "~n TargetName: ~p" + "~n NonRep: ~w" + "~n MaxRep: ~w" + "~n Oids: ~p" + "~n SendOpts: ~p", + [TargetName, NonRep, MaxRep, Oids, SendOpts]), + Res = snmpm:async_get_bulk2(Id, TargetName, + NonRep, MaxRep, Oids, SendOpts), + reply(From, Res, Ref), + loop(S); + %% No agent specified, so send it to all of them {{async_get_bulk, NonRep, MaxRep, Oids}, From, Ref} -> d("loop -> received async_get_bulk request with" |