[vhffs-dev] [802] Renaming Vhffs::Service::Postgres to Vhffs::Service::Pgsql (part one)

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 802
Author:   gradator
Date:     2007-08-29 23:28:24 +0000 (Wed, 29 Aug 2007)

Log Message:
-----------
Renaming Vhffs::Service::Postgres to Vhffs::Service::Pgsql (part one)

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/ObjectFactory.pm
    trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
    trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm
    trunk/vhffs-api/src/Vhffs/Services/Postgres.pm
    trunk/vhffs-api/src/Vhffs/Services.pm
    trunk/vhffs-api/src/examples/create_postgres.pl
    trunk/vhffs-irc/modobot.pl
    trunk/vhffs-panel/admin/moderation.pl
    trunk/vhffs-panel/admin/pgsql/edit.pl
    trunk/vhffs-panel/admin/pgsql/edit_submit.pl
    trunk/vhffs-panel/admin/pgsql/show.pl
    trunk/vhffs-panel/pgsql/create.pl
    trunk/vhffs-panel/pgsql/delete.pl
    trunk/vhffs-panel/pgsql/prefs.pl
    trunk/vhffs-panel/pgsql/prefs_save.pl
    trunk/vhffs-robots/src/create_pgsql.pl
    trunk/vhffs-robots/src/delete_group.pl
    trunk/vhffs-robots/src/delete_pgsql.pl
    trunk/vhffs-robots/src/dump_pgsql.pl
    trunk/vhffs-robots/src/modify_pgsql.pl
    trunk/vhffs-robots/src/refused_postgres.pl
    trunk/vhffs-tests/src/Services/Postgres.pl
    trunk/vhffs-tests/src/Stats.pl


Modified: trunk/vhffs-api/src/Vhffs/ObjectFactory.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/ObjectFactory.pm	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/Vhffs/ObjectFactory.pm	2007-08-29 23:28:24 UTC (rev 802)
@@ -58,7 +58,7 @@
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_HTTPD] = 'Vhffs::Services::Web';
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_REPOSITORY] = 'Vhffs::Services::Repository';
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_MYSQL] = 'Vhffs::Services::Mysql';
-$OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_PGSQL] = 'Vhffs::Services::Postgres';
+$OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_PGSQL] = 'Vhffs::Services::Pgsql';
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_CVS] = 'Vhffs::Services::Cvs';
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_SVN] = 'Vhffs::Services::Svn';
 $OBJECTS_BY_TYPE[Vhffs::Constants::TYPE_DNS] = 'Vhffs::Services::DNS';

Modified: trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm	2007-08-29 23:28:24 UTC (rev 802)
@@ -44,7 +44,7 @@
 use Vhffs::Main;
 use Vhffs::Constants;
 use Vhffs::Panel::Main;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 
 
 sub search {
@@ -110,7 +110,7 @@
     return -1 if( ! defined $user );
     return -2 if( ! defined $group );
     
-    my $pgsql = Vhffs::Services::Postgres::create($main, $dbname, $dbuser, $dbpass, $description, $user, $group);
+    my $pgsql = Vhffs::Services::Pgsql::create($main, $dbname, $dbuser, $dbpass, $description, $user, $group);
 
 	return undef if( ! defined $pgsql );
 	

Modified: trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/Vhffs/Robots/Postgres.pm	2007-08-29 23:28:24 UTC (rev 802)
@@ -32,7 +32,7 @@
 
 package Vhffs::Robots::Postgres;
 
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Constants;
 use Vhffs::Functions;
 

Modified: trunk/vhffs-api/src/Vhffs/Services/Postgres.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-08-29 23:28:24 UTC (rev 802)
@@ -36,7 +36,7 @@
 
 =head1 NAME
 
-Vhffs::Services::Postgres - Handle PostgreSQL databases in VHFFS.
+Vhffs::Services::Pgsql - Handle PostgreSQL databases in VHFFS.
 
 =head1 SYNOPSIS
 
@@ -46,7 +46,7 @@
 
 =cut
 
-package Vhffs::Services::Postgres;
+package Vhffs::Services::Pgsql;
 
 use base qw(Vhffs::Object);
 use strict;
@@ -56,7 +56,7 @@
 
 =head2 check_dbname
 
-    die('Bad DB name') unless(Vhffs::Services::Postgres::check_dbname($dbname));
+    die('Bad DB name') unless(Vhffs::Services::Pgsql::check_dbname($dbname));
 
 Indicates wether a DB name is valid or not (3 to 32 alphanumeric chars, underscore
 allowed except at begining and end).
@@ -72,7 +72,7 @@
 
 =head2 check_dbuser
 
-    die('Bad DB username') unless(Vhffs::Services::Postgres::check_dbuser($user));
+    die('Bad DB username') unless(Vhffs::Services::Pgsql::check_dbuser($user));
 
 Indicates wether a DB user name is valid or not (3 to 32 lowercase alphanumeric chars, underscore
 allowed except at begining and end).
@@ -88,7 +88,7 @@
 
 =head2 check_dbuser
 
-    die('Bad DB pass') unless(Vhffs::Services::Postgres::check_dbpass($pass));
+    die('Bad DB pass') unless(Vhffs::Services::Pgsql::check_dbpass($pass));
 
 Indicates wether a DB password is valid or not (at least one alphanumeric
 char).
@@ -117,7 +117,7 @@
 
 =head2 create
 
-    my $psql = Vhffs::Services::Postgres::create($main, $dbname, $dbuser, $dbpass, $description, $user, $group);
+    my $psql = Vhffs::Services::Pgsql::create($main, $dbname, $dbuser, $dbpass, $description, $user, $group);
     die("Unable to create Postgre Service\n") unless(defined $psql);
 
 Create a new Postgres services and return the corresponding fully functional object.
@@ -249,7 +249,7 @@
 
 =head2 get_by_dbname
 
-    my $pg = Vhffs::Services::Postgres::get_by_dbname($main, $dbname);
+    my $pg = Vhffs::Services::Pgsql::get_by_dbname($main, $dbname);
     die("No database with this name") unless(defined $pg);
 
 Fetches the pg database whose name is C<$dbname>.
@@ -264,7 +264,7 @@
     my @params;
     return undef unless(@params = $dbh->selectrow_array($sql, undef, $dbname));
 
-    return _new Vhffs::Services::Postgres($vhffs, @params);
+    return _new Vhffs::Services::Pgsql($vhffs, @params);
 
 }
 
@@ -308,7 +308,7 @@
     return undef unless($sth->execute(@params));
 
     while(my $row = $sth->fetchrow_arrayref()) {
-        push(@$postgres, _new Vhffs::Services::Postgres($vhffs, @$row));
+        push(@$postgres, _new Vhffs::Services::Pgsql($vhffs, @$row));
     }
 
     return $postgres;

Modified: trunk/vhffs-api/src/Vhffs/Services.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services.pm	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/Vhffs/Services.pm	2007-08-29 23:28:24 UTC (rev 802)
@@ -37,7 +37,7 @@
 use Vhffs::Services::Mail;
 use Vhffs::Services::Mailing;
 use Vhffs::Services::Mysql;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Services::Repository;
 use Vhffs::Services::Svn;
 

Modified: trunk/vhffs-api/src/examples/create_postgres.pl
===================================================================
--- trunk/vhffs-api/src/examples/create_postgres.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-api/src/examples/create_postgres.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -10,7 +10,7 @@
 use Vhffs::Group;
 use Vhffs::Main;
 use Vhffs::Object;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 
 my $princ = init Vhffs::Main;
 
@@ -25,7 +25,7 @@
 my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $sql = Vhffs::Services::Postgres::create( $princ , $dbname, $dbuser, $dbpass, $description, $user, $group);
+my $sql = Vhffs::Services::Pgsql::create( $princ , $dbname, $dbuser, $dbpass, $description, $user, $group);
 
 if( defined $sql )
 {

Modified: trunk/vhffs-irc/modobot.pl
===================================================================
--- trunk/vhffs-irc/modobot.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-irc/modobot.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -305,8 +305,8 @@
     if( $vhffs->get_config->use_postgres == 1 )
     {
         #Treat Postgres to moderate
-        use Vhffs::Services::Postgres;
-        my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
+        use Vhffs::Services::Pgsql;
+        my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
 
         if( defined @{$dbs} )
         {

Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/admin/moderation.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -431,9 +431,9 @@
 	if( $vhffs->get_config->use_postgres == 1 )
 	{
 		#Treat Mail domains to moderate
-		use Vhffs::Services::Postgres;
+		use Vhffs::Services::Pgsql;
 		$template->param( TEXT_POSTGRES => gettext("Postgres database awaiting validation") );
-		my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
+		my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
 		$output = "";
 	
 		if( defined @{$dbs} )

Modified: trunk/vhffs-panel/admin/pgsql/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/edit.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/admin/pgsql/edit.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -79,7 +79,7 @@
 	my $message = gettext( "CGI ERROR !");
 	$template->param( MESSAGE => $message );
 }
-elsif( ! defined ( $object = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $name ) ) )
+elsif( ! defined ( $object = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $name ) ) )
 {
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 	my $message = gettext( "Cannot fetch object");

Modified: trunk/vhffs-panel/admin/pgsql/edit_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/edit_submit.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/admin/pgsql/edit_submit.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -79,7 +79,7 @@
 	my $message = gettext( "CGI ERROR !");
 	$template->param( MESSAGE => $message );
 }
-elsif( ! defined ( $object = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $name ) ) )
+elsif( ! defined ( $object = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $name ) ) )
 {
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 	my $message = sprintf( gettext("Cannot fetch object %s"), $name );

Modified: trunk/vhffs-panel/admin/pgsql/show.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/show.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/admin/pgsql/show.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -79,7 +79,7 @@
 	my $message = gettext( "CGI ERROR !");
 	$template->param( MESSAGE => $message );
 }
-elsif( ! defined ( $object = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $name ) ) )
+elsif( ! defined ( $object = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $name ) ) )
 {
 	$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
 	my $message = gettext( "Cannot fetch object");

Modified: trunk/vhffs-panel/pgsql/create.pl
===================================================================
--- trunk/vhffs-panel/pgsql/create.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/pgsql/create.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -74,9 +74,9 @@
         $panel->add_error( gettext('CGI error') );
     } elsif($description =~ /^\s*$/) {
         $panel->add_error( gettext('You must enter a description') );
-    } elsif(!Vhffs::Services::Postgres::check_dbname($dbname)) {
+    } elsif(!Vhffs::Services::Pgsql::check_dbname($dbname)) {
         $panel->add_error( gettext('Invalid database name, it must contain only numbers, lowercase letters and underscore (the latter isn\'t allowed in first or last position) and be between 3 and 32 characters.') );
-    } elsif(!Vhffs::Services::Postgres::check_dbpass($dbpass)) {
+    } elsif(!Vhffs::Services::Pgsql::check_dbpass($dbpass)) {
         $panel->add_error( gettext('Invalid password. It must be at least 3 characters and contain only letters (lower and uppercase) and numbers') );
     } elsif(defined Vhffs::Panel::Pgsql::create_pgsql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
         my $url = '/panel.pl?project='.$panel->{groupname}.'&msg='.gettext('The PostgreSQL DB was successfully created !');

Modified: trunk/vhffs-panel/pgsql/delete.pl
===================================================================
--- trunk/vhffs-panel/pgsql/delete.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/pgsql/delete.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -45,7 +45,7 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 use Vhffs::Panel::Group;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 
 my $panel = new Vhffs::Panel::Main();
 if(!$panel)  {
@@ -64,7 +64,7 @@
 
 my $dbname = $cgi->param("DBNAME");
 
-my $pgsql = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $dbname );
+my $pgsql = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $dbname );
 
 my $templatedir = $vhffs->get_config->get_templatedir;
 

Modified: trunk/vhffs-panel/pgsql/prefs.pl
===================================================================
--- trunk/vhffs-panel/pgsql/prefs.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/pgsql/prefs.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -60,7 +60,7 @@
 my $dbname = $cgi->param("name");
 my $template;
 my $message;
-my $pgsql = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $dbname );
+my $pgsql = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $dbname );
 
 my $templatedir = $vhffs->get_config->get_templatedir;
 

Modified: trunk/vhffs-panel/pgsql/prefs_save.pl
===================================================================
--- trunk/vhffs-panel/pgsql/prefs_save.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-panel/pgsql/prefs_save.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -45,7 +45,7 @@
 use Vhffs::Panel::Main;
 use Vhffs::Panel::Menu;
 use Vhffs::Panel::Group;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 
 my $panel = new Vhffs::Panel::Main();
 if(!$panel)  {
@@ -68,7 +68,7 @@
 
 my $dbname = $cgi->param("name");
 
-my $pgsql = Vhffs::Services::Postgres::get_by_dbname( $vhffs , $dbname );
+my $pgsql = Vhffs::Services::Pgsql::get_by_dbname( $vhffs , $dbname );
 
 
 

Modified: trunk/vhffs-robots/src/create_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/create_pgsql.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/create_pgsql.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -40,7 +40,7 @@
 
 Vhffs::Robots::lock( $vhffs , "pgsql" );
 
-my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
+my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
 my $db;
 
 foreach $db ( @{$dbs} )

Modified: trunk/vhffs-robots/src/delete_group.pl
===================================================================
--- trunk/vhffs-robots/src/delete_group.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/delete_group.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -41,7 +41,7 @@
 use Vhffs::Services::Mailing;
 use Vhffs::Services::Mail;
 use Vhffs::Services::Mysql;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Services::Svn;
 use Vhffs::Robots;
 
@@ -97,7 +97,7 @@
 		$object->commit;
     }
 
-    $objects = Vhffs::Services::Postgres::getall( $vhffs , undef , undef , $group );
+    $objects = Vhffs::Services::Pgsql::getall( $vhffs , undef , undef , $group );
 	$ok = 0 if( @$objects != 0 );
    foreach $object ( @{$objects} )
    {

Modified: trunk/vhffs-robots/src/delete_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/delete_pgsql.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/delete_pgsql.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -31,7 +31,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::Robots;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Robots::Postgres;
 use Vhffs::Main;
 
@@ -39,7 +39,7 @@
 
 Vhffs::Robots::lock( $vhffs , "pgsql" );
 
-my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::TO_DELETE , undef , undef  );
+my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::TO_DELETE , undef , undef  );
 my $db;
 
 

Modified: trunk/vhffs-robots/src/dump_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/dump_pgsql.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/dump_pgsql.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -40,14 +40,14 @@
 use Vhffs::User;
 use Vhffs::Group;
 use Vhffs::Functions;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Robots;
 
 my $vhffs = init Vhffs::Main; 
 
 Vhffs::Robots::lock( $vhffs , "dumppgsql" );
 
-my $objs  = Vhffs::Services::Postgres::getall( $vhffs  );
+my $objs  = Vhffs::Services::Pgsql::getall( $vhffs  );
 my $admin_dbuser = $vhffs->get_config->get_pgsql_admin_username;
 my $admin_dbpass = $vhffs->get_config->get_pgsql_admin_pass;
 my $admin_dbhost = $vhffs->get_config->get_pgsql_admin_host;

Modified: trunk/vhffs-robots/src/modify_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/modify_pgsql.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/modify_pgsql.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -32,7 +32,7 @@
 
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::Robots;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Robots::Postgres;
 use Vhffs::Main;
 
@@ -41,7 +41,7 @@
 
 Vhffs::Robots::lock( $vhffs , "pgsql" );
 
-my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION , undef , undef );
+my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION , undef , undef );
 my $db;
 
 foreach $db ( @{$dbs} )

Modified: trunk/vhffs-robots/src/refused_postgres.pl
===================================================================
--- trunk/vhffs-robots/src/refused_postgres.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-robots/src/refused_postgres.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -38,7 +38,7 @@
 use Vhffs::User;
 use Vhffs::Group;
 use Vhffs::Robots;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Panel::User;
 
 
@@ -54,7 +54,7 @@
 
 Vhffs::Robots::lock( $vhffs , "pgsql" );
 
-$objects = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
+$objects = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
 bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
 textdomain("vhffs");
 

Modified: trunk/vhffs-tests/src/Services/Postgres.pl
===================================================================
--- trunk/vhffs-tests/src/Services/Postgres.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-tests/src/Services/Postgres.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -3,7 +3,7 @@
 use Vhffs::Tests::Utils;
 use Vhffs::Constants;
 use Vhffs::User;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Test::More 'no_plan';
 
 my $main = init Vhffs::Tests::Main;
@@ -19,22 +19,22 @@
 my $group2 = Vhffs::Group::create($main, 'pggroup2', $user1->get_uid, undef, 'Test group for postgres');
 isa_ok($group2, 'Vhffs::Group', '$group1');
 
-my $postgres1 = Vhffs::Services::Postgres::create($main, 'postgres1', 'pgu1', 'plop', 'Test postgres DB 1', $user1, $group1);
-isa_ok($postgres1, 'Vhffs::Services::Postgres', '$postgres1');
+my $postgres1 = Vhffs::Services::Pgsql::create($main, 'postgres1', 'pgu1', 'plop', 'Test postgres DB 1', $user1, $group1);
+isa_ok($postgres1, 'Vhffs::Services::Pgsql', '$postgres1');
 cmp_ok($postgres1->get_dbname, 'eq', 'postgres1', 'dbname is the one defined while creating object');
 cmp_ok($postgres1->get_dbusername, 'eq', 'pgu1', 'dbuser is the one defined while creating object');
 cmp_ok($postgres1->get_owner_uid, '==', $user1->get_uid, 'uid matches');
 cmp_ok($postgres1->get_owner_gid, '==', $group1->get_gid, 'gid matches');
 
 my ($max_oid) = $main->get_db_object->selectrow_array('SELECT MAX(object_id) FROM vhffs_object');
-ok(! defined(Vhffs::Services::Postgres::create($main, 'postgres1', 'pgu1', 'plop', 'Test postgres DB 1', $user1, $group1)),
+ok(! defined(Vhffs::Services::Pgsql::create($main, 'postgres1', 'pgu1', 'plop', 'Test postgres DB 1', $user1, $group1)),
                                                                                 'Unable to create 2 db with the same name');
 my ($new_max_oid) = $main->get_db_object->selectrow_array('SELECT MAX(object_id) FROM vhffs_object');
 cmp_ok($new_max_oid, '==', $max_oid, 'PostgreSQL service creation is a "all or nothing" process');
 
-my @postgreses = @{Vhffs::Services::Postgres::getall($main)};
+my @postgreses = @{Vhffs::Services::Pgsql::getall($main)};
 cmp_ok(scalar(@postgreses), '==', 1, 'Total : 1 Postgres Service');
 is_deeply($postgreses[0], $postgres1, 'getall return correct Postgres objects');
 
-cmp_ok(@{Vhffs::Services::Postgres::getall($main, Vhffs::Constants::ACTIVATED)}, '==', 0, 'No ACTIVATED Postgres DB');
+cmp_ok(@{Vhffs::Services::Pgsql::getall($main, Vhffs::Constants::ACTIVATED)}, '==', 0, 'No ACTIVATED Postgres DB');
 

Modified: trunk/vhffs-tests/src/Stats.pl
===================================================================
--- trunk/vhffs-tests/src/Stats.pl	2007-08-29 23:13:48 UTC (rev 801)
+++ trunk/vhffs-tests/src/Stats.pl	2007-08-29 23:28:24 UTC (rev 802)
@@ -11,7 +11,7 @@
 use Vhffs::Services::Cvs;
 use Vhffs::Services::DNS;
 use Vhffs::Services::Mysql;
-use Vhffs::Services::Postgres;
+use Vhffs::Services::Pgsql;
 use Vhffs::Services::Svn;
 use Vhffs::Services::Mail;
 use Vhffs::Services::Mailing;
@@ -190,13 +190,13 @@
 for(my $i = 1 ; $i < 10 ; ++$i) {
     $group = Vhffs::Group::get_by_groupname($main, "testgroup0$i");
     $user = Vhffs::User::get_by_username($main, "testuser0$i");
-    $svc = Vhffs::Services::Postgres::create($main, "pgsqltest0$i", "pgsqlu0$i", 'abcdef', "MySQL test DB #0$i", $user, $group);
+    $svc = Vhffs::Services::Pgsql::create($main, "pgsqltest0$i", "pgsqlu0$i", 'abcdef', "MySQL test DB #0$i", $user, $group);
 }
 
 $stats->refresh();
 is($stats->get_pgsql_in_moderation, 9, 'All PostgreSQL services waiting for moderation');
 for(my $i = 1 ; $i < 10 ; ++$i) {
-    $svc = Vhffs::Services::Postgres::get_by_dbname($main, "pgsqltest0$i");
+    $svc = Vhffs::Services::Pgsql::get_by_dbname($main, "pgsqltest0$i");
     $svc->set_status(Vhffs::Constants::WAITING_FOR_CREATION);
     $svc->commit;
     $stats->refresh();
@@ -205,7 +205,7 @@
 }
 
 for(my $i = 1 ; $i < 10 ; ++$i) {
-    $svc = Vhffs::Services::Postgres::get_by_dbname($main, "pgsqltest0$i");
+    $svc = Vhffs::Services::Pgsql::get_by_dbname($main, "pgsqltest0$i");
     $svc->set_status(Vhffs::Constants::ACTIVATED);
     $svc->commit;
     $stats->refresh();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/