[freeside-commits] freeside/FS/FS Schema.pm, 1.329, 1.330 ClientAPI_XMLRPC.pm, 1.8, 1.9 Record.pm, 1.229, 1.230
Ivan,,,
ivan at wavetail.420.am
Thu Oct 6 13:44:19 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv25965/FS/FS
Modified Files:
Schema.pm ClientAPI_XMLRPC.pm Record.pm
Log Message:
add dsl_device to track mac addresses, RT#13656
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.329
retrieving revision 1.330
diff -u -w -d -r1.329 -r1.330
--- Schema.pm 27 Sep 2011 23:01:24 -0000 1.329
+++ Schema.pm 6 Oct 2011 20:44:17 -0000 1.330
@@ -2021,6 +2021,19 @@
'index' => [ ['phonenum'], ['vendor_order_id'] ],
},
+ 'dsl_device' => {
+ 'columns' => [
+ 'devicenum', 'serial', '', '', '', '',
+ #part_device? or our own part_dsl_device?
+ #'devicepart', 'int', '', '', '', '',
+ 'svcnum', 'int', '', '', '', '',
+ 'mac_addr', 'varchar', '', 12, '', '',
+ ],
+ 'primary_key' => 'devicenum',
+ 'unique' => [ [ 'mac_addr' ], ],
+ 'index' => [ [ 'svcnum' ], ], # [ 'devicepart' ] ],
+ },
+
'dsl_note' => {
'columns' => [
'notenum', 'serial', '', '', '', '',
Index: ClientAPI_XMLRPC.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI_XMLRPC.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- ClientAPI_XMLRPC.pm 28 Sep 2011 01:02:23 -0000 1.8
+++ ClientAPI_XMLRPC.pm 6 Oct 2011 20:44:17 -0000 1.9
@@ -87,6 +87,9 @@
'list_pkgs' => 'MyAccount/list_pkgs', #add to ss (added?)
'list_svcs' => 'MyAccount/list_svcs', #add to ss (added?)
'list_svc_usage' => 'MyAccount/list_svc_usage',
+ 'list_dsl_devices' => 'MyAccount/list_dsl_devices',
+ 'add_dsl_device' => 'MyAccount/add_dsl_device',
+ 'delete_dsl_device' => 'MyAccount/delete_dsl_device',
'port_graph' => 'MyAccount/port_graph',
'list_cdr_usage' => 'MyAccount/list_cdr_usage',
'list_support_usage' => 'MyAccount/list_support_usage',
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -w -d -r1.229 -r1.230
--- Record.pm 29 Sep 2011 05:53:55 -0000 1.229
+++ Record.pm 6 Oct 2011 20:44:17 -0000 1.230
@@ -2217,6 +2217,42 @@
$self->setfield($field, uc($1));
'';
}
+
+=item ut_mac_addr COLUMN
+
+Check/untaint mac addresses. May be null.
+
+=cut
+
+sub ut_mac_addr {
+ my($self, $field) = @_;
+
+ my $mac = $self->get($field);
+ $mac =~ s/\s+//g;
+ $mac =~ s/://g;
+ $self->set($field, $mac);
+
+ my $e = $self->ut_hex($field);
+ return $e if $e;
+
+ return "Illegal (mac address) $field: ". $self->getfield($field)
+ unless length($self->getfield($field)) == 12;
+
+ '';
+
+}
+
+=item ut_mac_addrn COLUMN
+
+Check/untaint mac addresses. May be null.
+
+=cut
+
+sub ut_mac_addrn {
+ my($self, $field) = @_;
+ ($self->getfield($field) eq '') ? '' : $self->ut_mac_addr($field);
+}
+
=item ut_ip COLUMN
Check/untaint ip addresses. IPv4 only for now, though ::1 is auto-translated
More information about the freeside-commits
mailing list