[freeside-commits] freeside/FS/FS/part_export globalpops_voip.pm, 1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Sun Sep 14 17:40:21 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv14751/part_export
Modified Files:
globalpops_voip.pm
Log Message:
add dry_run option to globalpops_voip export
Index: globalpops_voip.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/globalpops_voip.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- globalpops_voip.pm 29 Jun 2008 20:53:34 -0000 1.5
+++ globalpops_voip.pm 15 Sep 2008 00:40:18 -0000 1.6
@@ -12,6 +12,7 @@
'login' => { label=>'GlobalPOPs Media Services API login' },
'password' => { label=>'GlobalPOPs Media Services API password' },
'endpointgroup' => { label=>'GlobalPOPs endpoint group number' },
+ 'dry_run' => { label=>"Test mode - don't actually provision" },
;
%info = (
@@ -253,6 +254,9 @@
sub _export_insert {
my( $self, $svc_phone ) = (shift, shift);
+
+ return '' if $self->option('dry_run');
+
#we want to provision and catch errors now, not queue
my $r = $self->gp_command('reserveDID',
@@ -295,6 +299,8 @@
sub _export_delete {
my( $self, $svc_phone ) = (shift, shift);
+ return '' if $self->option('dry_run');
+
#probably okay to queue the deletion...?
#but hell, let's do it inline anyway, who wants phone numbers hanging around
@@ -325,20 +331,19 @@
}
#hmm, might forgo queueing entirely for most things, data is too much of a pita
-
-sub globalpops_voip_queue {
- my( $self, $svcnum, $method ) = (shift, shift, shift);
- my $queue = new FS::queue {
- 'svcnum' => $svcnum,
- 'job' => 'FS::part_export::globalpops_voip::globalpops_voip_command',
- };
- $queue->insert(
- $self->option('login'),
- $self->option('password'),
- $method,
- @_,
- );
-}
+#sub globalpops_voip_queue {
+# my( $self, $svcnum, $method ) = (shift, shift, shift);
+# my $queue = new FS::queue {
+# 'svcnum' => $svcnum,
+# 'job' => 'FS::part_export::globalpops_voip::globalpops_voip_command',
+# };
+# $queue->insert(
+# $self->option('login'),
+# $self->option('password'),
+# $method,
+# @_,
+# );
+#}
sub globalpops_voip_command {
my($login, $password, $method, @args) = @_;
More information about the freeside-commits
mailing list