diff options
author | Micael Karlberg <[email protected]> | 2011-04-14 15:07:59 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-14 15:07:59 +0200 |
commit | efacc58e49d5b25dc4b1c74e5f8330c9f26a4511 (patch) | |
tree | 0ee8b0834309304676e4ec9843a54304ba9ce1a7 /lib/snmp/test/snmp_manager_user.erl | |
parent | c733034aa59ee536b166e2c676bb0239ee62b1a6 (diff) | |
download | otp-efacc58e49d5b25dc4b1c74e5f8330c9f26a4511.tar.gz otp-efacc58e49d5b25dc4b1c74e5f8330c9f26a4511.tar.bz2 otp-efacc58e49d5b25dc4b1c74e5f8330c9f26a4511.zip |
Async get 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 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl index af0d7839a8..d4c2574b17 100644 --- a/lib/snmp/test/snmp_manager_user.erl +++ b/lib/snmp/test/snmp_manager_user.erl @@ -51,7 +51,7 @@ which_all_agents/0, which_own_agents/0, load_mib/1, unload_mib/1, sync_get/1, sync_get/2, sync_get/3, sync_get2/3, - async_get/1, async_get/2, async_get/3, + async_get/1, async_get/2, async_get/3, async_get2/3, sync_get_next/1, sync_get_next/2, sync_get_next/3, async_get_next/1, async_get_next/2, async_get_next/3, sync_set/1, sync_set/2, sync_set/3, @@ -186,6 +186,9 @@ async_get(Addr_or_TargetName, Oids) -> async_get(Addr, Port, Oids) -> call({async_get, Addr, Port, Oids}). +async_get2(TargetName, Oids, SendOpts) -> + call({async_get2, TargetName, Oids, SendOpts}). + %% -- sync_get_next(Oids) -> @@ -453,6 +456,16 @@ loop(#state{parent = Parent, id = Id} = S) -> %% -- (async) get-request -- %% + {{async_get2, TargetName, Oids, SendOpts}, From, Ref} + when is_list(TargetName) -> + d("loop -> received async_get request with" + "~n TargetName: ~p" + "~n Oids: ~p" + "~n SendOpts: ~p", [TargetName, Oids, SendOpts]), + Res = snmpm:async_get2(Id, TargetName, Oids, SendOpts), + reply(From, Res, Ref), + loop(S); + %% No agent specified, so send it to all of them {{async_get, Oids}, From, Ref} -> d("loop -> received async_get request"), |