summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-12-05 09:43:58 -0800
committerGitHub <noreply@github.com>2018-12-05 09:43:58 -0800
commitb7ec161666bad787f6701d826d538080328cf0ac (patch)
tree0fb4490680fe0aa48d2caacb0420d5766c7e591c
parentc9de899047ed89f2ba1bf999aa7f6207d739ad67 (diff)
parent212d5ce76c42154d7001a84590f3a3dbcc1a7431 (diff)
downloadohai-b7ec161666bad787f6701d826d538080328cf0ac.tar.gz
Merge pull request #1322 from chef/sled_round_2
Back out SLES -> SUSE remapping and instead fix the platform_family
-rw-r--r--lib/ohai/plugins/linux/platform.rb3
-rw-r--r--spec/unit/plugins/linux/platform_spec.rb7
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index eac53d83..46299e6f 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -28,7 +28,6 @@ Ohai.plugin(:Platform) do
"rhel" => "redhat",
"amzn" => "amazon",
"ol" => "oracle",
- "sled" => "suse",
"sles" => "suse",
"sles_sap" => "suse",
"opensuse-leap" => "opensuseleap",
@@ -155,7 +154,7 @@ Ohai.plugin(:Platform) do
"rhel"
when /amazon/
"amazon"
- when /suse/, /sles/, /opensuse/, /opensuseleap/
+ when /suse/, /sles/, /opensuse/, /opensuseleap/, /sled/
"suse"
when /fedora/, /pidora/, /arista_eos/
# In the broadest sense: RPM-based, fedora-derived distributions which are not strictly re-compiled RHEL (if it uses RPMs, and smells more like redhat and less like
diff --git a/spec/unit/plugins/linux/platform_spec.rb b/spec/unit/plugins/linux/platform_spec.rb
index ae6d3f7b..ca6ab298 100644
--- a/spec/unit/plugins/linux/platform_spec.rb
+++ b/spec/unit/plugins/linux/platform_spec.rb
@@ -96,11 +96,6 @@ describe Ohai::System, "Linux plugin platform" 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_sap_12_3
it "returns suse for sles_sap os-release id" do
expect(plugin.platform_id_remap("sles_sap")).to eq("suse")
@@ -175,7 +170,7 @@ describe Ohai::System, "Linux plugin platform" do
end
end
- %w{suse sles opensuse opensuseleap}.each do |p|
+ %w{suse sles opensuse opensuseleap sled}.each do |p|
it "returns suse for #{p} platform_family" do
expect(plugin.platform_family_from_platform(p)).to eq("suse")
end