[freeside-commits] branch FREESIDE_4_BRANCH updated. 7ec949f0738b27d5445ddde765f7f0d3e69918ce
Ivan
ivan at 420.am
Wed Sep 13 14:40:46 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 7ec949f0738b27d5445ddde765f7f0d3e69918ce (commit)
from 98f1a645e6a298a2efcc27ccbd705be1971a0ae3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7ec949f0738b27d5445ddde765f7f0d3e69918ce
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Sep 13 14:40:45 2017 -0700
fiber and DSL http exports, RT#75932
diff --git a/FS/FS/part_export/acct_http.pm b/FS/FS/part_export/acct_http.pm
index 414350b..b84e008 100644
--- a/FS/FS/part_export/acct_http.pm
+++ b/FS/FS/part_export/acct_http.pm
@@ -69,10 +69,16 @@ tie %options, 'Tie::IxHash',
'no_machine' => 1,
'notes' => <<'END'
Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
-modification and deletion. For HTTPS support,
-<a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
-or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
-is required.
+modification and deletion.
+<p>Each "Data" option takes a list of <i>name value</i> pairs on successive
+lines.
+<ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
+<li><i>value</i> is a Perl expression that will be evaluated. If it's a
+literal string, it must be quoted. This expression has access to the
+svc_acct object as '$svc_x' (or '$new' and '$old' in "Replace Data")
+and the customer record as '$cust_main'.</li></ul>
+If "Success Regexp" is specified, the response from the server will be
+tested against it to determine if the export succeeded.</p>
END
);
diff --git a/FS/FS/part_export/broadband_http.pm b/FS/FS/part_export/broadband_http.pm
index 097ff34..cc1e450 100644
--- a/FS/FS/part_export/broadband_http.pm
+++ b/FS/FS/part_export/broadband_http.pm
@@ -58,15 +58,12 @@ tie %options, 'Tie::IxHash',
%info = (
'svc' => 'svc_broadband',
- 'desc' => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
+ 'desc' => 'Send an HTTP or HTTPS GET or POST request, for wireless broadband services.',
'options' => \%options,
'no_machine' => 1,
'notes' => <<'END'
-<p>Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
-modification and deletion. For HTTPS support,
-<a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
-or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
-is required.</p>
+<p>Send an HTTP or HTTPS GET or POST to the specified URL on wireless broadband service addition,
+modification and deletion.
<p>Each "Data" option takes a list of <i>name value</i> pairs on successive
lines.
<ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
diff --git a/FS/FS/part_export/broadband_http.pm b/FS/FS/part_export/dsl_http.pm
similarity index 65%
copy from FS/FS/part_export/broadband_http.pm
copy to FS/FS/part_export/dsl_http.pm
index 097ff34..ac61ec8 100644
--- a/FS/FS/part_export/broadband_http.pm
+++ b/FS/FS/part_export/dsl_http.pm
@@ -1,12 +1,9 @@
-package FS::part_export::broadband_http;
+package FS::part_export::dsl_http;
+use base qw( FS::part_export::http );
-use vars qw( @ISA %info );
-use FS::part_export::http;
use Tie::IxHash;
- at ISA = qw( FS::part_export::http );
-
-tie %options, 'Tie::IxHash',
+tie our %options, 'Tie::IxHash',
'method' => { label =>'Method',
type =>'select',
#options =>[qw(POST GET)],
@@ -20,23 +17,19 @@ tie %options, 'Tie::IxHash',
label => 'Insert data',
type => 'textarea',
default => join("\n",
- "action 'add'",
- "address \$svc_x->ip_addr",
- "name \$cust_main->first.' '.\$cust_main->last",
),
},
'delete_data' => {
label => 'Delete data',
type => 'textarea',
default => join("\n",
- "action 'remove'",
- "address \$svc_x->ip_addr",
),
},
'replace_data' => {
label => 'Replace data',
type => 'textarea',
- default => '',
+ default => join("\n",
+ ),
},
'suspend_data' => {
label => 'Suspend data',
@@ -51,28 +44,25 @@ tie %options, 'Tie::IxHash',
),
},
'success_regexp' => {
- label => 'Success Regexp',
+ label => 'Success Regexp',
default => '',
},
;
%info = (
- 'svc' => 'svc_broadband',
- 'desc' => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
+ 'svc' => 'svc_dsl',
+ 'desc' => 'Send an HTTP or HTTPS GET or POST request, for DSL services.',
'options' => \%options,
'no_machine' => 1,
'notes' => <<'END'
-<p>Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
-modification and deletion. For HTTPS support,
-<a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
-or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
-is required.</p>
+Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
+modification and deletion.
<p>Each "Data" option takes a list of <i>name value</i> pairs on successive
lines.
<ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
<li><i>value</i> is a Perl expression that will be evaluated. If it's a
literal string, it must be quoted. This expression has access to the
-svc_broadband object as '$svc_x' (or '$new' and '$old' in "Replace Data")
+svc_dsl object as '$svc_x' (or '$new' and '$old' in "Replace Data")
and the customer record as '$cust_main'.</li></ul>
If "Success Regexp" is specified, the response from the server will be
tested against it to determine if the export succeeded.</p>
diff --git a/FS/FS/part_export/broadband_http.pm b/FS/FS/part_export/fiber_http.pm
similarity index 65%
copy from FS/FS/part_export/broadband_http.pm
copy to FS/FS/part_export/fiber_http.pm
index 097ff34..38b23c4 100644
--- a/FS/FS/part_export/broadband_http.pm
+++ b/FS/FS/part_export/fiber_http.pm
@@ -1,12 +1,9 @@
-package FS::part_export::broadband_http;
+package FS::part_export::fiber_http;
+use base qw( FS::part_export::http );
-use vars qw( @ISA %info );
-use FS::part_export::http;
use Tie::IxHash;
- at ISA = qw( FS::part_export::http );
-
-tie %options, 'Tie::IxHash',
+tie our %options, 'Tie::IxHash',
'method' => { label =>'Method',
type =>'select',
#options =>[qw(POST GET)],
@@ -20,23 +17,19 @@ tie %options, 'Tie::IxHash',
label => 'Insert data',
type => 'textarea',
default => join("\n",
- "action 'add'",
- "address \$svc_x->ip_addr",
- "name \$cust_main->first.' '.\$cust_main->last",
),
},
'delete_data' => {
label => 'Delete data',
type => 'textarea',
default => join("\n",
- "action 'remove'",
- "address \$svc_x->ip_addr",
),
},
'replace_data' => {
label => 'Replace data',
type => 'textarea',
- default => '',
+ default => join("\n",
+ ),
},
'suspend_data' => {
label => 'Suspend data',
@@ -51,28 +44,25 @@ tie %options, 'Tie::IxHash',
),
},
'success_regexp' => {
- label => 'Success Regexp',
+ label => 'Success Regexp',
default => '',
},
;
%info = (
- 'svc' => 'svc_broadband',
- 'desc' => 'Send an HTTP or HTTPS GET or POST request, for accounts.',
+ 'svc' => 'svc_fiber',
+ 'desc' => 'Send an HTTP or HTTPS GET or POST request, for FTTx services.',
'options' => \%options,
'no_machine' => 1,
'notes' => <<'END'
-<p>Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
-modification and deletion. For HTTPS support,
-<a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
-or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
-is required.</p>
+Send an HTTP or HTTPS GET or POST to the specified URL on account addition,
+modification and deletion.
<p>Each "Data" option takes a list of <i>name value</i> pairs on successive
lines.
<ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
<li><i>value</i> is a Perl expression that will be evaluated. If it's a
literal string, it must be quoted. This expression has access to the
-svc_broadband object as '$svc_x' (or '$new' and '$old' in "Replace Data")
+svc_fiber object as '$svc_x' (or '$new' and '$old' in "Replace Data")
and the customer record as '$cust_main'.</li></ul>
If "Success Regexp" is specified, the response from the server will be
tested against it to determine if the export succeeded.</p>
@@ -80,3 +70,4 @@ END
);
1;
+
diff --git a/FS/FS/part_export/http.pm b/FS/FS/part_export/http.pm
index 42a35cb..43ccfc5 100644
--- a/FS/FS/part_export/http.pm
+++ b/FS/FS/part_export/http.pm
@@ -59,14 +59,21 @@ tie %options, 'Tie::IxHash',
%info = (
'svc' => 'svc_domain',
- 'desc' => 'Send an HTTP or HTTPS GET or POST request',
+ 'desc' => 'Send an HTTP or HTTPS GET or POST request, for domains1',
'options' => \%options,
'no_machine' => 1,
'notes' => <<'END'
-Send an HTTP or HTTPS GET or POST to the specified URL. For HTTPS support,
-<a href="http://search.cpan.org/dist/Crypt-SSLeay">Crypt::SSLeay</a>
-or <a href="http://search.cpan.org/dist/IO-Socket-SSL">IO::Socket::SSL</a>
-is required.
+Send an HTTP or HTTPS GET or POST to the specified URL on domain addition,
+modification and deletion.
+<p>Each "Data" option takes a list of <i>name value</i> pairs on successive
+lines.
+<ul><li><i>name</i> is an unquoted, literal string without whitespace.</li>
+<li><i>value</i> is a Perl expression that will be evaluated. If it's a
+literal string, it must be quoted. This expression has access to the
+svc_domain object as '$svc_x' (or '$new' and '$old' in "Replace Data")
+and the customer record as '$cust_main'.</li></ul>
+If "Success Regexp" is specified, the response from the server will be
+tested against it to determine if the export succeeded.</p>
END
);
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_export/acct_http.pm | 14 ++++++---
FS/FS/part_export/broadband_http.pm | 9 ++----
.../part_export/{broadband_http.pm => dsl_http.pm} | 32 +++++++------------
.../{broadband_http.pm => fiber_http.pm} | 33 +++++++-------------
FS/FS/part_export/http.pm | 17 +++++++---
5 files changed, 48 insertions(+), 57 deletions(-)
copy FS/FS/part_export/{broadband_http.pm => dsl_http.pm} (65%)
copy FS/FS/part_export/{broadband_http.pm => fiber_http.pm} (65%)
More information about the freeside-commits
mailing list