Sha256: 8f471793d815b2d17509fb7b2a7ee420674fa681f3c0db4207df7bcfb0ecc0c3

Contents?: true

Size: 546 Bytes

Versions: 7

Compression:

Stored size: 546 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/brightbox/zone'

module Fog
  module Compute
    class Brightbox

      class Zones < Fog::Collection

        model Fog::Compute::Brightbox::Zone

        def all
          data = connection.list_zones
          load(data)
        end

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

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/zones.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/zones.rb
fog-0.11.0 lib/fog/compute/models/brightbox/zones.rb
fog-0.10.0 lib/fog/compute/models/brightbox/zones.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/brightbox/zones.rb
fog4encbs-0.9.0 lib/fog/compute/models/brightbox/zones.rb
fog-0.9.0 lib/fog/compute/models/brightbox/zones.rb