aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-01 12:07:23 +0200
committerMicael Karlberg <[email protected]>2011-04-01 12:07:23 +0200
commit2b46b0e42fe95d99619ffa343537c8468e27295c (patch)
tree9f01a4f4a6ad597299aa5a74e5e50a58e9d5812b /lib/snmp
parent537f010d6fe871d55c3becb02fe6ebb73dc2d55a (diff)
parent49737813349f164b35737eb3cd59491930128f58 (diff)
downloadotp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.gz
otp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.bz2
otp-2b46b0e42fe95d99619ffa343537c8468e27295c.zip
Merge branch 'bmk/snmp/manager/deprecate_old_api/OTP-9174' into bmk/snmp/snmp420_integration
Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src
Diffstat (limited to 'lib/snmp')
-rw-r--r--lib/snmp/doc/src/notes.xml24
-rw-r--r--lib/snmp/src/app/snmp.appup.src40
-rw-r--r--lib/snmp/src/manager/snmpm.erl135
-rw-r--r--lib/snmp/test/Makefile2
4 files changed, 73 insertions, 128 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 8dd5bcb2c0..f5fa7065fb 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -51,6 +51,13 @@
<seealso marker="snmp_target_mib#add_addr">add_addr/11</seealso> for more info. </p>
<p>Own Id: OTP-9088</p>
<p>Aux Id: Seq 11790</p>
+ </item>
+
+ <item>
+ <p>[manager] The old API functions (for get and set
+ requests) are now officially deprecated.
+ They will be removed as of R16B. </p>
+ <p>Own Id: OTP-9174</p>
</item>
</list>
@@ -60,17 +67,13 @@
<title>Fixed Bugs and Malfunctions</title>
<p>-</p>
<!--
+ <list type="bulleted">
<item>
- <p>[agent] When calling
- <seealso marker="snmp_view_based_acm_mib#reconfigure">snmp_view_based_acm_mib:reconfigure/1</seealso>
- on a running node, the table <c>vacmAccessTable</c> was not properly
- cleaned.
- This meant that if some entries in the vacm.conf file was removed
- (compared to the <c>current</c> config),
- while others where modified and/or added, the removed entrie(s)
- would still exist in the <c>vacmAccessTable</c> table. </p>
- <p>Own Id: OTP-8981</p>
- <p>Aux Id: Seq 11750</p>
+ <p>[agent] For the table vacmAccessTable,
+ when performing the is_set_ok and set operation(s),
+ all values of the vacmAccessSecurityModel column was
+ incorrectly translated to <c>any</c>. </p>
+ <p>Own Id: OTP-8980</p>
</item>
</list>
@@ -85,6 +88,7 @@
</section> <!-- 4.20 -->
+
<section>
<title>SNMP Development Toolkit 4.19</title>
<p>Version 4.19 supports code replacement in runtime from/to
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index db2b3ededb..fd9f40caa0 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -24,14 +24,16 @@
[
{"4.19",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa_conf, soft_purge, soft_purge,
[snmp_notification_mib]},
{load_module, snmp_notification_mib, soft_purge, soft_purge,
@@ -46,20 +48,17 @@
},
{"4.18",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
+ {load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_config, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_conf, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
- {load_module, snmpa_conf, soft_purge, soft_purge,
- [snmp_notification_mib]},
- {load_module, snmp_notification_mib, soft_purge, soft_purge,
- [snmp_conf, snmp_target_mib]},
-
- {load_module, snmp_misc, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa, soft_purge, soft_purge,
[snmp_community_mib,
snmp_framework_mib,
@@ -67,6 +66,8 @@
snmp_target_mib,
snmp_user_based_sm_mib,
snmp_view_based_acm_mib]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge,
+ [snmp_conf, snmp_target_mib, snmpa_mib_lib]},
{load_module, snmp_community_mib, soft_purge, soft_purge,
[snmpa_mib_lib]},
{load_module, snmp_framework_mib, soft_purge, soft_purge,
@@ -94,14 +95,16 @@
[
{"4.19",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa_conf, soft_purge, soft_purge,
[snmp_notification_mib]},
{load_module, snmp_notification_mib, soft_purge, soft_purge,
@@ -116,20 +119,17 @@
},
{"4.18",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
+ {load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
- {load_module, snmpa_conf, soft_purge, soft_purge,
- [snmp_notification_mib]},
- {load_module, snmp_notification_mib, soft_purge, soft_purge,
- [snmp_conf, snmp_target_mib]},
-
- {load_module, snmp_misc, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa, soft_purge, soft_purge,
[snmp_community_mib,
snmp_framework_mib,
@@ -137,6 +137,8 @@
snmp_target_mib,
snmp_user_based_sm_mib,
snmp_view_based_acm_mib]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge,
+ [snmp_conf, snmp_target_mib, snmpa_mib_lib]},
{load_module, snmp_community_mib, soft_purge, soft_purge,
[snmpa_mib_lib]},
{load_module, snmp_framework_mib, soft_purge, soft_purge,
diff --git a/lib/snmp/src/manager/snmpm.erl b/lib/snmp/src/manager/snmpm.erl
index 5b6321b4c3..36b4901e9a 100644
--- a/lib/snmp/src/manager/snmpm.erl
+++ b/lib/snmp/src/manager/snmpm.erl
@@ -92,6 +92,43 @@
-export([format_reason/1, format_reason/2]).
%% Backward compatibillity exports
+-deprecated({agent_info, 3}).
+-deprecated({update_agent_info, 5}).
+-deprecated({g, 3}).
+-deprecated({g, 4}).
+-deprecated({g, 5}).
+-deprecated({g, 6}).
+-deprecated({g, 7}).
+-deprecated({ag, 3}).
+-deprecated({ag, 4}).
+-deprecated({ag, 5}).
+-deprecated({ag, 6}).
+-deprecated({ag, 7}).
+-deprecated({gn, 3}).
+-deprecated({gn, 4}).
+-deprecated({gn, 5}).
+-deprecated({gn, 6}).
+-deprecated({gn, 7}).
+-deprecated({agn, 3}).
+-deprecated({agn, 4}).
+-deprecated({agn, 5}).
+-deprecated({agn, 6}).
+-deprecated({agn, 7}).
+-deprecated({gb, 5}).
+-deprecated({gb, 6}).
+-deprecated({gb, 7}).
+-deprecated({gb, 8}).
+-deprecated({gb, 9}).
+-deprecated({s, 3}).
+-deprecated({s, 4}).
+-deprecated({s, 5}).
+-deprecated({s, 6}).
+-deprecated({s, 7}).
+-deprecated({as, 3}).
+-deprecated({as, 4}).
+-deprecated({as, 5}).
+-deprecated({as, 6}).
+-deprecated({as, 7}).
-export([
agent_info/3, update_agent_info/5,
g/3, g/4, g/5, g/6, g/7,
@@ -393,24 +430,12 @@ agent_info(Addr, Port, Item) ->
end.
update_agent_info(UserId, TargetName, Item, Val) ->
-%% p("update_agent_info -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Item: ~p"
-%% "~n Val: ~p", [UserId, TargetName, Item, Val]),
snmpm_config:update_agent_info(UserId, TargetName, Item, Val).
%% Backward compatibillity functions
update_agent_info(UserId, Addr, Port, Item, Val) ->
-%% p("update_agent_info -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Item: ~p"
-%% "~n Val: ~p", [UserId, Addr, Port, Item, Val]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("update_agent_info -> TargetName: ~p", [TargetName]),
update_agent_info(UserId, TargetName, Item, Val);
Error ->
Error
@@ -473,93 +498,39 @@ which_usm_users(EngineID) when is_list(EngineID) ->
%%
sync_get(UserId, TargetName, Oids) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Oids: ~p", [UserId, TargetName, Oids]),
sync_get(UserId, TargetName, ?DEFAULT_CONTEXT, Oids).
sync_get(UserId, TargetName, Context, Oids) when is_list(Oids) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p", [UserId, TargetName, Context, Oids]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids);
sync_get(UserId, TargetName, Oids, Timeout) when is_integer(Timeout) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, TargetName, Oids, Timeout]),
sync_get(UserId, TargetName, ?DEFAULT_CONTEXT, Oids, Timeout).
sync_get(UserId, TargetName, Context, Oids, Timeout) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, TargetName, Context, Oids, Timeout]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids, Timeout).
sync_get(UserId, TargetName, Context, Oids, Timeout, ExtraInfo) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p"
-%% "~n ExtraInfo: ~p",
-%% [UserId, TargetName, Context, Oids, Timeout, ExtraInfo]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids, Timeout,
ExtraInfo).
g(UserId, Addr, Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Oids]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, Oids).
g(UserId, Addr, CtxName, Oids) when is_list(CtxName) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p", [UserId, Addr, CtxName, Oids]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, CtxName, Oids);
g(UserId, Addr, Port, Oids) when is_integer(Port) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Port, Oids]),
g(UserId, Addr, Port, ?DEFAULT_CONTEXT, Oids);
g(UserId, Addr, Oids, Timeout)
when is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, Addr, Oids, Timeout]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, Oids, Timeout).
g(UserId, Addr, Port, CtxName, Oids)
when is_integer(Port) andalso is_list(CtxName) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Port, CtxName, Oids]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids);
Error ->
Error
@@ -567,55 +538,23 @@ g(UserId, Addr, Port, CtxName, Oids)
g(UserId, Addr, Port, Oids, Timeout)
when is_integer(Port) andalso is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, Oids, Timeout]),
g(UserId, Addr, Port, ?DEFAULT_CONTEXT, Oids, Timeout);
g(UserId, Addr, CtxName, Oids, Timeout)
when is_list(CtxName) andalso is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, CtxName, Oids, Timeout]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, CtxName, Oids, Timeout).
g(UserId, Addr, Port, CtxName, Oids, Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, Port, CtxName, Oids, Timeout]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids, Timeout);
Error ->
Error
end.
g(UserId, Addr, Port, CtxName, Oids, Timeout, ExtraInfo) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p"
-%% "~n ExtraInfo: ~p",
-%% [UserId, Addr, Port, CtxName, Oids, Timeout, ExtraInfo]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo);
Error ->
Error
diff --git a/lib/snmp/test/Makefile b/lib/snmp/test/Makefile
index 86af2460f5..b7975024b4 100644
--- a/lib/snmp/test/Makefile
+++ b/lib/snmp/test/Makefile
@@ -227,7 +227,7 @@ release_spec:
release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(RELTEST_FILES) $(COVER_SPEC_FILE) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
tar cf - snmp_test_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec: