]> pere.pagekite.me Git - homepage.git/blob - blog/data/2012-06-01-dell-support-json.txt
532dea0e6fcb6e952bfb22cf82adaba718355806
[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://people.skolelinux.org/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
19 use SOAP::Lite;
20 use Data::Dumper;
21
22 my $GUID = '11111111-1111-1111-1111-111111111111';
23 my $App = 'test';
24 my $servicetag = $ARGV[0] or die "Please supply a servicetag. $!\n";
25 my ($deal, $latest, @dates);
26
27 my $s = SOAP::Lite
28 -> uri('http://support.dell.com/WebServices/')
29 -> on_action( sub { join '', @_ } )
30 -> proxy('http://xserv.dell.com/services/assetservice.asmx')
31 ;
32 my $a = $s->GetAssetInformation(
33 SOAP::Data->name('guid')->value($GUID)->type(''),
34 SOAP::Data->name('applicationName')->value($App)->type(''),
35 SOAP::Data->name('serviceTags')->value($servicetag)->type(''),
36 );
37
38 # Do the grabbing
39 my $asset = $a -> result;
40
41 print Dumper($asset) ;
42 </pre></p>
43
44 <p>The output can look like this:</p>
45
46 <p><pre>
47 $VAR1 = {
48 'Asset' => {
49 'Entitlements' => {
50 'EntitlementData' => [
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' => '2009-07-29T00:00:00',
61 'Provider' => '',
62 'StartDate' => '2006-07-29T00:00:00',
63 'DaysLeft' => '0'
64 },
65 {
66 'EntitlementType' => 'Expired',
67 'EndDate' => '2007-07-29T00:00:00',
68 'Provider' => '',
69 'StartDate' => '2006-07-29T00:00:00',
70 'DaysLeft' => '0'
71 }
72 ]
73 },
74 'AssetHeaderData' => {
75 'SystemModel' => 'GX620',
76 'ServiceTag' => '8DSGD2J',
77 'SystemShipDate' => '2006-07-29T19:00:00-05:00',
78 'Buid' => '2323',
79 'Region' => 'Europe',
80 'SystemID' => 'PLX_GX620',
81 'SystemType' => 'OptiPlex'
82 }
83 }
84 };
85 </pre></p>
86
87 <p>I have not been able to find any documentation from Dell about this
88 service outside the
89 <a href="http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation">inline
90 documentation</a>, and according to
91 <a href="http://iboyd.net/index.php/2012/02/14/updated-dell-warranty-information-script/">one
92 comment</a> it can have stability issues, but it is a lot better than
93 scraping HTML pages. :)</p>
94
95 <p>Wonder if HP and other server vendors have a similar service. If
96 you know of one, drop me an email. :)</p>