Sha256: 3006aac62abe2b385f8a5f31448ce088f6ad31b50387853a289d7d1c4d423d32

Contents?: true

Size: 764 Bytes

Versions: 22

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true

require 'fog/core/collection'
require 'fog/aliyun/models/compute/eip_address'

module Fog
  module Compute
    class Aliyun
      class EipAddresses < Fog::Collection
        model Fog::Compute::Aliyun::EipAddress

        def all(filters_arg = {})
          data = Fog::JSON.decode(service.list_eip_addresses(filters_arg).body)['EipAddresses']['EipAddress']
          load(data)
          # load(data['volumeSet'])
          # if server
          #   self.replace(self.select {|volume| volume.server_id == server.id})
          # end
          # self
        end

        def get(allocation_id)
          self.class.new(service: service).all(allocation_id: allocation_id)[0] if allocation_id
        end
      end
    end
  end
end

Version data entries

22 entries across 20 versions & 2 rubygems

Version Path
fog-aliyun-0.4.0 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.19 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.18 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.17 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.16 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.15 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.13 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.12 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.11 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.10 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.9 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.8 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.7 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.6 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.5 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.4 lib/fog/aliyun/models/compute/eip_addresses.rb
fog-aliyun-0.3.3 lib/fog/aliyun/models/compute/eip_addresses.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/eip_addresses.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/eip_addresses.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/eip_addresses.rb