Sha256: 1522b594b9877dfe4dbf21598a350a14f3843497237733ba955ac0ba9a082482

Contents?: true

Size: 964 Bytes

Versions: 46

Compression:

Stored size: 964 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # PublicIPs collection class for Network Service
      class PublicIps < Fog::Collection
        model Fog::Network::AzureRM::PublicIp
        attribute :resource_group

        def all
          requires :resource_group
          public_ips = []
          service.list_public_ips(resource_group).each do |pip|
            public_ips << Fog::Network::AzureRM::PublicIp.parse(pip)
          end
          load(public_ips)
        end

        def get(resource_group_name, public_ip_name)
          public_ip = service.get_public_ip(resource_group_name, public_ip_name)
          public_ip_fog = Fog::Network::AzureRM::PublicIp.new(service: service)
          public_ip_fog.merge_attributes(Fog::Network::AzureRM::PublicIp.parse(public_ip))
        end

        def check_public_ip_exists(resource_group, name)
          service.check_public_ip_exists(resource_group, name)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.6 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.5 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.4 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.3 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.2 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/network/public_ips.rb
far-gem-0.5.1 lib/fog/azurerm/models/network/public_ips.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/network/public_ips.rb