1 package FS::part_export::ikano;
3 use vars qw(@ISA %info);
5 use Date::Format qw( time2str );
6 use FS::Record qw(qsearch dbh);
10 @ISA = qw(FS::part_export);
12 tie my %options, 'Tie::IxHash',
13 'keyid' => { label=>'Ikano keyid' },
14 'username' => { label=>'Ikano username',
17 'password' => { label=>'Ikano password' },
18 'check_networks' => { label => 'Check Networks',
19 default => 'ATT,BELLCA',
25 'desc' => 'Provision DSL to Ikano',
26 'options' => \%options,
28 Requires installation of
29 <a href="http://search.cpan.org/dist/Net-Ikano">Net::Ikano</a> from CPAN.
33 sub rebless { shift; }
40 my($self,$svc_dsl) = (shift,shift,shift,shift);
41 my %orderTypes = ( 'N' => 'New', 'X' => 'Cancel', 'C' => 'Change' );
42 my %orderStatus = ( 'N' => 'New', 'P' => 'Pending', 'X' => 'Cancelled',
43 'C' => 'Completed', 'E' => 'Error' );
44 return "Ikano ".$orderTypes{$svc_dsl->vendor_order_type}." order #"
45 . $svc_dsl->vendor_order_id . " (Status: "
46 . $orderStatus{$svc_dsl->vendor_order_status} . ")";
51 return "Standalone" if $svc_dsl->loop_type eq '0';
56 my( $self, $command, @args ) = @_;
58 eval "use Net::Ikano;";
61 my $ikano = Net::Ikano->new(
62 'keyid' => $self->option('keyid'),
63 'username' => $self->option('username'),
64 'password' => $self->option('password'),
68 $ikano->$command(@args);
72 my( $self, $svc_dsl ) = (shift, shift);
77 my( $self, $new, $old ) = (shift, shift, shift);
82 my( $self, $svc_dsl ) = (shift, shift);
87 my( $self, $svc_dsl ) = (shift, shift);
91 sub _export_unsuspend {
92 my( $self, $svc_dsl ) = (shift, shift);