aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_user.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-15 11:06:59 +0200
committerMicael Karlberg <[email protected]>2011-04-15 11:06:59 +0200
commit4bdcd8b56cc6446012542db1df5fba893f0f38f0 (patch)
tree7eec811f49965eee1a242e9ac7e3661bca0a4997 /lib/snmp/test/snmp_manager_user.erl
parent625b265bfe3ba77f7554f8e7a7be29abff9eaaba (diff)
downloadotp-4bdcd8b56cc6446012542db1df5fba893f0f38f0.tar.gz
otp-4bdcd8b56cc6446012542db1df5fba893f0f38f0.tar.bz2
otp-4bdcd8b56cc6446012542db1df5fba893f0f38f0.zip
Sync get-bulk test case for version 3 of the request API.
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r--lib/snmp/test/snmp_manager_user.erl19
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 34f0779e9c..c2b5886c4a 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -56,7 +56,7 @@
async_get_next/1, async_get_next/2, async_get_next/3, async_get_next2/3,
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_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,
name_to_oid/1, oid_to_name/1,
purify_oid/1
@@ -256,6 +256,9 @@ sync_get_bulk(Addr_or_TargetName, NonRep, MaxRep, Oids) ->
sync_get_bulk(Addr, Port, NonRep, MaxRep, Oids) ->
call({sync_get_bulk, Addr, Port, NonRep, MaxRep, Oids}).
+sync_get_bulk2(TargetName, NonRep, MaxRep, Oids, SendOpts) ->
+ call({sync_get_bulk2, TargetName, NonRep, MaxRep, Oids, SendOpts}).
+
%% --
async_get_bulk(NonRep, MaxRep, Oids) ->
@@ -677,6 +680,20 @@ loop(#state{parent = Parent, id = Id} = S) ->
%% -- (sync) get-bulk-request --
%%
+ {{sync_get_bulk2, TargetName, NonRep, MaxRep, Oids, SendOpts}, From, Ref}
+ when is_list(TargetName) ->
+ d("loop -> received sync_get_bulk request with"
+ "~n TargetName: ~p"
+ "~n NonRep: ~w"
+ "~n MaxRep: ~w"
+ "~n Oids: ~p"
+ "~n SendOpts: ~p",
+ [TargetName, NonRep, MaxRep, Oids, SendOpts]),
+ Res = snmpm:sync_get_bulk2(Id, TargetName,
+ NonRep, MaxRep, Oids, SendOpts),
+ reply(From, Res, Ref),
+ loop(S);
+
%% No agent specified, so send it to all of them
{{sync_get_bulk, NonRep, MaxRep, Oids}, From, Ref} ->
d("loop -> received sync_get_bulk request with"