opscode/ohai — pull request #133 by sawanoboly (2013-03-28 06:01:08+00:00)
Title: [OHAI-458] Include Joyent SmartOS specific attributes in Ohai

Hi,

This is code of OHAI-458.

Attribute Sample
----

"joyent"=>
{"sm_uuid"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"sm_id"=>"5",
"sm_image_id"=>"chefserver",
"sm_image_ver"=>"1.0.18",
"sm_baseimage_id"=>"base64",
"sm_baseimage_ver"=>"1.8.4",
"sm_pkgsrc"=>"http://pkgsrc.joyent.com/sdc6/2012Q2/x86_64/All"}}

Test
----

$ rspec -fd --color spec/unit/plugins/joyent_spec.rb
Run options: exclude {:requires_root=>true, :ruby_18_only=>true, :windows_only=>true}

Ohai::System plugin joyent
without joyent
should NOT create joyent
with joyent
should create joyent
under global zone
should ditect global zone
should NOT create sm_id
under smartmachine
should retrive zone uuid
should create sm_id

Finished in 0.01397 seconds
6 examples, 0 failures

Regards,