[vhffs-dev] [2102] renamed $princ to $vhffs in API examples

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


Revision: 2102
Author:   gradator
Date:     2012-03-03 16:08:21 +0100 (Sat, 03 Mar 2012)
Log Message:
-----------
renamed $princ to $vhffs in API examples

Modified Paths:
--------------
    trunk/vhffs-api/examples/add_acl.pl
    trunk/vhffs-api/examples/add_acl_dns.pl
    trunk/vhffs-api/examples/create_box.pl
    trunk/vhffs-api/examples/create_cvs.pl
    trunk/vhffs-api/examples/create_cvs_panel.pl
    trunk/vhffs-api/examples/create_dns.pl
    trunk/vhffs-api/examples/create_forward.pl
    trunk/vhffs-api/examples/create_group.pl
    trunk/vhffs-api/examples/create_group_by_panel.pl
    trunk/vhffs-api/examples/create_list.pl
    trunk/vhffs-api/examples/create_mail.pl
    trunk/vhffs-api/examples/create_mysql.pl
    trunk/vhffs-api/examples/create_mysql_panel.pl
    trunk/vhffs-api/examples/create_panel_mail.pl
    trunk/vhffs-api/examples/create_postgres.pl
    trunk/vhffs-api/examples/create_repository.pl
    trunk/vhffs-api/examples/create_user.pl
    trunk/vhffs-api/examples/create_web.pl
    trunk/vhffs-api/examples/create_web_panel.pl
    trunk/vhffs-api/examples/delbox.pl
    trunk/vhffs-api/examples/delete_acl.pl
    trunk/vhffs-api/examples/generate_password.pl
    trunk/vhffs-api/examples/get_list.pl
    trunk/vhffs-api/examples/join_group.pl
    trunk/vhffs-api/examples/mailuser.pl
    trunk/vhffs-api/examples/mailuser_add_box.pl
    trunk/vhffs-api/examples/modify_acl.pl
    trunk/vhffs-api/examples/modify_user.pl
    trunk/vhffs-api/examples/perm_for_user.pl
    trunk/vhffs-api/examples/print_domain.pl
    trunk/vhffs-api/examples/show_acl_per_object.pl
    trunk/vhffs-api/examples/show_dns_per_group.pl
    trunk/vhffs-api/examples/show_dns_per_user.pl
    trunk/vhffs-api/examples/show_dumper_cvs.pl
    trunk/vhffs-api/examples/show_dumper_group.pl
    trunk/vhffs-api/examples/show_dumper_object.pl
    trunk/vhffs-api/examples/show_dumper_user.pl
    trunk/vhffs-api/examples/show_groups_per_user.pl
    trunk/vhffs-api/examples/show_last_users.pl
    trunk/vhffs-api/examples/show_mail_conf.pl
    trunk/vhffs-api/examples/show_mail_per_group.pl
    trunk/vhffs-api/examples/show_members_from_list.pl

Modified: trunk/vhffs-api/examples/add_acl.pl
===================================================================
--- trunk/vhffs-api/examples/add_acl.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/add_acl.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,16 +8,16 @@
 use Vhffs;
 use Vhffs::Services::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername username level\n") if(@ARGV != 3);
 
 my ($servername, $username, $level) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
-my $httpd = Vhffs::Services::Web::get_by_servername($princ, $servername);
+my $httpd = Vhffs::Services::Web::get_by_servername($vhffs, $servername);
 die("Webarea $servername not found\n") unless(defined $httpd);
 
 $httpd->add_acl( $user, $level );

Modified: trunk/vhffs-api/examples/add_acl_dns.pl
===================================================================
--- trunk/vhffs-api/examples/add_acl_dns.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/add_acl_dns.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,16 +9,16 @@
 use Vhffs;
 use Vhffs::Services::DNS;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 domain user level\n") unless(@ARGV == 3);
 
 my ($domain, $username, $level) = @ARGV;
 
-my $dns = Vhffs::Services::DNS::get_by_domainname($princ , $domain);
+my $dns = Vhffs::Services::DNS::get_by_domainname($vhffs , $domain);
 die("Domain $domain not found\n") unless(defined $dns);
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
 $dns->add_acl( $user, $level );

Modified: trunk/vhffs-api/examples/create_box.pl
===================================================================
--- trunk/vhffs-api/examples/create_box.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_box.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs;
 use Vhffs::Services::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 mail_domain local_part password\n") unless(@ARGV == 3);
 
 my ($domain, $local, $pass) = @ARGV;
 
-my $mail = Vhffs::Services::Mail::get_by_mxdomain($princ, $domain);
+my $mail = Vhffs::Services::Mail::get_by_mxdomain($vhffs, $domain);
 die("Mail domain $domain not found\n") unless(defined $mail);
 
 die("Unable to create box $local\@$domain\n") if( $mail->addbox($local, $pass) < 0 );

Modified: trunk/vhffs-api/examples/create_cvs.pl
===================================================================
--- trunk/vhffs-api/examples/create_cvs.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_cvs.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -48,9 +48,9 @@
 my %infos;
 my $group;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
-$config = $princ->get_config;
+$config = $vhffs->get_config;
 
 if( $#ARGV != 0 )
 {
@@ -60,10 +60,10 @@
 }
 
 
-$user = Vhffs::User::get_by_username( $princ, 'soda' );
-$group = Vhffs::Group::get_by_groupname( $princ, 'soda' );
+$user = Vhffs::User::get_by_username( $vhffs, 'soda' );
+$group = Vhffs::Group::get_by_groupname( $vhffs, 'soda' );
 
-my $cvs = Vhffs::Services::Cvs::create( $princ , "$ARGV[0]" , 'Sample cvs repo', $user , $group );
+my $cvs = Vhffs::Services::Cvs::create( $vhffs , "$ARGV[0]" , 'Sample cvs repo', $user , $group );
 
 if( defined $cvs )
 {

Modified: trunk/vhffs-api/examples/create_cvs_panel.pl
===================================================================
--- trunk/vhffs-api/examples/create_cvs_panel.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_cvs_panel.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,18 +9,18 @@
 use Vhffs;
 use Vhffs::Panel::Cvs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 cvsroot description owner_username owner_groupname\n") unless(@ARGV == 4);
 
 my ($cvsroot, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $cvs = Vhffs::Panel::Cvs::create_cvs( $princ, $cvsroot, $description, $user, $group );
+my $cvs = Vhffs::Panel::Cvs::create_cvs( $vhffs, $cvsroot, $description, $user, $group );
 
 die("Unable to create cvs $cvsroot\n") unless(defined $cvs);
 print "CVS $cvsroot created\n";

Modified: trunk/vhffs-api/examples/create_dns.pl
===================================================================
--- trunk/vhffs-api/examples/create_dns.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_dns.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,18 +11,18 @@
 use Vhffs::Object;
 use Vhffs::Services::DNS;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage $0 domain_name, description, user, group") unless(@ARGV == 4);
 
 my ($domain, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $dns = Vhffs::Services::DNS::create( $princ , $domain, $description, $user , $group );
+my $dns = Vhffs::Services::DNS::create( $vhffs , $domain, $description, $user , $group );
 
 if( defined $dns )
 {

Modified: trunk/vhffs-api/examples/create_forward.pl
===================================================================
--- trunk/vhffs-api/examples/create_forward.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_forward.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs;
 use Vhffs::Services::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 mxdomain localpart remote_address\n") unless(@ARGV == 3);
 
 my ($domain, $local, $remote) = @ARGV;
 
-my $mail = Vhffs::Services::Mail::get_by_mxdomain($princ, $domain);
+my $mail = Vhffs::Services::Mail::get_by_mxdomain($vhffs, $domain);
 
 die("Mail domain $domain not found\n") unless(defined $mail);
 

Modified: trunk/vhffs-api/examples/create_group.pl
===================================================================
--- trunk/vhffs-api/examples/create_group.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_group.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,16 +9,16 @@
 use Vhffs;
 use Vhffs::Object;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 groupname owner_username description\n") unless(@ARGV == 3);
 
 my ($groupname, $realname, $username, $description) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
 
-my $group = Vhffs::Group::create($princ, $groupname, $realname, $user->get_uid, undef, $description) ;
+my $group = Vhffs::Group::create($vhffs, $groupname, $realname, $user->get_uid, undef, $description) ;
 
 if( !defined $group )
 {

Modified: trunk/vhffs-api/examples/create_group_by_panel.pl
===================================================================
--- trunk/vhffs-api/examples/create_group_by_panel.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_group_by_panel.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,18 +8,18 @@
 use Vhffs;
 use Vhffs::Panel::Group;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 groupname owner_username decription\n") unless(@ARGV == 3);
 
 my ($groupname, $username, $description) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
 
 #add this group in database
-my $group = Vhffs::Panel::Group::create_group( $groupname, $user , $princ, $description );
+my $group = Vhffs::Panel::Group::create_group( $groupname, $user , $vhffs, $description );
 die("Unable to create group $groupname\n") unless(defined $group);
 
 print("Group $groupname created\n");

Modified: trunk/vhffs-api/examples/create_list.pl
===================================================================
--- trunk/vhffs-api/examples/create_list.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_list.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -12,18 +12,18 @@
 use Vhffs::Services::Mail;
 use Vhffs::Services::MailingList;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 local_part domain admin_email description owner_username owner_groupname\n") unless(@ARGV == 6);
 
 my ($local, $domain, $admin, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $mail = Vhffs::Services::MailingList::create($princ, $local, $domain, $admin, $description, $user, $group);
+my $mail = Vhffs::Services::MailingList::create($vhffs, $local, $domain, $admin, $description, $user, $group);
 
 if( defined $mail )
 {

Modified: trunk/vhffs-api/examples/create_mail.pl
===================================================================
--- trunk/vhffs-api/examples/create_mail.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_mail.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,17 +11,17 @@
 use Vhffs::Object;
 use Vhffs::Services::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage $0 domain description owner_username owner_groupname") if(@ARGV != 4);
 my ($domain, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $mail = Vhffs::Services::Mail::create( $princ , $domain, $description, $user , $group);
+my $mail = Vhffs::Services::Mail::create( $vhffs , $domain, $description, $user , $group);
 
 if( defined $mail )
 {

Modified: trunk/vhffs-api/examples/create_mysql.pl
===================================================================
--- trunk/vhffs-api/examples/create_mysql.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_mysql.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,19 +11,19 @@
 use Vhffs::Object;
 use Vhffs::Services::Mysql;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 dbname dbuser dbpass description owner_username owner_groupname\n") unless(@ARGV == 6);
 
 my ($dbname, $dbuser, $dbpass, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
 
-my $sql = Vhffs::Services::Mysql::create($princ , $dbname, $dbuser, $dbpass, $description, $user, $group);
+my $sql = Vhffs::Services::Mysql::create($vhffs , $dbname, $dbuser, $dbpass, $description, $user, $group);
 
 if( defined $sql )
 {

Modified: trunk/vhffs-api/examples/create_mysql_panel.pl
===================================================================
--- trunk/vhffs-api/examples/create_mysql_panel.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_mysql_panel.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,19 +9,19 @@
 use Vhffs;
 use Vhffs::Panel::Mysql;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 
 die("Usage: $0 dbname dbuser dbpass description owner_username owner_groupname\n") unless(@ARGV == 6);
 
 my ($dbname, $dbuser, $dbpass, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $mysql = Vhffs::Panel::Mysql::create_mysql( $princ, $dbname, $user, $group, $dbuser, $dbpass, $description );
+my $mysql = Vhffs::Panel::Mysql::create_mysql( $vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description );
 
 die("Unable to create mysql service $dbname\n") unless(defined $mysql);
 print("MySQL service created\n");

Modified: trunk/vhffs-api/examples/create_panel_mail.pl
===================================================================
--- trunk/vhffs-api/examples/create_panel_mail.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_panel_mail.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -10,18 +10,18 @@
 use Vhffs;
 use Vhffs::Panel::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 domain description owner_username owner_groupname\n") unless(@ARGV == 4);
 
 my ($domain, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $mail = Vhffs::Panel::Mail::create_mail( $princ, $domain, $description, $user, $group);
+my $mail = Vhffs::Panel::Mail::create_mail( $vhffs, $domain, $description, $user, $group);
 
 die("Unable to create mail domain $domain\n") unless(defined $mail);
 print("Mail domain $domain created\n");

Modified: trunk/vhffs-api/examples/create_postgres.pl
===================================================================
--- trunk/vhffs-api/examples/create_postgres.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_postgres.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,7 +11,7 @@
 use Vhffs::Object;
 use Vhffs::Services::Pgsql;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 
 die("Usage: $0 dbname dbuser dbpass description user group\n") unless(@ARGV == 6);
@@ -19,12 +19,12 @@
 my ($dbname, $dbuser, $dbpass, $description, $username, $groupname) = @ARGV;
 
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $sql = Vhffs::Services::Pgsql::create( $princ , $dbname, $dbuser, $dbpass, $description, $user, $group);
+my $sql = Vhffs::Services::Pgsql::create( $vhffs , $dbname, $dbuser, $dbpass, $description, $user, $group);
 
 if( defined $sql )
 {

Modified: trunk/vhffs-api/examples/create_repository.pl
===================================================================
--- trunk/vhffs-api/examples/create_repository.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_repository.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,18 +11,18 @@
 use Vhffs::Object;
 use Vhffs::Services::Repository;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 reponame description username groupname\n") unless(@ARGV == 4);
 
 my ($reponame, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $repo = Vhffs::Services::Repository::create($princ, $reponame, $description, $user, $group );
+my $repo = Vhffs::Services::Repository::create($vhffs, $reponame, $description, $user, $group );
 
 if( defined $repo )
 {

Modified: trunk/vhffs-api/examples/create_user.pl
===================================================================
--- trunk/vhffs-api/examples/create_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,13 +9,13 @@
 use Vhffs;
 use Vhffs::Object;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username password\n") unless(@ARGV == 2);
 
 my ($username, $password) = @ARGV;
 
-my $user = Vhffs::User::create($princ, $username, $password);
+my $user = Vhffs::User::create($vhffs, $username, $password);
 
 if( !defined $user )
 {

Modified: trunk/vhffs-api/examples/create_web.pl
===================================================================
--- trunk/vhffs-api/examples/create_web.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_web.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,18 +11,18 @@
 use Vhffs::Object;
 use Vhffs::Services::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername description owner_username owner_groupname\n") unless(@ARGV == 4);
 
 my($servername, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-my $httpd = Vhffs::Services::Web::create($princ, $servername, $description, $user, $group);
+my $httpd = Vhffs::Services::Web::create($vhffs, $servername, $description, $user, $group);
 
 if( defined $httpd )
 {

Modified: trunk/vhffs-api/examples/create_web_panel.pl
===================================================================
--- trunk/vhffs-api/examples/create_web_panel.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/create_web_panel.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,16 +9,16 @@
 use Vhffs;
 use Vhffs::Panel::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername description owner_username owner_groupname\n") unless(@ARGV == 4);
 
 my ($servername, $description, $username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
-die("Unable to create webarea $servername\n") unless(defined Vhffs::Panel::Web::create_web($princ, $servername, $description, $user, $group));
+die("Unable to create webarea $servername\n") unless(defined Vhffs::Panel::Web::create_web($vhffs, $servername, $description, $user, $group));
 print("Webarea $servername created\n");

Modified: trunk/vhffs-api/examples/delbox.pl
===================================================================
--- trunk/vhffs-api/examples/delbox.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/delbox.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -7,13 +7,13 @@
 use Vhffs;
 use Vhffs::Services::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 mail_domain box\n") unless(@ARGV == 2);
 
 my ($domain, $box) = @ARGV;
 
-my $mail = Vhffs::Services::Mail::get_by_mxdomain($princ , $domain);
+my $mail = Vhffs::Services::Mail::get_by_mxdomain($vhffs , $domain);
 
 die("Domain $domain not found\n") unless(defined $mail);
 

Modified: trunk/vhffs-api/examples/delete_acl.pl
===================================================================
--- trunk/vhffs-api/examples/delete_acl.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/delete_acl.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,16 +11,16 @@
 use Vhffs::Object;
 use Vhffs::Services::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername username\n") if(@ARGV != 2);
 
 my ($servername, $username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
-my $httpd = Vhffs::Services::Web::get_by_servername($princ, $servername);
+my $httpd = Vhffs::Services::Web::get_by_servername($vhffs, $servername);
 die("Webarea $servername not found\n") unless(defined $httpd);
 
 die("Unable to delete ACL\n") unless $httpd->del_acl( $user );

Modified: trunk/vhffs-api/examples/generate_password.pl
===================================================================
--- trunk/vhffs-api/examples/generate_password.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/generate_password.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs::User;
 use Vhffs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username\n") unless(@ARGV == 1);
 
 my ($username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
 my $pwd = $user->generate_password;

Modified: trunk/vhffs-api/examples/get_list.pl
===================================================================
--- trunk/vhffs-api/examples/get_list.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/get_list.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,7 +8,7 @@
 use Vhffs;
 use Vhffs::Services::MailingList;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 mladdress\n") unless(@ARGV == 1);
 
@@ -17,7 +17,7 @@
 my ($local, $domain) = split(/@/, $address);
 die("$address is not a valid email address\n") unless(defined $local && defined $domain);
 
-my $ml = Vhffs::Services::MailingList::get_by_mladdress($princ, $local, $domain);
+my $ml = Vhffs::Services::MailingList::get_by_mladdress($vhffs, $local, $domain);
 die("Mailing list $address not found\n") unless(defined $ml);
 
 print Dumper $ml;

Modified: trunk/vhffs-api/examples/join_group.pl
===================================================================
--- trunk/vhffs-api/examples/join_group.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/join_group.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,15 +8,15 @@
 use Vhffs::Group;
 use Vhffs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username groupname\n") unless(@ARGV == 2);
 
 my ($username, $groupname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group not found\n") unless(defined $group);
 
 die("Unable to add $username to group $groupname\n") unless($group->add_user($user->get_uid) > 0);

Modified: trunk/vhffs-api/examples/mailuser.pl
===================================================================
--- trunk/vhffs-api/examples/mailuser.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/mailuser.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -12,16 +12,16 @@
 use Vhffs::Services::MailUser;
 use Vhffs::Panel::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username\n") unless(@ARGV == 1);
 
 my ($username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
 
-my $mu = new Vhffs::Services::MailUser( $princ , $user );
+my $mu = new Vhffs::Services::MailUser( $vhffs , $user );
 die("Configuration error\n") if(!ref($mu));
 
 if( $mu->exists_forward == 1 ) {

Modified: trunk/vhffs-api/examples/mailuser_add_box.pl
===================================================================
--- trunk/vhffs-api/examples/mailuser_add_box.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/mailuser_add_box.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -12,16 +12,16 @@
 use Vhffs::Services::MailUser;
 use Vhffs::Panel::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username password\n") unless(@ARGV == 2);
 
 my ($username, $password) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
 
-my $mu = new Vhffs::Services::MailUser( $princ , $user );
+my $mu = new Vhffs::Services::MailUser( $vhffs , $user );
 
 die("Unable to create box $username\@".$mu->{domain}."\n") unless($mu->addbox( $password ) > 0);
 print "Box $username\@".$mu->{domain}." created\n";

Modified: trunk/vhffs-api/examples/modify_acl.pl
===================================================================
--- trunk/vhffs-api/examples/modify_acl.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/modify_acl.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,16 +8,16 @@
 use Vhffs;
 use Vhffs::Services::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername username newlevel\n") unless(@ARGV == 3);
 
 my ($servername, $username, $level) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
-my $httpd = Vhffs::Services::Web::get_by_servername($princ, $servername);
+my $httpd = Vhffs::Services::Web::get_by_servername($vhffs, $servername);
 die("Webarea $servername not found\n") unless(defined $httpd);
 
 $httpd->add_acl( $user, $level );

Modified: trunk/vhffs-api/examples/modify_user.pl
===================================================================
--- trunk/vhffs-api/examples/modify_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/modify_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -7,13 +7,13 @@
 use Vhffs::User;
 use Vhffs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username new_firstname\n") unless(@ARGV == 2);
 
 my ($username, $firstname) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User not found\n") unless(defined $user);
 
 $user->set_firstname($firstname);

Modified: trunk/vhffs-api/examples/perm_for_user.pl
===================================================================
--- trunk/vhffs-api/examples/perm_for_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/perm_for_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -11,16 +11,16 @@
 use Vhffs::Services::Mysql;
 use Vhffs::Services::Web;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 servername username\n") unless(@ARGV == 2);
 
 my ($servername, $username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
-my $httpd = Vhffs::Services::Web::get_by_servername($princ, $servername);
+my $httpd = Vhffs::Services::Web::get_by_servername($vhffs, $servername);
 die("Webarea $servername not found\n") unless(defined $httpd);
 
 print "Permission: ";

Modified: trunk/vhffs-api/examples/print_domain.pl
===================================================================
--- trunk/vhffs-api/examples/print_domain.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/print_domain.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs;
 use Vhffs::Services::DNS;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 domainname\n") unless(@ARGV == 1);
 
 my ($domainname) = @ARGV;
 
-my $dns = Vhffs::Services::DNS::get_by_domainname($princ, $domainname);
+my $dns = Vhffs::Services::DNS::get_by_domainname($vhffs, $domainname);
 
 die("Domain name not found\n") unless(defined $dns);
 

Modified: trunk/vhffs-api/examples/show_acl_per_object.pl
===================================================================
--- trunk/vhffs-api/examples/show_acl_per_object.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_acl_per_object.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs;
 use Vhffs::Services::Mysql;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 dbname\n\tShows ACL for MySQL service dbname\n") unless(@ARGV == 1);
 
 my ($dbname) = @ARGV;
 
-my $sql = Vhffs::Services::Mysql::get_by_dbname($princ, $dbname);
+my $sql = Vhffs::Services::Mysql::get_by_dbname($vhffs, $dbname);
 
 die("MySQL service $dbname not found\n") unless(defined $sql);
 

Modified: trunk/vhffs-api/examples/show_dns_per_group.pl
===================================================================
--- trunk/vhffs-api/examples/show_dns_per_group.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dns_per_group.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,14 +9,14 @@
 use Vhffs;
 use Vhffs::Panel::DNS;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 groupname\n") unless(@ARGV == 1);
 
 my ($groupname) = @ARGV;
 
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group $groupname not found\n") unless(defined $group);
 
-print Dumper(Vhffs::Panel::DNS::getall_dns_per_group( $group , $princ ));
+print Dumper(Vhffs::Panel::DNS::getall_dns_per_group( $group , $vhffs ));
 

Modified: trunk/vhffs-api/examples/show_dns_per_user.pl
===================================================================
--- trunk/vhffs-api/examples/show_dns_per_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dns_per_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,13 +9,13 @@
 use Vhffs;
 use Vhffs::Panel::DNS;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username\n") unless(@ARGV == 1);
 
 my ($username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username( $princ, $username );
+my $user = Vhffs::User::get_by_username( $vhffs, $username );
 die("User $username not found\n") unless(defined $user);
 
-print Dumper( Vhffs::Panel::DNS::getall_dns_per_user( $user , $princ ));
+print Dumper( Vhffs::Panel::DNS::getall_dns_per_user( $user , $vhffs ));

Modified: trunk/vhffs-api/examples/show_dumper_cvs.pl
===================================================================
--- trunk/vhffs-api/examples/show_dumper_cvs.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dumper_cvs.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -21,11 +21,11 @@
 my $backend;
 my %infos;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
-$config = $princ->get_config;
+$config = $vhffs->get_config;
 
-my $cvs = Vhffs::Services::Cvs::get_by_reponame( $princ , $ARGV[0] ) ;
+my $cvs = Vhffs::Services::Cvs::get_by_reponame( $vhffs , $ARGV[0] ) ;
 
 print Dumper $cvs;
 

Modified: trunk/vhffs-api/examples/show_dumper_group.pl
===================================================================
--- trunk/vhffs-api/examples/show_dumper_group.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dumper_group.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs::Group;
 use Vhffs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 groupname\n") unless(@ARGV == 1);
 
 my ($groupname) = @ARGV;
 
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group $groupname not found\n") unless(defined $group);
 
 print Dumper($group);

Modified: trunk/vhffs-api/examples/show_dumper_object.pl
===================================================================
--- trunk/vhffs-api/examples/show_dumper_object.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dumper_object.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -12,13 +12,13 @@
 use Vhffs::Services::Web;
 use Vhffs::Panel::Group;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 objectID\n") unless(@ARGV == 1);
 
 my ($oid) = @ARGV;
 
-my $obj = Vhffs::Object::get_by_oid($princ, $oid);
+my $obj = Vhffs::Object::get_by_oid($vhffs, $oid);
 die("Object #$oid not found\n") unless(defined $obj);
 
 print Dumper $obj;

Modified: trunk/vhffs-api/examples/show_dumper_user.pl
===================================================================
--- trunk/vhffs-api/examples/show_dumper_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_dumper_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,13 +8,13 @@
 use Vhffs::User;
 use Vhffs;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username\n") unless(@ARGV == 1);
 
 my ($username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username( $princ, $username );
+my $user = Vhffs::User::get_by_username( $vhffs, $username );
 die("User $username not found\n") unless(defined $user);
 
 print Dumper $user;

Modified: trunk/vhffs-api/examples/show_groups_per_user.pl
===================================================================
--- trunk/vhffs-api/examples/show_groups_per_user.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_groups_per_user.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,16 +9,16 @@
 use Vhffs;
 use Vhffs::Panel::Group;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 username\n") unless(@ARGV == 1);
 
 my ($username) = @ARGV;
 
-my $user = Vhffs::User::get_by_username($princ, $username);
+my $user = Vhffs::User::get_by_username($vhffs, $username);
 die("User $username not found\n") unless(defined $user);
 
-my $groups = Vhffs::Panel::Group::getall_groups_per_user( $user , $princ );
+my $groups = Vhffs::Panel::Group::getall_groups_per_user( $user , $vhffs );
 
 print Dumper($groups);
 

Modified: trunk/vhffs-api/examples/show_last_users.pl
===================================================================
--- trunk/vhffs-api/examples/show_last_users.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_last_users.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,9 +9,9 @@
 use Vhffs;
 use Vhffs::Panel::User;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
-my $users = Vhffs::Panel::User::get_last_users( $princ );
+my $users = Vhffs::Panel::User::get_last_users( $vhffs );
 
 
 use Data::Dumper;

Modified: trunk/vhffs-api/examples/show_mail_conf.pl
===================================================================
--- trunk/vhffs-api/examples/show_mail_conf.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_mail_conf.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -16,9 +16,9 @@
 my $backend;
 my %infos;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
-$config = $princ->get_config;
+$config = $vhffs->get_config;
 my $cmail = $config->get_service( "dns" );
 
 if( defined $cmail->{init} )

Modified: trunk/vhffs-api/examples/show_mail_per_group.pl
===================================================================
--- trunk/vhffs-api/examples/show_mail_per_group.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_mail_per_group.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -9,13 +9,13 @@
 use Vhffs;
 use Vhffs::Panel::Mail;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 groupname\n") unless(@ARGV == 1);
 
 my ($groupname) = @ARGV;
 
-my $group = Vhffs::Group::get_by_groupname($princ, $groupname);
+my $group = Vhffs::Group::get_by_groupname($vhffs, $groupname);
 die("Group $groupname not found\n") unless(defined $group);
 
-print Dumper(Vhffs::Panel::Mail::getall_mail_per_group( $group , $princ ));
+print Dumper(Vhffs::Panel::Mail::getall_mail_per_group( $group , $vhffs ));

Modified: trunk/vhffs-api/examples/show_members_from_list.pl
===================================================================
--- trunk/vhffs-api/examples/show_members_from_list.pl	2012-03-03 14:57:14 UTC (rev 2101)
+++ trunk/vhffs-api/examples/show_members_from_list.pl	2012-03-03 15:08:21 UTC (rev 2102)
@@ -8,7 +8,7 @@
 use Vhffs;
 use Vhffs::Services::MailingList;
 
-my $princ = init Vhffs;
+my $vhffs = init Vhffs;
 
 die("Usage: $0 mladdress\n") unless(@ARGV == 1);
 
@@ -17,7 +17,7 @@
 my ($local, $domain) = split(/@/, $address);
 die("$address is not a valid email address\n") unless(defined $local && defined $domain);
 
-my $ml = Vhffs::Services::MailingList::get_by_mladdress($princ, $local, $domain);
+my $ml = Vhffs::Services::MailingList::get_by_mladdress($vhffs, $local, $domain);
 die("Mailing list $address not found\n") unless(defined $ml);
 
 my $subs = $ml->get_members;


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