lib/fog/azurerm/models/network/public_ips.rb in fog-azure-rm-0.0.1 vs lib/fog/azurerm/models/network/public_ips.rb in fog-azure-rm-0.0.2

- old
+ new

@@ -10,17 +10,11 @@ attribute :resource_group def all requires :resource_group public_ips = [] - pubip_list = service.list_public_ips(resource_group) - pubip_list.each do |pip| - hash = {} - pip.instance_variables.each do |var| - hash[var.to_s.delete('@')] = pip.instance_variable_get(var) - end - hash['resource_group'] = resource_group - public_ips << hash + service.list_public_ips(resource_group).each do |pip| + public_ips << Fog::Network::AzureRM::PublicIp.parse(pip) end load(public_ips) end def get(identity)