diff options
author | Tim Smith <tsmith@chef.io> | 2017-12-03 10:39:56 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-12-03 10:39:56 -0800 |
commit | 81097a6dc665ec8279a7c2a6852d8f850baa6499 (patch) | |
tree | 38fcc364dcc8db99870285f0d6e189ca6d5be944 | |
parent | 33f711936b9b8dfe0c5a6c5decef3d43c207ddee (diff) | |
download | ohai-no_variable.tar.gz |
Avoid setting an unnecessary variable in the softlayer metadatano_variable
There's no need to set this variable
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/mixin/softlayer_metadata.rb | 2 | ||||
-rw-r--r-- | spec/spec_helper.rb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/ohai/mixin/softlayer_metadata.rb b/lib/ohai/mixin/softlayer_metadata.rb index 1158e6ca..1a190efd 100644 --- a/lib/ohai/mixin/softlayer_metadata.rb +++ b/lib/ohai/mixin/softlayer_metadata.rb @@ -25,7 +25,7 @@ module ::Ohai::Mixin::SoftlayerMetadata SOFTLAYER_API_QUERY_URL = "https://api.service.softlayer.com/rest/v3.1/SoftLayer_Resource_Metadata" unless defined?(SOFTLAYER_API_QUERY_URL) def fetch_metadata - metadata = { + { "public_fqdn" => fetch_metadata_item("getFullyQualifiedDomainName.txt"), "local_ipv4" => fetch_metadata_item("getPrimaryBackendIpAddress.txt"), "public_ipv4" => fetch_metadata_item("getPrimaryIpAddress.txt"), diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 48c09f72..6348160d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -115,10 +115,6 @@ RSpec.configure do |config| config.run_all_when_everything_filtered = true config.before :each do - # TODO: Change to Ohai.config once Ohai::Config is deprecated fully. Needs - # to stay Ohai::Config for now so that top-level attributes will get cleared - # out between tests (config_spec should be the only place where top-level - # config attributes are set). - Ohai::Config.reset + Ohai.config.reset end end |