aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_user.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-14 17:11:03 +0200
committerMicael Karlberg <[email protected]>2011-04-14 17:11:03 +0200
commitfe2f0b21b8da7e7a83c74d5bb174d52bfcd380bd (patch)
tree2a2c1e6590fecad49fdb5bf66d97d3d8f21269e3 /lib/snmp/test/snmp_manager_user.erl
parentceb31ba2c09943bf2580f1cc9403905422a7dd44 (diff)
downloadotp-fe2f0b21b8da7e7a83c74d5bb174d52bfcd380bd.tar.gz
otp-fe2f0b21b8da7e7a83c74d5bb174d52bfcd380bd.tar.bz2
otp-fe2f0b21b8da7e7a83c74d5bb174d52bfcd380bd.zip
Sync set test case for version 2 request API.
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r--lib/snmp/test/snmp_manager_user.erl21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl
index cb3f57ad1c..7c4bdbfb0a 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -54,7 +54,7 @@
async_get/1, async_get/2, async_get/3, async_get2/3,
sync_get_next/1, sync_get_next/2, sync_get_next/3, sync_get_next2/3,
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_set/1, sync_set/2, sync_set/3, sync_set2/3,
async_set/1, async_set/2, async_set/3,
sync_get_bulk/3, sync_get_bulk/4, sync_get_bulk/5,
async_get_bulk/3, async_get_bulk/4, async_get_bulk/5,
@@ -228,6 +228,9 @@ sync_set(Addr_or_TargetName, VAV) ->
sync_set(Addr, Port, VAV) ->
call({sync_set, Addr, Port, VAV}).
+sync_set2(TargetName, VAV, SendOpts) ->
+ call({sync_set2, TargetName, VAV, SendOpts}).
+
%% --
async_set(VAV) ->
@@ -464,7 +467,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{async_get2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received async_get request with"
+ d("loop -> received async_get2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -507,7 +510,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{sync_get_next2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received sync_get_next request with"
+ d("loop -> received sync_get_next2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -550,7 +553,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{async_get_next2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received async_get_next request with"
+ d("loop -> received async_get_next2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -591,6 +594,16 @@ loop(#state{parent = Parent, id = Id} = S) ->
%% -- (sync) set-request --
%%
+ {{sync_set2, TargetName, VAV, SendOpts}, From, Ref}
+ when is_list(TargetName) ->
+ d("loop -> received sync_set2 request with"
+ "~n TargetName: ~p"
+ "~n VAV: ~p"
+ "~n SendOpts: ~p", [TargetName, VAV, SendOpts]),
+ Res = snmpm:sync_set2(Id, TargetName, VAV, SendOpts),
+ reply(From, Res, Ref),
+ loop(S);
+
{{sync_set, VAV}, From, Ref} ->
d("loop -> received sync_set request"),
Res = [snmpm:sync_set(Id, TargetName, VAV) ||