[pve-devel] r4859 - in pve-manager/pve2: bin/test lib/PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 1 11:26:00 CEST 2010


Author: dietmar
Date: 2010-07-01 09:26:00 +0000 (Thu, 01 Jul 2010)
New Revision: 4859

Modified:
   pve-manager/pve2/bin/test/example1.pl
   pve-manager/pve2/bin/test/perftest1.pl
   pve-manager/pve2/bin/test/testauth.pl
   pve-manager/pve2/bin/test/testperf.pl
   pve-manager/pve2/bin/test/testrpc.pl
   pve-manager/pve2/lib/PVE/API2Client.pm
Log:
update examples


Modified: pve-manager/pve2/bin/test/example1.pl
===================================================================
--- pve-manager/pve2/bin/test/example1.pl	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/bin/test/example1.pl	2010-07-01 09:26:00 UTC (rev 4859)
@@ -19,6 +19,6 @@
 #   host => 'localhost',
     );
 
-my $res = $conn->get("api2/", {});
+my $res = $conn->get("api2/json/", {});
 
 print "TEST: " . Dumper($res);

Modified: pve-manager/pve2/bin/test/perftest1.pl
===================================================================
--- pve-manager/pve2/bin/test/perftest1.pl	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/bin/test/perftest1.pl	2010-07-01 09:26:00 UTC (rev 4859)
@@ -27,7 +27,7 @@
 
     for (my $i = 0; $i < $qcount; $i++) {
 	eval {
-	    my $res = $conn->get("api2/", {});
+	    my $res = $conn->get("api2/json", {});
 	};
 
 	my $err = $@;

Modified: pve-manager/pve2/bin/test/testauth.pl
===================================================================
--- pve-manager/pve2/bin/test/testauth.pl	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/bin/test/testauth.pl	2010-07-01 09:26:00 UTC (rev 4859)
@@ -7,6 +7,8 @@
 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;

Modified: pve-manager/pve2/bin/test/testperf.pl
===================================================================
--- pve-manager/pve2/bin/test/testperf.pl	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/bin/test/testperf.pl	2010-07-01 09:26:00 UTC (rev 4859)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 
+die "old code - no longer used";
 
+
 use strict;
 use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
 use PVE::Utils;

Modified: pve-manager/pve2/bin/test/testrpc.pl
===================================================================
--- pve-manager/pve2/bin/test/testrpc.pl	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/bin/test/testrpc.pl	2010-07-01 09:26:00 UTC (rev 4859)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 
+die "old code - no longer used";
 
+
 use strict;
 use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
 use PVE::Utils;

Modified: pve-manager/pve2/lib/PVE/API2Client.pm
===================================================================
--- pve-manager/pve2/lib/PVE/API2Client.pm	2010-07-01 09:17:43 UTC (rev 4858)
+++ pve-manager/pve2/lib/PVE/API2Client.pm	2010-07-01 09:26:00 UTC (rev 4859)
@@ -53,7 +53,7 @@
 	$uri->scheme($self->{protocol});
 	$uri->host($self->{host});
 	$uri->port($self->{port});
-	$uri->path('/api2/ticket');
+	$uri->path('/api2/json/ticket');
 
 	my $response = $ua->post($uri, { 
 	    username => $self->{username},
@@ -62,6 +62,7 @@
 	if (!$response->is_success) {
 	    die $response->status_line . "\n";
 	}
+	# the auth cookie should be set now
     }
 
     my $uri = URI->new();




More information about the pve-devel mailing list