diff options
-rw-r--r-- | lib/ohai/dsl/plugin.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/bsd/virtualization.rb | 3 | ||||
-rw-r--r-- | lib/ohai/plugins/darwin/virtualization.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/linux/sessions.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/linux/virtualization.rb | 5 | ||||
-rw-r--r-- | lib/ohai/plugins/solaris2/virtualization.rb | 2 |
6 files changed, 5 insertions, 15 deletions
diff --git a/lib/ohai/dsl/plugin.rb b/lib/ohai/dsl/plugin.rb index adcb6f82..1cbdbc2e 100644 --- a/lib/ohai/dsl/plugin.rb +++ b/lib/ohai/dsl/plugin.rb @@ -22,6 +22,7 @@ require "ohai/mixin/os" require "ohai/mixin/command" require "ohai/mixin/seconds_to_human" require "ohai/hints" +require "ohai/util/file_helper" module Ohai @@ -81,6 +82,7 @@ module Ohai include Ohai::Mixin::OS include Ohai::Mixin::Command include Ohai::Mixin::SecondsToHuman + include Ohai::Util::FileHelper attr_reader :data diff --git a/lib/ohai/plugins/bsd/virtualization.rb b/lib/ohai/plugins/bsd/virtualization.rb index f6a791ef..46304982 100644 --- a/lib/ohai/plugins/bsd/virtualization.rb +++ b/lib/ohai/plugins/bsd/virtualization.rb @@ -19,9 +19,8 @@ require "ohai/mixin/dmi_decode" -include Ohai::Mixin::DmiDecode - Ohai.plugin(:Virtualization) do + include Ohai::Mixin::DmiDecode provides "virtualization" collect_data(:freebsd, :openbsd, :netbsd, :dragonflybsd) do diff --git a/lib/ohai/plugins/darwin/virtualization.rb b/lib/ohai/plugins/darwin/virtualization.rb index e7b4a91d..61102cf1 100644 --- a/lib/ohai/plugins/darwin/virtualization.rb +++ b/lib/ohai/plugins/darwin/virtualization.rb @@ -18,10 +18,6 @@ # limitations under the License. # -require "ohai/util/file_helper" - -include Ohai::Util::FileHelper - Ohai.plugin(:Virtualization) do provides "virtualization" diff --git a/lib/ohai/plugins/linux/sessions.rb b/lib/ohai/plugins/linux/sessions.rb index f2f33bba..a2a3a09b 100644 --- a/lib/ohai/plugins/linux/sessions.rb +++ b/lib/ohai/plugins/linux/sessions.rb @@ -16,10 +16,6 @@ # limitations under the License. # -require "ohai/util/file_helper" - -include Ohai::Util::FileHelper - Ohai.plugin(:Sessions) do provides "sessions/by_session", "sessions/by_user" diff --git a/lib/ohai/plugins/linux/virtualization.rb b/lib/ohai/plugins/linux/virtualization.rb index 189bf444..145ec953 100644 --- a/lib/ohai/plugins/linux/virtualization.rb +++ b/lib/ohai/plugins/linux/virtualization.rb @@ -16,13 +16,10 @@ # limitations under the License. # -require "ohai/util/file_helper" require "ohai/mixin/dmi_decode" -include Ohai::Util::FileHelper -include Ohai::Mixin::DmiDecode - Ohai.plugin(:Virtualization) do + include Ohai::Mixin::DmiDecode provides "virtualization" def lxc_version_exists? diff --git a/lib/ohai/plugins/solaris2/virtualization.rb b/lib/ohai/plugins/solaris2/virtualization.rb index 7518cb41..bca7b6eb 100644 --- a/lib/ohai/plugins/solaris2/virtualization.rb +++ b/lib/ohai/plugins/solaris2/virtualization.rb @@ -19,9 +19,9 @@ # require "ohai/mixin/dmi_decode" -include Ohai::Mixin::DmiDecode Ohai.plugin(:Virtualization) do + include Ohai::Mixin::DmiDecode provides "virtualization" def collect_solaris_guestid |