[freeside-commits] freeside/FS/FS/part_export prizm.pm,1.19,1.20
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Mar 8 15:07:36 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv25980
Modified Files:
prizm.pm
Log Message:
try a delete before adding an element to prizm
Index: prizm.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/prizm.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- prizm.pm 19 Jan 2010 23:12:19 -0000 1.19
+++ prizm.pm 8 Mar 2010 23:07:33 -0000 1.20
@@ -206,6 +206,29 @@
# }
# }
+# 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;
More information about the freeside-commits
mailing list