X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fprizm.pm;h=99644895165a330d3eac4c85d8ff6d31adec972b;hb=6a509099343ed155525c4304f1ad742cc6e4ce59;hp=b697992c697d1629fb090dd2e864241ed50cee0b;hpb=0a641ef9baf404965543233222d84cc82a0a02e7;p=freeside.git
diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm
index b697992c6..996448951 100644
--- a/FS/FS/part_export/prizm.pm
+++ b/FS/FS/part_export/prizm.pm
@@ -79,11 +79,12 @@ possibly harmful.
EOT
%info = (
- 'svc' => 'svc_broadband',
- 'desc' => 'Real-time export to Northbound Interface',
- 'options' => \%options,
- 'nodomain' => 'Y',
- 'notes' => $notes,
+ 'svc' => 'svc_broadband',
+ 'desc' => 'Real-time export to Northbound Interface',
+ 'options' => \%options,
+ 'nodomain' => 'Y',
+ 'no_machine' => 1,
+ 'notes' => $notes,
);
sub prizm_command {
@@ -206,6 +207,29 @@ sub _export_insert {
# }
# }
+# here we cope with a problem of prizm failing to insert for reason
+# of duplicate mac addr, but doing so inconsistently... a race in prizm?
+
+ $self->prizm_command( 'CustomerIfService', 'removeElementFromCustomer',
+ 0,
+ $cust_main->custnum,
+ 0,
+ $svc->mac_addr,
+ );
+
+ $err_or_som = $self->prizm_command( 'NetworkIfService', 'getPrizmElements',
+ [ 'MAC Address' ],
+ [ $svc->mac_addr ],
+ [ '=' ],
+ );
+ if ( ref($err_or_som) && $err_or_som->result->[0] ) { # ignore errors
+ $self->prizm_command( 'NetworkIfService', 'deleteElement',
+ $err_or_som->result->[0],
+ 1,
+ );
+ }
+# end of coping
+
my $performance_profile = $svc->performance_profile;
$performance_profile ||= $svc->cust_svc->cust_pkg->part_pkg->pkg;
@@ -493,7 +517,8 @@ sub _export_unsuspend {
sub export_links {
my( $self, $svc, $arrayref ) = ( shift, shift, shift );
- push @$arrayref, 'SM';
+ push @$arrayref,
+ 'SM';
'';
}