diff options
author | Tim Smith <tsmith@chef.io> | 2018-11-28 11:03:51 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-28 11:03:51 -0800 |
commit | 125b9a54617d9bb59d33b311080e938e5aaf3f53 (patch) | |
tree | dd268de765c94445787e3da603ff2b7b8dd80a44 | |
parent | 124f5d2f0a5f97ae430f3f782a79577b4020675d (diff) | |
download | ohai-sles_sap.tar.gz |
platform: Identify sles_sap as the suse platformsles_sap
I'm fairly certain this was broken with our previous logic. Thanks @kmf for adding this to our os_release repo https://github.com/chef/os_release/blob/master/sles_sap_12_2
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 | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index 96beb4cf..3ea92a5d 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -29,6 +29,7 @@ Ohai.plugin(:Platform) do "amzn" => "amazon", "ol" => "oracle", "sles" => "suse", + "sles_sap" => "suse", "opensuse-leap" => "opensuseleap", "xenenterprise" => "xenserver", "cumulus-linux" => "cumulus", diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb index 5560fc84..ef60c7ce 100644 --- a/spec/unit/plugins/linux/platform_spec.rb +++ b/spec/unit/plugins/linux/platform_spec.rb @@ -97,6 +97,10 @@ describe Ohai::System, "Linux plugin platform" do expect(plugin.platform_id_remap("sles")).to eq("suse") end + it "returns suse for sles_sap os-release id" do + expect(plugin.platform_id_remap("sles_sap")).to eq("suse") + end + it "returns opensuseleap for opensuse-leap os-release id" do expect(plugin.platform_id_remap("opensuse-leap")).to eq("opensuseleap") end |