X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=bin%2Facs.pl;h=36750881b3f927ce5630aecce7fe431f1f147337;hb=4c0e11c9fce3d7cdffc724ae4b3b9754edf72e82;hp=461aca850b100c464b009f5e2caa0d2b9d6e3713;hpb=6ce75d1058721ecaf61a4db0256bb82ab9e44821;p=perl-cwmp.git diff --git a/bin/acs.pl b/bin/acs.pl index 461aca8..3675088 100755 --- a/bin/acs.pl +++ b/bin/acs.pl @@ -8,38 +8,39 @@ use strict; use lib './lib'; use CWMP::Server; +use CWMP::Session; +use CWMP::Vendor; use Getopt::Long; +use Data::Dump qw/dump/; my $port = 3333; my $debug = 0; my $store_path = './'; my $store_plugin = 'YAML'; +my $create_dump = 1; GetOptions( 'debug+' => \$debug, 'port=i' => \$port, 'store-path=s' => \$store_path, 'store-plugin=s' => \$store_plugin, + 'create_dump!' => \$create_dump, ); my $server = CWMP::Server->new({ port => $port, - store => { - module => $store_plugin, - path => $store_path, - debug => $debug, + session => { + store => { + module => $store_plugin, + path => $store_path, + debug => $debug, + }, + create_dump => $create_dump, }, debug => $debug, - default_queue => [ - 'GetRPCMethods', - [ 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.SerialNumber', 0 ], - [ 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.', 1 ], - [ 'GetParameterValues', - 'InternetGatewayDevice.DeviceInfo.SerialNumber', - 'InternetGatewayDevice.DeviceInfo.VendorConfigFile.', - ], -# 'Reboot', - ], }); + +CWMP::Vendor->add_triggers; + $server->run();