diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2019-04-21 16:14:13 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2019-04-21 22:01:12 -0400 |
| commit | aa55eded7431d4781b7105b9b895f4b20e575f01 (patch) | |
| tree | 4dd33af324057d66ee0c2361c4a0818982f34f0a /FS | |
| parent | 609e7cb967020e23f147f4e1b475fed97e37db30 (diff) | |
RT# 83039 - only towers with sectors shown on provisioning page when export requires sectors
Conflicts:
httemplate/elements/select-table.html
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/part_export/saisei.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm index 70eea99d9..a28be6f0c 100644 --- a/FS/FS/part_export/saisei.pm +++ b/FS/FS/part_export/saisei.pm @@ -197,6 +197,7 @@ sub _export_insert { 'sector_name' => $sector_name, 'sector_uprate_limit' => $tower_sector->{Hash}->{sector_upratelimit}, 'sector_downrate_limit' => $tower_sector->{Hash}->{sector_downratelimit}, + 'rateplan' => $rateplan_name, }; my $accesspoint = process_sector($self, $sector_opt); return $self->api_error if $self->{'__saisei_error'}; @@ -816,6 +817,11 @@ sub process_tower { sub process_sector { my ($self, $opt) = @_; + if (!$opt->{sector_name} || $opt->{sector_name} eq '_default') { + $self->{'__saisei_error'} = "No sector attached to Tower (".$opt->{tower_name}.") for service ".$opt->{'rateplan'}.". Saisei requires a tower sector to be attached to each service that is exported to Saisei."; + return { error => $self->api_error, }; + } + if (!$opt->{sector_uprate_limit} || !$opt->{sector_downrate_limit}) { $self->{'__saisei_error'} = "Could not export sector ".$opt->{tower_name}." because there was no up or down rates attached to the sector. Saisei requires a up and down rate be attached to each sector."; return { error => $self->api_error, }; @@ -852,6 +858,16 @@ sub process_sector { return $accesspoint; } +=head2 require_tower_and_sector + +sets whether the service export requires a sector with it's tower. + +=cut + +sub require_tower_and_sector { + 1; +} + sub process_virtual_ap { my ($self, $opt) = @_; |
