Sha256: 81049d76804ffa9e45e7a36df9a4db28755a1b86fca37ea30fd518975a201a1f

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 Bytes

Contents

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

module Fog
  module Compute
    class Brightbox
      class Zones < Fog::Collection
        model Fog::Compute::Brightbox::Zone

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

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

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-brightbox-0.7.2 lib/fog/brightbox/models/compute/zones.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-brightbox-0.7.1/lib/fog/brightbox/models/compute/zones.rb
fog-brightbox-0.7.1 lib/fog/brightbox/models/compute/zones.rb
fog-brightbox-0.7.0 lib/fog/brightbox/models/compute/zones.rb