~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/snmp/test/snmp_manager_test.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%% 
2
2
%% %CopyrightBegin%
3
 
%% 
4
 
%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
5
 
%% 
 
3
%%
 
4
%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
 
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
11
 
%% 
 
11
%%
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
16
 
%% 
 
16
%%
17
17
%% %CopyrightEnd%
18
18
%% 
19
19
 
111
111
 
112
112
         tickets/1,
113
113
         otp8015/1,
114
 
         otp8015_1/1
 
114
         otp8015_1/1, 
 
115
         otp8395/1,
 
116
         otp8395_1/1
115
117
 
116
118
        ]).
117
119
 
240
242
         simple_async_set2, 
241
243
         simple_sync_get_bulk2, 
242
244
         simple_async_get_bulk2,
243
 
         misc_async2
 
245
         misc_async2,
 
246
         otp8395_1
244
247
        ],
245
 
    Cases = [
246
 
             trap1,
247
 
             trap2,
248
 
             inform1,
249
 
             inform2,
250
 
             inform3,
251
 
             inform4,
252
 
             inform_swarm,
253
 
             report
254
 
            ] ++ OldApiCases ++ NewApiCases,
 
248
    Cases = 
 
249
        [
 
250
         trap1,
 
251
         trap2,
 
252
         inform1,
 
253
         inform2,
 
254
         inform3,
 
255
         inform4,
 
256
         inform_swarm,
 
257
         report
 
258
        ] ++ 
 
259
        OldApiCases ++ 
 
260
        NewApiCases,
255
261
    case lists:member(Case, Cases) of
256
262
        true ->
257
263
            NoAutoInformCases = [inform1, inform2, inform3, inform_swarm], 
265
271
                                    {agent_verbosity,              info}, 
266
272
                                    {agent_net_if_verbosity,       info}],
267
273
                            Verb ++ Config;
 
274
                        Case =:= otp8395_1 ->
 
275
                            [{manager_atl_seqno, true} | Config];
268
276
                        true ->
269
277
                            Config
270
278
                    end,
315
323
         simple_async_set2, 
316
324
         simple_sync_get_bulk2, 
317
325
         simple_async_get_bulk2,
318
 
         misc_async2
 
326
         misc_async2,
 
327
         otp8395_1
319
328
        ],
320
 
    Cases = [
321
 
             trap1,
322
 
             trap2,
323
 
             inform1,
324
 
             inform2,
325
 
             inform3,
326
 
             inform4,
327
 
             inform_swarm,
328
 
             report
329
 
            ] ++ OldApiCases ++ NewApiCases,
 
329
    Cases = 
 
330
        [
 
331
         trap1,
 
332
         trap2,
 
333
         inform1,
 
334
         inform2,
 
335
         inform3,
 
336
         inform4,
 
337
         inform_swarm,
 
338
         report
 
339
        ] ++ 
 
340
        OldApiCases ++ 
 
341
        NewApiCases,
330
342
    case lists:member(Case, Cases) of
331
343
        true ->
332
344
            Conf1 = case lists:member(Case, NewApiCases) of
446
458
 
447
459
tickets(suite) ->
448
460
    [
449
 
     otp8015
 
461
     otp8015,
 
462
     otp8395
450
463
    ].
451
464
 
452
465
otp8015(suite) ->
454
467
     otp8015_1
455
468
    ].
456
469
 
 
470
otp8395(suite) ->
 
471
    [
 
472
     otp8395_1
 
473
    ].
 
474
 
457
475
 
458
476
%%======================================================================
459
477
%% Test functions
1372
1390
simple_sync_get2(Config) when is_list(Config) ->
1373
1391
    process_flag(trap_exit, true),
1374
1392
    put(tname, ssg2),
 
1393
    do_simple_get(Config).
 
1394
 
 
1395
do_simple_get(Config) ->
1375
1396
    p("starting with Config: ~p~n", [Config]),
1376
1397
 
1377
1398
    Node       = ?config(manager_node, Config),
1386
1407
    Oids2 = [[sysObjectID, 0], [sysDescr, 0], [sysUpTime, 0]],
1387
1408
    ?line ok = do_simple_get(Node, TargetName, Oids2),
1388
1409
    ok.
1389
 
 
 
1410
    
1390
1411
do_simple_get(Node, TargetName, Oids) ->
1391
1412
    ?line {ok, Reply, Rem} = mgr_user_sync_get(Node, TargetName, Oids),
1392
1413
 
4438
4459
 
4439
4460
 
4440
4461
%%======================================================================
 
4462
 
 
4463
otp8395_1(doc) -> ["OTP-8395:1 - simple get with ATL sequence numbering."];
 
4464
otp8395_1(suite) -> [];
 
4465
otp8395_1(Config) when is_list(Config) ->
 
4466
    process_flag(trap_exit, true),
 
4467
    put(tname, otp8395_1),
 
4468
    do_simple_get(Config).
 
4469
 
 
4470
 
 
4471
%%======================================================================
4441
4472
%% async snmp utility functions
4442
4473
%%======================================================================
4443
4474
 
5063
5094
    ServerVerbosity    = get_opt(manager_server_verbosity,     Conf0, trace),
5064
5095
    NetIfVerbosity     = get_opt(manager_net_if_verbosity,     Conf0, trace),
5065
5096
 
 
5097
    AtlSeqNo           = get_opt(manager_atl_seqno,            Conf0, false),
 
5098
 
5066
5099
    Env = [{versions,                     Vsns},
5067
5100
           {inform_request_behaviour,     IRB},
5068
5101
           {audit_trail_log, [{type,      read_write},
5069
5102
                              {dir,       AtlDir},
5070
5103
                              {size,      {10240, 10}},
5071
 
                              {repair,    true}]},
 
5104
                              {repair,    true},
 
5105
                              {seqno,     AtlSeqNo}]},
5072
5106
           {config,          [{dir,       ConfDir}, 
5073
5107
                              {db_dir,    DbDir}, 
5074
5108
                              {verbosity, ConfigVerbosity}]},