lib/fog/azurerm/models/network/public_ips.rb in fog-azure-rm-0.0.4 vs lib/fog/azurerm/models/network/public_ips.rb in fog-azure-rm-0.0.5

- old
+ new

@@ -16,11 +16,13 @@ public_ips << Fog::Network::AzureRM::PublicIp.parse(pip) end load(public_ips) end - def get(identity) - all.find { |f| f.name == identity } + def get(resource_group_name, public_ip_name) + public_ip = service.get_public_ip(resource_group_name, public_ip_name) + public_ip_object = Fog::Network::AzureRM::PublicIp.new(service: service) + public_ip_object.merge_attributes(Fog::Network::AzureRM::PublicIp.parse(public_ip)) end def check_if_exists(resource_group, name) Fog::Logger.debug "Checkng if PublicIP #{name} exists." if service.check_for_public_ip(resource_group, name)