[freeside-commits] freeside/FS/FS/part_export netsapiens.pm, 1.6, 1.7
Ivan,,,
ivan at wavetail.420.am
Mon Jul 13 19:53:59 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv8166
Modified Files:
netsapiens.pm
Log Message:
fix netsapiens device provisioning? or at least better debugging, RT#5226
Index: netsapiens.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/netsapiens.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- netsapiens.pm 30 Jun 2009 11:09:23 -0000 1.6
+++ netsapiens.pm 14 Jul 2009 02:53:57 -0000 1.7
@@ -1,12 +1,13 @@
package FS::part_export::netsapiens;
-use vars qw(@ISA %info);
+use vars qw(@ISA $me %info);
use URI;
use MIME::Base64;
use Tie::IxHash;
use FS::part_export;
@ISA = qw(FS::part_export);
+$me = '[FS::part_export::netsapiens]';
tie my %options, 'Tie::IxHash',
'login' => { label=>'NetSapiens tac2 User API username' },
@@ -16,6 +17,7 @@
'device_password' => { label=>'NetSapiens tac2 Device API password' },
'device_url' => { label=>'NetSapiens tac2 Device URL' },
'domain' => { label=>'NetSapiens Domain' },
+ 'debug' => { label=>'Enable debugging', type=>'checkbox' },
;
%info = (
@@ -38,7 +40,7 @@
sub ns_device_command {
my $self = shift;
- $self->_ns_command('device', @_);
+ $self->_ns_command('device_', @_);
}
sub _ns_command {
@@ -59,6 +61,10 @@
$args[0] .= $ns->buildQuery( { @_ } );
}
+ warn "$me $method ". $self->option($prefix.'url').
+ " $command ". join(', ', @_). "\n"
+ if $self->option('debug');
+
my $auth = encode_base64( $self->option($prefix.'login'). ':'.
$self->option($prefix.'password') );
push @args, { 'Authorization' => "Basic $auth" };
More information about the freeside-commits
mailing list