[pve-devel] r5565 - pve-manager/pve2/bin/test
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Feb 18 07:45:59 CET 2011
Author: dietmar
Date: 2011-02-18 07:45:59 +0100 (Fri, 18 Feb 2011)
New Revision: 5565
Removed:
pve-manager/pve2/bin/test/testauth.pl
pve-manager/pve2/bin/test/testperf.pl
pve-manager/pve2/bin/test/testrpc.pl
Modified:
pve-manager/pve2/bin/test/Makefile.am
pve-manager/pve2/bin/test/Makefile.in
Log:
remove old code, install new examples
Modified: pve-manager/pve2/bin/test/Makefile.am
===================================================================
--- pve-manager/pve2/bin/test/Makefile.am 2011-02-18 06:42:25 UTC (rev 5564)
+++ pve-manager/pve2/bin/test/Makefile.am 2011-02-18 06:45:59 UTC (rev 5565)
@@ -3,7 +3,8 @@
exampledir = ${DOCDIR}/examples
example_SCRIPTS = \
- testauth.pl
+ example1.pl \
+ example2.pl
CLEANFILES = *~
Modified: pve-manager/pve2/bin/test/Makefile.in
===================================================================
--- pve-manager/pve2/bin/test/Makefile.in 2011-02-18 06:42:25 UTC (rev 5564)
+++ pve-manager/pve2/bin/test/Makefile.in 2011-02-18 06:45:59 UTC (rev 5565)
@@ -173,7 +173,8 @@
top_srcdir = @top_srcdir@
exampledir = ${DOCDIR}/examples
example_SCRIPTS = \
- testauth.pl
+ example1.pl \
+ example2.pl
CLEANFILES = *~
all: all-am
Deleted: pve-manager/pve2/bin/test/testauth.pl
===================================================================
--- pve-manager/pve2/bin/test/testauth.pl 2011-02-18 06:42:25 UTC (rev 5564)
+++ pve-manager/pve2/bin/test/testauth.pl 2011-02-18 06:45:59 UTC (rev 5565)
@@ -1,48 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use SOAP::Lite;
-use HTTP::Cookies;
-use Data::Dumper;
-use Term::ReadLine;
-#use LWP::Debug qw (+);
-
-die "old code - no longer used";
-
-# read in username/password
-my $term = Term::ReadLine->new('testauth');
-my $attribs = $term->Attribs;
-
-my $username = $term->readline('login name> ');
-chomp $username;
-
-# mask typed characters for password
-$attribs->{redisplay_function} = $attribs->{shadow_redisplay};
-my $password = $term->readline('password> ');
-undef $attribs->{redisplay_function};
-chomp $password;
-
-
-my $soaphost = "127.0.0.1";
-my $soapport = 83;
-
-my $cookie_jar = HTTP::Cookies->new(ignore_discard => 1);
-my $soap = SOAP::Lite
- -> ns('http://proxmox.com/PVE/ConfigServer')
- -> on_fault (sub {
- my($soap, $res) = @_;
- die ref $res ? $res->faultstring : $soap->transport->status, "\n";
- })
- -> proxy("http://$soaphost:$soapport", cookie_jar => $cookie_jar,
- credentials => [
- "$soaphost:$soapport", # host:port
- 'PVE SOAP Server', # realm
- $username, $password
- ]);
-
-for (;;) {
- my $res = $soap->alive()->result;
- print "soap->alive(): $res\n";
- sleep(1);
-}
-
Deleted: pve-manager/pve2/bin/test/testperf.pl
===================================================================
--- pve-manager/pve2/bin/test/testperf.pl 2011-02-18 06:42:25 UTC (rev 5564)
+++ pve-manager/pve2/bin/test/testperf.pl 2011-02-18 06:45:59 UTC (rev 5565)
@@ -1,63 +0,0 @@
-#!/usr/bin/perl -w
-
-die "old code - no longer used";
-
-
-use strict;
-use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
-use PVE::Utils;
-use PVE::ConfigServer;
-use Data::Dumper;
-
-my $wcount = 4;
-my $qcount = 100;
-
-my $secret = PVE::Utils::load_auth_secret();
-my $ticket = PVE::Utils::create_auth_ticket ($secret, 'root', 'root');
-
-sub test_rpc {
-
- for (my $i = 0; $i < $qcount; $i++) {
- eval {
- my $conn = PVE::ConfigClient::connect ($ticket);
-
- #my $cvzl = $conn->cluster_vzlist()->result;
- my $cvzl = $conn->alive()->result;
-
- #print Dumper($cvzl);
-
- die "no data" if !$cvzl;
- };
-
- my $err = $@;
-
- if ($err) {
-
- print "ERROR: $err\n";
- last;
- }
- }
-}
-
-my $workers;
-
-my $starttime = [gettimeofday];
-
-for (my $i = 0; $i < $wcount; $i++) {
- if (my $pid = fork ()) {
- $workers->{$pid} = 1;
- } else {
- test_rpc ();
- exit (0);
- }
-}
-
-
-# wait for children
-1 while (wait > 0);
-
-my $elapsed = int(tv_interval ($starttime) * 1000);
-
-my $tpq = $elapsed / ($wcount*$qcount);
-
-print "DONE: $tpq ms per query\n";
Deleted: pve-manager/pve2/bin/test/testrpc.pl
===================================================================
--- pve-manager/pve2/bin/test/testrpc.pl 2011-02-18 06:42:25 UTC (rev 5564)
+++ pve-manager/pve2/bin/test/testrpc.pl 2011-02-18 06:45:59 UTC (rev 5565)
@@ -1,21 +0,0 @@
-#!/usr/bin/perl -w
-
-die "old code - no longer used";
-
-
-use strict;
-use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
-use PVE::Utils;
-use PVE::ConfigServer;
-use Data::Dumper;
-
-my $wcount = 4;
-my $qcount = 100;
-
-my $secret = PVE::Utils::load_auth_secret();
-my $ticket = PVE::Utils::create_auth_ticket ($secret, 'root', 'root');
-
-my $conn = PVE::ConfigClient::connect ($ticket);
-my $res = $conn->alive()->result;
-
-print "Alive = $res\n";
More information about the pve-devel
mailing list