f7772fa7aa926f834fb74a256365beec6741c225
[buildfarm-server.git] / cgi-bin / get_bf_status_soap.pl
1 #!/usr/bin/perl
2
3 =comment
4
5 Copyright (c) 2003-2010, Andrew Dunstan
6
7 See accompanying License file for license details
8
9 =cut 
10
11 use SOAP::Lite +trace;
12
13 my $obj = SOAP::Lite
14     ->uri('http://www.pgbuildfarm.org/PGBuildFarm')
15     ->proxy('http://127.0.0.1/cgi-bin/show_status_soap.pl')
16     ->request->header("Host" => "www.pgbuildfarm.org")
17     ;
18
19 my $data = $obj->get_status->result;
20 my @fields = qw( branch sysname stage status 
21                                  operating_system os_version
22                                  compiler compiler_version architecture
23                                  when_ago snapshot build_flags
24                  );
25
26 print "Content-Type: text/plain\n\n";
27
28 my $head = join (' | ', @fields);
29 print $head,"\n";
30
31 foreach my $datum (@$data)
32 {
33     my $line = join (' | ', @{$datum}{@fields});
34     print $line,"\n";
35 }
36