From: Dobrica Pavlinusic Date: Mon, 8 Mar 2010 13:32:19 +0000 (+0000) Subject: configure ACS server to ZTE CPE X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=commitdiff_plain;h=014c5a715be8ba287056e3571acf9c932ff53ed6;ds=sidebyside configure ACS server to ZTE CPE git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@275 836a5e1a-633d-0410-964b-294494ad4392 --- diff --git a/scripts/zte-configure-acs.pl b/scripts/zte-configure-acs.pl new file mode 100755 index 0000000..65ee54a --- /dev/null +++ b/scripts/zte-configure-acs.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +my $acs = 'http://192.168.2.100:3333'; +my $cpe = 'http://192.168.2.1'; + +use WWW::Mechanize; +my $mech = WWW::Mechanize->new(); + +$mech->get( $cpe ); + +$mech->submit_form( + form_number => 1, + fields => { + tUsername => 'admin', + tPassword => 'admin', + } +); + +$mech->follow_link( text_regex => qr/Advanced/ ); + +$mech->follow_link( text_regex => qr/TR069/ ); + +#$mech->dump_forms; +#$mech->dump_links; +#$mech->dump_all; + +my $uid = 'time-' . time(); + +$mech->submit_form( + form_number => 2, + fields => { + _ACS_URL => $acs, + _ACS_NAME => $uid, + _ENABLE => '_ENABLE', + } +); + + +warn $uid; +