From 48cab6f96369ca68934796fc374d0e8a5eca8a2c Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 26 Dec 2007 22:52:38 +0000 Subject: [PATCH] conifgurable siteName and docs --- FS/FS/part_export/prizm.pm | 68 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm index 33c53f3ae..c5eff2536 100644 --- a/FS/FS/part_export/prizm.pm +++ b/FS/FS/part_export/prizm.pm @@ -13,14 +13,75 @@ tie %options, 'Tie::IxHash', 'user' => { label => 'Northbound username', default=>'nbi' }, 'password' => { label => 'Password', default => '' }, 'ems' => { label => 'Full EMS', type => 'checkbox' }, + 'element_name_length' => { label => 'Size of siteName (best left blank)' }, ; +my $notes = <<'EOT'; +Real-time export of svc_broadband, cust_pkg, and cust_main +record data to Motorola +Canopy Prizm +software via the Northbound interface.

+ +Freeside will attempt to create an element in an existing network with the +values provided in svc_broadband. Of particular interest are + + +In addition freeside attempts to set the service plan name in prizm to the +name of the package in which the service resides. + +The service is associated with a customer in prizm as well, and freeside +will create the customer should none already exist with import id matching +the freeside customer number. The following fields are set. + + + + Additionally set on the element are + + +Freeside provisions, suspends, and unsuspends elements BAM only unless the +'Full EMS' checkbox is checked.

+ +When freeside provisions an element the siteName is copied internally by +prizm in such a manner that it is possible for the value to exceed the size +of the column used in the prizm database. Therefore freeside truncates +by default this value to 50 characters. It is thought that this +column is the account_name column of the element_user_account table. It +may be possible to lift this limit by modifying the prizm database and +setting a new appropriate value on this export. This is untested and +possibly harmful. + +EOT + %info = ( 'svc' => 'svc_broadband', 'desc' => 'Real-time export to Northbound Interface', 'options' => \%options, 'nodomain' => 'Y', - 'notes' => 'These are notes.' + 'notes' => $notes, ); sub prizm_command { @@ -138,11 +199,14 @@ sub _export_insert { # } # } + my $element_name_length = 50; + $element_name_length = $1 + if $self->option('element_name_length') =~ /^\s*(\d+)\s*$/; $err_or_som = $self->prizm_command('NetworkIfService', 'addProvisionedElement', $networkid, $svc->mac_addr, substr($name . " " . $svc->description, - 0, 150), + 0, $element_name_length), $location, $contact, sprintf("%032X", $svc->authkey), -- 2.11.0