Comments (6)
This project is back from the dead :) Glad someone is using it(or trying to).
I don't have dell machines myself but I googled for some service tags and tried it out(non of them with warranty).
Would be nice if you could try it out on some dell machines to see if it's working. Make sure to remove the cache file before running facter. The new code is in the dellapi branch.
from jhaals-warranty.
yoruichi:~# facter -p | grep warran
warranty => true
warranty_expiration => Unknown
I don't think you ever set expiration_date
irb(main):019:0> begin
irb(main):020:1* r['GetAssetWarrantyResponse'] \
irb(main):021:1* ['GetAssetWarrantyResult'] \
irb(main):022:1* ['Response']['DellAsset']['Warranties']['Warranty'].each do |w|
irb(main):023:2* end_date = Time.parse(w['EndDate'])
irb(main):024:2> if end_date > Time.now()
irb(main):025:3> warranty = true
irb(main):026:3> end
irb(main):027:2> end
irb(main):028:1> rescue
irb(main):029:1> end
=> [{"EntitlementType"=>"EXTENDED", "ServiceLevelCode"=>"ND", "ServiceLevelDescription"=>"Next Business Day Support", "ItemNumber"=>"995-2923", "ServiceProvider"=>"UNY", "EndDate"=>"2018-06-05T00:59:59", "StartDate"=>"2014-06-05T01:00:00", "ServiceLevelGroup"=>5}, {"EntitlementType"=>"INITIAL", "ServiceLevelCode"=>"ND", "ServiceLevelDescription"=>"Next Business Day Support", "ItemNumber"=>"995-0903", "ServiceProvider"=>"UNY", "EndDate"=>"2014-06-05T00:59:59", "StartDate"=>"2013-06-04T01:00:00", "ServiceLevelGroup"=>5}]
irb(main):030:0> warranty
=> true
irb(main):031:0> expiration_date
=> "Unknown"
from jhaals-warranty.
I haven't added support for that yet. Will do
from jhaals-warranty.
It should be sorted now. Please try again before I merge it into master and update the module.
Thanks
from jhaals-warranty.
Works great. Thanks!
yoruichi:~# facter -p | grep warr
warranty => true
warranty_expiration => 2014-06-05
from jhaals-warranty.
New module published
from jhaals-warranty.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jhaals-warranty.