X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=blobdiff_plain;f=bin%2Fcpe-queue.pl;h=55a8f8f341ff331905033d90682b390e497f0889;hp=6b6a008e22b331fea083af3701b006dbe004b4a4;hb=16a1d03c9f1a8269ab47083cf267c37319300b83;hpb=35e5be71b934e7bd7898d3e86ea42e1592c7cfb8 diff --git a/bin/cpe-queue.pl b/bin/cpe-queue.pl index 6b6a008..55a8f8f 100755 --- a/bin/cpe-queue.pl +++ b/bin/cpe-queue.pl @@ -21,7 +21,7 @@ GetOptions( 'list!' => \$list, ); -die "usage: $0 CPE_id [--protocol-dump]\n" unless @ARGV; +die "usage: $0 [...queue/]CPE_id [--list|--protocol-dump]\n" unless @ARGV; foreach my $id ( @ARGV ) { @@ -114,30 +114,59 @@ foreach my $id ( @ARGV ) { warn "injecting some tests commands\n"; - $q->enqueue( 'GetRPCMethods' ); +# $q->enqueue( 'GetRPCMethods' ); # XXX not supported by ZTE - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.LANDevice.', 1 ] ); + $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.', 1 ] ); - # $q->enqueue( 'GetParameterValues', [ - # 'InternetGatewayDevice.', - # ]); + $q->enqueue( 'GetParameterValues', [ + 'InternetGatewayDevice.', + ]); - # $q->enqueue( 'GetParameterNames', [ '.ExternalIPAddress', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.DeviceInfo.', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.DeviceConfig.', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.ManagementServer.', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.Services.', 1 ] ); - # $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.LANDevice.', 1 ] ); + # turn on periodic reporting to ACS server + + $q->enqueue( 'GetParameterValues', [ 'InternetGatewayDevice.ManagementServer.' ] ); + $q->enqueue( 'SetParameterValues', { + 'InternetGatewayDevice.ManagementServer.PeriodicInformEnable' => 1, + 'InternetGatewayDevice.ManagementServer.PeriodicInformInterval' => 15, # s + } ); + $q->enqueue( 'GetParameterValues', [ 'InternetGatewayDevice.ManagementServer.' ] ); + + +# $q->enqueue( 'GetParameterNames', [ '.ExternalIPAddress', 1 ] ); + + $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.', 1 ] ); +# $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.DeviceInfo.', 1 ] ); +# $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.DeviceConfig.', 1 ] ); +# $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.ManagementServer.', 1 ] ); +# $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.Services.', 1 ] ); +# $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.LANDevice.', 1 ] ); $q->enqueue( 'GetParameterNames', [ 'InternetGatewayDevice.', 0 ] ); $q->enqueue( 'GetParameterValues', [ - 'InternetGatewayDevice.', + #'InternetGatewayDevice.', # too big for ZTE + 'InternetGatewayDevice.DeviceConfig.', + 'InternetGatewayDevice.DeviceInfo.', + 'InternetGatewayDevice.DeviceSummary', + 'InternetGatewayDevice.ManagementServer.', ]); + $q->enqueue( 'GetParameterValues' => [ $_ ] ) foreach ( qw/ +InternetGatewayDevice.IPPingDiagnostics. +InternetGatewayDevice.LANConfigSecurity. +InternetGatewayDevice.LANDevice. +InternetGatewayDevice.Layer2Bridging. +InternetGatewayDevice.Layer3Forwarding. +InternetGatewayDevice.ManagementServer. +InternetGatewayDevice.QueueManagement. +InternetGatewayDevice.Time. +InternetGatewayDevice.UserInterface. +InternetGatewayDevice.WANDevice. + / ); + $q->enqueue( 'GetParameterAttributes', [ 'InternetGatewayDevice.DeviceInfo.SerialNumber', + 'InternetGatewayDevice.DeviceInfo.SoftwareVersion', ]); # $q->enqueue( 'SetParameterAttributes', [ '