Sha256: a0aa76918f7378641fefd87ad81804441678b77e7fa73a3f6df64e8731f4f920

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

require 'rackspace-fog/core/collection'
require 'rackspace-fog/brightbox/models/compute/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

1 entries across 1 versions & 1 rubygems

Version Path
rackspace-fog-1.4.2 lib/rackspace-fog/brightbox/models/compute/zones.rb