**2018 UPDATE: Automatic warranty checking is now built in to the Device42 UI!**
See the latest Automatic Warranty Discovery Documentation here!
Say goodbye to your “warranty tracking” spreadsheet. No more wondering when your warranties are going to expire, and no more manual lookups machine by machine.
Software is great at is handling tasks that can otherwise be monotonous and error prone when tackled manually. Let’s face it: humans tend to make mistakes and forget things, while computers don’t. In the spirit of ensuring you don’t miss a beat in your data center, the Device42 Warranty Check script has been updated, and now works with more vendors, too! Device42 is committed to making your life easier, and this update ensure the script does just that, automatically pulling warranty data from vendors like Lenovo, IBM and HP and populating discovered contract information into Device42. As long as the device’s model and serial number are present, the warranty check script will do the rest!
Full script details follow.
- Instead of displaying only the last date found, all warranties and services retrieved by the API call are now displayed.
- Fewer queries are made; instead of a query for all devices, only queries for a given vendor are made. Virtual machines & other manufactures hardware now skipped.
- Limited request offset to 100 devices at a time vs. a full request of all devices.
- A brief pause has been inserted between API calls to prevent API rate limit blocking (1 sec. pause/req.).
- An error message has been added if the session’s API call returns http code 401 (401 = unauthorized).
- In order for the script to successfully retrieve warranty information for a given device, the device’s model and serial must be correctly entered.
- Python 2.7 must be installed along with the python library requests. Install using pip or easy_install. Run: $ pip install requests
- Device42 Model field must be set to one of the following: “Dell”, “Hewlett Packard”, “IBM” or “Lenovo”. A valid serial number must be set as well.
- A Dell API key must be obtained to enable Device42 to retrieve warranty information from Dell. Instructions to obtain a Dell API key are available (in PPT format) from here: http://en.community.dell.com/dell-groups/supportapisgroup/m/mediagallery/20428185
- An HP API key must be obtained to enable Device42 to retrieve HP warranty information. Instructions to obtain HP API key: https://developers.hp.com/css-enroll
- Create working directory. Copy files in Device42’s GitHub warranty_check Repo
- Copy warranty.cfg.example to warranty.cfg
- Set the required parameters in warranty.cfg [D42 instance info & API keys]:
- Run the script! [ $ python starter.py ]
[device42] # set Device42 params username = password = url = [dell] # set api_key as provided by Dell api_key = url = https://sandbox.api.dell.com/support/assetinfo/v4/getassetwarranty [hp] # set api_key as provided by HP api_key = api_secret = url = https://css.api.hp.com
Consult the README.MD file for more information.
Grab a .zip of the new script or visit the repo. The updates should result in more efficient data gathering (we send less requests to each API), a greater likelihood of success in gathering warranty data (smarter requests + rate limiting), more complete data (all returned dates), and lastly better feedback if things don’t work as planned (401 unauthorized messages).
If things aren’t working as you’d expect, and you’ve verified you are meeting all prerequisites, please do let us know. Same goes if any significant performance regressions or other unexpected results we didn’t uncover in our testing are noticed — we really do appreciate the feedback, positive or otherwise! Oh, and if you aren’t currently a Device42 user, what are you waiting for!? Download Device42 today.