]> pere.pagekite.me Git - homepage.git/blob - blog/data/2012-06-01-dell-support-json.txt
Generated.
[homepage.git] / blog / data / 2012-06-01-dell-support-json.txt
1 Title: SOAP based webservice from Dell to check server support status
2 Tags: english, nuug
3 Date: 2012-06-01 15:20
4
5 <p>A few years ago I wrote
6 <a href="http://www.hungry.com/~pere/blog/Checking_server_hardware_support_status_for_Dell__HP_and_IBM_servers.html">how
7 to extract support status</a> for your Dell and HP servers. Recently
8 I have learned from colleges here at the
9 <a href="http://www.uio.no/">University of Oslo</a> that Dell have
10 made this even easier, by providing a SOAP based web service. Given
11 the service tag, one can now query the Dell servers and get machine
12 readable information about the support status. This perl code
13 demonstrate how to do it:</p>
14
15 <p><pre>
16 use strict;
17 use warnings;
18 use SOAP::Lite;
19 use Data::Dumper;
20 my $GUID = '11111111-1111-1111-1111-111111111111';
21 my $App = 'test';
22 my $servicetag = $ARGV[0] or die "Please supply a servicetag. $!\n";
23 my ($deal, $latest, @dates);
24 my $s = SOAP::Lite
25 -> uri('http://support.dell.com/WebServices/')
26 -> on_action( sub { join '', @_ } )
27 -> proxy('http://xserv.dell.com/services/assetservice.asmx')
28 ;
29 my $a = $s->GetAssetInformation(
30 SOAP::Data->name('guid')->value($GUID)->type(''),
31 SOAP::Data->name('applicationName')->value($App)->type(''),
32 SOAP::Data->name('serviceTags')->value($servicetag)->type(''),
33 );
34 print Dumper($a -> result) ;
35 </pre></p>
36
37 <p>The output can look like this:</p>
38
39 <p><pre>
40 $VAR1 = {
41 'Asset' => {
42 'Entitlements' => {
43 'EntitlementData' => [
44 {
45 'EntitlementType' => 'Expired',
46 'EndDate' => '2009-07-29T00:00:00',
47 'Provider' => '',
48 'StartDate' => '2006-07-29T00:00:00',
49 'DaysLeft' => '0'
50 },
51 {
52 'EntitlementType' => 'Expired',
53 'EndDate' => '2009-07-29T00:00:00',
54 'Provider' => '',
55 'StartDate' => '2006-07-29T00:00:00',
56 'DaysLeft' => '0'
57 },
58 {
59 'EntitlementType' => 'Expired',
60 'EndDate' => '2007-07-29T00:00:00',
61 'Provider' => '',
62 'StartDate' => '2006-07-29T00:00:00',
63 'DaysLeft' => '0'
64 }
65 ]
66 },
67 'AssetHeaderData' => {
68 'SystemModel' => 'GX620',
69 'ServiceTag' => '8DSGD2J',
70 'SystemShipDate' => '2006-07-29T19:00:00-05:00',
71 'Buid' => '2323',
72 'Region' => 'Europe',
73 'SystemID' => 'PLX_GX620',
74 'SystemType' => 'OptiPlex'
75 }
76 }
77 };
78 </pre></p>
79
80 <p>I have not been able to find any documentation from Dell about this
81 service outside the
82 <a href="http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation">inline
83 documentation</a>, and according to
84 <a href="http://iboyd.net/index.php/2012/02/14/updated-dell-warranty-information-script/">one
85 comment</a> it can have stability issues, but it is a lot better than
86 scraping HTML pages. :)</p>
87
88 <p>Wonder if HP and other server vendors have a similar service. If
89 you know of one, drop me an email. :)</p>