=cut
push @$rules,
- 'GetParameterAttributesResponse' => sub {
+ 'ParameterAttributeStruct' => sub {
my ($tag_name, $tag_hash, $context, $parent_data) = @_;
warn dump( $tag_name, $tag_hash, $context );
+
+ confess "need state" unless ( $state ); # don't remove!
+
+ my $name = _tag($tag_hash, 'Name', '_content');
+
+
+ $state->{ParameterAttribute}->{$name} = {
+ Notification => _tag($tag_hash, 'Notification', '_content' ),
+ AccessList => _tag($tag_hash, 'AccessList', 'string' ),
+ };
+
$state->{_trigger} = 'GetParameterAttributesResponse';
};
my $debug = shift @ARGV;
-use Test::More tests => 144;
+use Test::More tests => 153;
use Data::Dump qw/dump/;
use Cwd qw/abs_path/;
use File::Find;
--- /dev/null
+POST / HTTP/1.1
+Host: 10.0.0.100
+User-Agent: Thomson_cwmp-engine/r7.4.1.7
+Content-Length: 1184
+Content-Type: text/xml; charset=ISO-8859-1
+Cookie: $Version="0"; ID=11_THOM_TR69_ID;$Path=/
+SOAPAction:
+
+<soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">\r
+ <soapenv:Header>\r
+<cwmp:ID soapenv:mustUnderstand="1">11_THOM_TR69_ID</cwmp:ID>\r
+ </soapenv:Header>\r
+ <soapenv:Body>\r
+ <cwmp:GetParameterAttributesResponse> <ParameterList soap:arrayType="cwmp:ParameterAttributeStruct[02]"> <ParameterAttributeStruct> <Name>InternetGatewayDevice.DeviceInfo.SerialNumber</Name>\r
+ <Notification>0</Notification>\r
+ <AccessList soap:arrayType="cwmp:string[01]"> <string>subscriber</string>\r
+</AccessList>\r
+</ParameterAttributeStruct>\r
+ <ParameterAttributeStruct> <Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>\r
+ <Notification>0</Notification>\r
+ <AccessList soap:arrayType="cwmp:string[01]"> <string>subscriber</string>\r
+</AccessList>\r
+</ParameterAttributeStruct>\r
+</ParameterList>\r
+</cwmp:GetParameterAttributesResponse>\r
+ </soapenv:Body>\r
+</soapenv:Envelope>
--- /dev/null
+---
+ID: 11_THOM_TR69_ID
+ParameterAttribute:
+ InternetGatewayDevice.DeviceInfo.SerialNumber:
+ AccessList:
+ - subscriber
+ Notification: 0
+ InternetGatewayDevice.DeviceInfo.SoftwareVersion:
+ AccessList:
+ - subscriber
+ Notification: 0
+_trigger: GetParameterAttributesResponse