summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/azure.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/azure.rb')
-rw-r--r--lib/ohai/plugins/azure.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ohai/plugins/azure.rb b/lib/ohai/plugins/azure.rb
index 14cdf63b..4a15dc54 100644
--- a/lib/ohai/plugins/azure.rb
+++ b/lib/ohai/plugins/azure.rb
@@ -74,8 +74,7 @@ Ohai.plugin(:Azure) do
metadata
end
- def initialize_metadata_mash_network
- metadata = Mash.new
+ def initialize_metadata_mash_network(metadata)
metadata["network"] = Mash.new
metadata["network"]["interfaces"] = Mash.new
%w{public_ipv4 local_ipv4 public_ipv6 local_ipv6}.each do |type|
@@ -107,7 +106,7 @@ Ohai.plugin(:Azure) do
# receiving network output is not guaranteed
unless endpoint_data["network"].nil?
- metadata = initialize_metadata_mash_network
+ metadata = initialize_metadata_mash_network(metadata)
# parse out per interface interface IP data
endpoint_data["network"]["interface"].each do |int|
metadata["network"]["interfaces"][int["macAddress"]] = Mash.new