78152073f4b8a0141391a4f870b6d48fa54110a6
[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 ;
12
13 my $obj = SOAP::Lite
14     ->uri('http://www.pgbuildfarm.org/PGBuildFarm')
15     ->proxy('http://www.pgbuildfarm.org/cgi-bin/show_status_soap.pl')
16     ;
17
18 my $data = $obj->get_status->result;
19 my @fields = qw( branch sysname stage status 
20                                  operating_system os_version
21                                  compiler compiler_version architecture
22                                  when_ago snapshot build_flags
23                  );
24
25 print "Content-Type: text/plain\n\n";
26
27 my $head = join (' | ', @fields);
28 print $head,"\n";
29
30 foreach my $datum (@$data)
31 {
32     my $line = join (' | ', @{$datum}{@fields});
33     print $line,"\n";
34 }
35