[freeside-commits] freeside/FS/FS part_export.pm, 1.103, 1.104 svc_Common.pm, 1.54, 1.55 Conf.pm, 1.353, 1.354 svc_domain.pm, 1.57, 1.58 Schema.pm, 1.190, 1.191

Ivan,,, ivan at wavetail.420.am
Wed Feb 17 00:30:08 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15880/FS/FS

Modified Files:
	part_export.pm svc_Common.pm Conf.pm svc_domain.pm Schema.pm 
Log Message:
communigate pro provisioning, RT#7083

Index: svc_Common.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_Common.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- svc_Common.pm	26 Jan 2010 06:14:15 -0000	1.54
+++ svc_Common.pm	17 Feb 2010 08:30:06 -0000	1.55
@@ -854,6 +854,25 @@
   $return;
 }
 
+=item export_getsettings
+
+Runs export_getsettings callbacks and returns the two hashrefs.
+
+=cut
+
+sub export_getsettings {
+  my $self = shift;
+  my %settings = ();
+  my %defaults = ();
+  my $error = $self->export('getsettings', \%settings, \%defaults);
+  if ( $error ) {
+    #XXX bubble this up better
+    warn "error running export_getsetings: $error";
+    return ( {}, {} );
+  }
+  ( \%settings, \%defaults );
+}
+
 =item export HOOK [ EXPORT_ARGS ]
 
 Runs the provided export hook (i.e. "suspend", "unsuspend") for this service.

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- Schema.pm	8 Feb 2010 15:37:28 -0000	1.190
+++ Schema.pm	17 Feb 2010 08:30:06 -0000	1.191
@@ -1673,9 +1673,10 @@
 	'parent_svcnum',    'int', 'NULL',       '', '', '',
 	'registrarnum',     'int', 'NULL',       '', '', '',
 	'registrarkey', 'varchar', 'NULL',      512, '', '',
-	'setup_date',  @date_type, '', '',
+	'setup_date',      @date_type, '', '',
 	'renewal_interval', 'int', 'NULL',       '', '', '',
 	'expiration_date', @date_type, '', '',
+        'max_accounts',     'int', 'NULL',       '', '', '',
       ],
       'primary_key' => 'svcnum',
       'unique' => [ ],

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -d -r1.353 -r1.354
--- Conf.pm	16 Feb 2010 18:36:41 -0000	1.353
+++ Conf.pm	17 Feb 2010 08:30:06 -0000	1.354
@@ -3539,6 +3539,13 @@
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'svc_domain-edit_domain',
+    'section'     => '',
+    'description' => 'Enable domain renaming',
+    'type'        => 'checkbox',
+  },
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },

Index: svc_domain.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_domain.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- svc_domain.pm	28 Oct 2009 19:04:53 -0000	1.57
+++ svc_domain.pm	17 Feb 2010 08:30:06 -0000	1.58
@@ -89,6 +89,8 @@
 
 =item expiration_date - UNIX timestamp
 
+=item max_accounts
+
 =back
 
 =head1 METHODS
@@ -109,6 +111,9 @@
     'cancel_weight'  => 60,
     'fields' => {
       'domain' => 'Domain',
+      'max_accounts' => { label => 'Maximum number of accounts',
+                          'disable_inventory' => 1,
+                        },
     },
   };
 }
@@ -290,7 +295,8 @@
               : $new->replace_old;
 
   return "Can't change domain - reorder."
-    if $old->getfield('domain') ne $new->getfield('domain'); 
+    if $old->getfield('domain') ne $new->getfield('domain')
+    && ! $conf->exists('svc_domain-edit_domain'); 
 
   # Better to do it here than to force the caller to remember that svc_domain is weird.
   $new->setfield(action => 'I');
@@ -335,6 +341,7 @@
 
   my $error = $self->ut_numbern('svcnum')
               || $self->ut_numbern('catchall')
+              || $self->ut_numbern('max_accounts')
   ;
   return $error if $error;
 
@@ -429,6 +436,7 @@
     'PTR'   => sub { $_[0]->reczone <=> $_[1]->reczone },
   );
 
+  map { $_ } #return $self->num_domain_record( PARAMS ) unless wantarray;
   sort {    $order{$a->rectype} <=> $order{$b->rectype}
          or &{ $sort{$a->rectype} || sub { 0; } }($a, $b)
        }

Index: part_export.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export.pm,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- part_export.pm	8 Feb 2010 15:37:28 -0000	1.103
+++ part_export.pm	17 Feb 2010 08:30:05 -0000	1.104
@@ -376,6 +376,15 @@
 The elements are displayed in the UI to lead the the operator to external
 configuration, monitoring, and similar tools.
 
+=item export_getsettings SVC_OBJECT SETTINGS_HASHREF DEFAUTS_HASHREF
+
+Adds a hashref of settings to SETTINGSREF specific to this export and
+SVC_OBJECT.  The elements can be displayed in the UI on the service view.
+
+DEFAULTSREF is a hashref with the same keys where true values indicate the
+setting is a default (and thus can be displayed in the UI with less emphasis,
+or hidden by default).
+
 =cut
 
 =back



More information about the freeside-commits mailing list