[freeside-commits] branch master updated. ed2d4de2ea785d30a54fb069b29f9618a40113c9

Christopher Burger burgerc at freeside.biz
Tue Feb 20 06:16:46 PST 2018


The branch, master has been updated
       via  ed2d4de2ea785d30a54fb069b29f9618a40113c9 (commit)
       via  af38499ce0e858169efba590e29ddddbb035bc4b (commit)
      from  df996b7205c7d1de9e45c60b71f6ca3b7d373b81 (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 ed2d4de2ea785d30a54fb069b29f9618a40113c9
Merge: af38499ce df996b720
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Feb 20 09:15:17 2018 -0500

    Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside


commit af38499ce0e858169efba590e29ddddbb035bc4b
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Feb 20 09:14:06 2018 -0500

    RT# 78356 - Added user documentation

diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm
index 98079cbc4..fc0dee5ad 100644
--- a/FS/FS/part_export/saisei.pm
+++ b/FS/FS/part_export/saisei.pm
@@ -10,8 +10,6 @@ use REST::Client;
 use Data::Dumper;
 use FS::Conf;
 
-#@ISA = qw( FS::part_export::http );
-
 =pod
 
 =head1 NAME
@@ -26,6 +24,19 @@ Saisei integration for Freeside
 
 This export offers basic svc_broadband provisioning for Saisei.
 
+This is a customer integration with Saisei.  This will setup a rate plan and tie
+the rate plan to a host via the Saisei API when the broadband service is provisioned.
+It will also untie the rate  plan via the API upon unprovisioning of the broadband service.
+
+This export will use the broadband service descriptive label for the Saisei rate plan name and
+will use the email from the first contact for the Saisei username that will be
+attached to this rate plan.  It will use the Saisei default Access Point.
+
+Hostname or IP - Host name to Saisei API
+Port - <I>Port number to Saisei API
+User Name -  <I>Saisei API user name
+Password - <I>Saisei API password
+
 This module also provides generic methods for working through the L</Saisei API>.
 
 =cut
@@ -46,18 +57,23 @@ tie my %options, 'Tie::IxHash',
   'desc'            => 'Export broadband service/account to Saisei',
   'options'         => \%options,
   'notes'           => <<'END',
-This is customer integration with Saisei.
+This is a customer integration with Saisei.  This will setup a rate plan and tie 
+the rate plan to a host via the Saisei API when the broadband service is provisioned.  
+It will also untie the rate  plan via the API upon unprovisioning of the broadband service.
+<P>This export will use the broadband service descriptive label for the Saisei rate plan name and
+will use the email from the first contact for the Saisei username that will be
+attached to this rate plan.  It will use the Saisei default Access Point.
+<P>
+Required Fields:
+<UL>
+<LI>Hostname or IP - <I>Host name to Saisei API</I></LI>
+<LI>Port - <I>Port number to Saisei API</I></LI>
+<LI>User Name -  <I>Saisei API user name</I></LI>
+<LI>Password - <I>Saisei API password</I></LI>
+</UL>
 END
 );
 
-#"/STM_IP:5000/rest/top/configurations/running/" is for http 5029 for https
-
-#Creating User Names
-#Users are tracked by their name which gives access to the internal slice data which in turn allows the viewing of  Applications and Geo-Locations.
-#Creating a user name requires a command of the following format: -
-#'put', 'users/USER_NAME', {'description':description}
-#When creating a user name it is usual to add a description and since a user attribute set does not normally contain the users plan name it is best to encode it into the description field.
-
 sub _export_insert {
   my ($self, $svc_broadband) = @_;
   my $rateplan_name = $svc_broadband->{Hash}->{description};
@@ -166,15 +182,10 @@ set in the export options.
 
 =head2 api_call
 
-Accepts I<$service>, I<$method>, I<$params> hashref and optional
-I<$returnfield>.  Places an api call to the specified service
-and method with the specified params.  Returns the decoded json
-object returned by the api call.  If I<$returnfield> is specified,
-returns only that field of the decoded object, and errors out if
-that field does not exist.  Returns empty on failure;  retrieve
-error messages using L</api_error>.
-
-Must run L</api_login> first.
+Accepts I<$method>, I<$path>, I<$params> hashref and optional.
+Places an api call to the specified path and method with the specified params.
+Returns the decoded json object returned by the api call.
+Returns empty on failure;  retrieve error messages using L</api_error>.
 
 =cut
 
@@ -357,7 +368,7 @@ sub api_modify_rateplan {
 
 =head2 api_create_user
 
-Creates a rateplan.
+Creates a user.
 
 =cut
 
@@ -388,6 +399,7 @@ Creates a access point.
 sub api_create_accesspoint {
   my ($self,$accesspoint) = @_;
 
+  # this has not been tested, but should work, if needed.
   #my $new_accesspoint = $self->api_call(
   #    "PUT", 
   #    "/access_points/$accesspoint",
@@ -404,7 +416,7 @@ sub api_create_accesspoint {
 
 =head2 api_add_host_to_user
 
-ties host to user and rateplan.
+ties host to user, rateplan and default access point.
 
 =cut
 
@@ -427,9 +439,9 @@ sub api_add_host_to_user {
 
 }
 
-=head2 api_add_host_to_user
+=head2 api_delete_host_to_user
 
-ties host to user and rateplan.
+unties host to user and rateplan.
 
 =cut
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_export/saisei.pm | 60 +++++++++++++++++++++++++++------------------
 1 file changed, 36 insertions(+), 24 deletions(-)




More information about the freeside-commits mailing list