diff options
author | Tim Smith <tsmith@chef.io> | 2018-01-10 16:37:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-10 16:37:24 -0800 |
commit | 224e504be7fcc8c0336ae2fd0d28945a4b64ec9a (patch) | |
tree | fbed58eff6c0ee071edfc0a14fbe033c6af9fb6d | |
parent | c99da4db9b488d726c5c419712d88610256726d4 (diff) | |
parent | d6162b69002e5773c9078da5a8a27e545da9a98c (diff) | |
download | ohai-224e504be7fcc8c0336ae2fd0d28945a4b64ec9a.tar.gz |
Merge pull request #1032 from chef/remove_old_attributes
Remove cloud_v2 and filesystem2 attributes
-rw-r--r-- | lib/ohai/plugins/cloud.rb | 3 | ||||
-rw-r--r-- | lib/ohai/plugins/darwin/filesystem.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/linux/filesystem.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/cloud_spec.rb | 12 | ||||
-rw-r--r-- | spec/unit/plugins/darwin/filesystem_spec.rb | 5 | ||||
-rw-r--r-- | spec/unit/plugins/linux/filesystem_spec.rb | 5 |
6 files changed, 0 insertions, 29 deletions
diff --git a/lib/ohai/plugins/cloud.rb b/lib/ohai/plugins/cloud.rb index dff44505..caf0e584 100644 --- a/lib/ohai/plugins/cloud.rb +++ b/lib/ohai/plugins/cloud.rb @@ -15,7 +15,6 @@ # limitations under the License. Ohai.plugin(:Cloud) do - provides "cloud_v2" provides "cloud" depends "ec2" @@ -309,8 +308,6 @@ Ohai.plugin(:Cloud) do get_azure_values if on_azure? get_digital_ocean_values if on_digital_ocean? - # set node[:cloud] and node[:cloud_v2] hash here - cloud_v2 @cloud_attr_obj.cloud_mash cloud @cloud_attr_obj.cloud_mash end end diff --git a/lib/ohai/plugins/darwin/filesystem.rb b/lib/ohai/plugins/darwin/filesystem.rb index c2f4048d..07fbb5c9 100644 --- a/lib/ohai/plugins/darwin/filesystem.rb +++ b/lib/ohai/plugins/darwin/filesystem.rb @@ -20,7 +20,6 @@ Ohai.plugin(:Filesystem) do provides "filesystem" - provides "filesystem2" def generate_device_view(fs) view = {} @@ -104,6 +103,5 @@ Ohai.plugin(:Filesystem) do fs_data["by_pair"] = by_pair filesystem fs_data - filesystem2 fs_data end end diff --git a/lib/ohai/plugins/linux/filesystem.rb b/lib/ohai/plugins/linux/filesystem.rb index 00c3705b..d25108f6 100644 --- a/lib/ohai/plugins/linux/filesystem.rb +++ b/lib/ohai/plugins/linux/filesystem.rb @@ -20,7 +20,6 @@ Ohai.plugin(:Filesystem) do provides "filesystem" - provides "filesystem2" def find_device(name) %w{/dev /dev/mapper}.each do |dir| @@ -250,6 +249,5 @@ Ohai.plugin(:Filesystem) do # Set the filesystem data filesystem fs_data - filesystem2 fs_data end end diff --git a/spec/unit/plugins/cloud_spec.rb b/spec/unit/plugins/cloud_spec.rb index 6c136c40..76c6e305 100644 --- a/spec/unit/plugins/cloud_spec.rb +++ b/spec/unit/plugins/cloud_spec.rb @@ -88,18 +88,6 @@ describe Ohai::System, "plugin cloud" do @plugin[:digital_ocean] = nil @plugin.run expect(@plugin[:cloud]).to be_nil - expect(@plugin[:cloud_v2]).to be_nil - end - end - - describe "with a cloud mash" do - before do - @plugin[:ec2] = Mash.new - end - - it "populates cloud public ip" do - @plugin.run - expect(@plugin[:cloud]).to eq(@plugin[:cloud_v2]) end end diff --git a/spec/unit/plugins/darwin/filesystem_spec.rb b/spec/unit/plugins/darwin/filesystem_spec.rb index 378d6da9..87b0f620 100644 --- a/spec/unit/plugins/darwin/filesystem_spec.rb +++ b/spec/unit/plugins/darwin/filesystem_spec.rb @@ -27,11 +27,6 @@ describe Ohai::System, "darwin filesystem plugin" do allow(plugin).to receive(:shell_out).with("mount").and_return(mock_shell_out(0, "", "")) end - it "sets both filesystem and filesystem2 attributes" do - plugin.run - expect(plugin[:filesystem]).to eq(plugin[:filesystem2]) - end - describe "when gathering filesystem usage data from df" do before(:each) do @stdout = <<-DF diff --git a/spec/unit/plugins/linux/filesystem_spec.rb b/spec/unit/plugins/linux/filesystem_spec.rb index 451849be..3f9b4336 100644 --- a/spec/unit/plugins/linux/filesystem_spec.rb +++ b/spec/unit/plugins/linux/filesystem_spec.rb @@ -55,11 +55,6 @@ describe Ohai::System, "Linux filesystem plugin" do end end - it "sets both filesystem and filesystem2 attributes" do - plugin.run - expect(plugin[:filesystem]).to eq(plugin[:filesystem2]) - end - describe "when gathering filesystem usage data from df" do before(:each) do @stdout = <<-DF |