diff options
author | Tim Smith <tsmith@chef.io> | 2018-11-28 16:03:42 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-28 21:09:10 -0800 |
commit | 6932f9d1c84d9e46fb073d0ee429e6eecf8d2c54 (patch) | |
tree | cc386ffa44dad4d2b36ccfd30b03e649d5ce4065 | |
parent | 124f5d2f0a5f97ae430f3f782a79577b4020675d (diff) | |
download | ohai-6932f9d1c84d9e46fb073d0ee429e6eecf8d2c54.tar.gz |
Add support for SUSE Linux Enterprise Desktopsled
This has its own OS ID
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/linux/platform.rb | 1 | ||||
-rw-r--r-- | spec/unit/plugins/linux/platform_spec.rb | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index 96beb4cf..e620184f 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -28,6 +28,7 @@ Ohai.plugin(:Platform) do "rhel" => "redhat", "amzn" => "amazon", "ol" => "oracle", + "sled" => "suse", "sles" => "suse", "opensuse-leap" => "opensuseleap", "xenenterprise" => "xenserver", diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb index 5560fc84..f7628ce9 100644 --- a/spec/unit/plugins/linux/platform_spec.rb +++ b/spec/unit/plugins/linux/platform_spec.rb @@ -81,30 +81,42 @@ describe Ohai::System, "Linux plugin platform" do end describe "#platform_id_remap" do + # https://github.com/chef/os_release/blob/master/redhat_7 it "returns redhat for rhel os-release id" do expect(plugin.platform_id_remap("rhel")).to eq("redhat") end + # https://github.com/chef/os_release/blob/master/amazon_2018 it "returns amazon for amzn os-release id" do expect(plugin.platform_id_remap("amzn")).to eq("amazon") end + # https://github.com/chef/os_release/blob/master/oracle_7 it "returns oracle for ol os-release id" do expect(plugin.platform_id_remap("ol")).to eq("oracle") end + # https://github.com/chef/os_release/blob/master/sled_15 + it "returns suse for sled os-release id" do + expect(plugin.platform_id_remap("sled")).to eq("suse") + end + + # https://github.com/chef/os_release/blob/master/sles_15_0 it "returns suse for sles os-release id" do expect(plugin.platform_id_remap("sles")).to eq("suse") end + # https://github.com/chef/os_release/blob/master/opensuseleap_15_0 it "returns opensuseleap for opensuse-leap os-release id" do expect(plugin.platform_id_remap("opensuse-leap")).to eq("opensuseleap") end + # https://github.com/chef/os_release/blob/master/xenserver_7_6 it "returns xenserver for xenenterprise os-release id" do expect(plugin.platform_id_remap("xenenterprise")).to eq("xenserver") end + # https://github.com/chef/os_release/blob/master/cumulus_3_7 it "returns cumulus for cumulus-linux os-release id" do expect(plugin.platform_id_remap("cumulus-linux")).to eq("cumulus") end |