Sha256: ecd3f36b8874e9417af0d35d0d387db8eedb1bb4680cc2264a4f6b62e246369e

Contents?: true

Size: 620 Bytes

Versions: 23

Compression:

Stored size: 620 Bytes

Contents

require "fog/brightbox/models/compute/cloud_ip"

module Fog
  module Brightbox
    class Compute
      class CloudIps < Fog::Collection
        model Fog::Brightbox::Compute::CloudIp

        def all
          data = service.list_cloud_ips
          load(data)
        end

        def get(identifier)
          return nil if identifier.nil? || identifier == ""
          data = service.get_cloud_ip(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

        def allocate
          data = service.create_cloud_ip
          new(data)
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fog-brightbox-1.12.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.11.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.10.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.9.1 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.9.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.8.2 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.8.1 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.8.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.7.3 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.7.2 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.7.1 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.7.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.6.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.5.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.5.0.rc1 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.4.2 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.4.1 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.4.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.3.0 lib/fog/brightbox/models/compute/cloud_ips.rb
fog-brightbox-1.2.0 lib/fog/brightbox/models/compute/cloud_ips.rb